Note: using LaTeX it is I suppose very straightforward to include a List of Equations using tocloft, but the difference here is making an elegant solution in Lyx
So in our document we have the Table of Contents, List of Figures, List of Tables, nomenclature, etc.
How to we insert a List of Equations? All of our equations are numbered and labeled. I.e., next to each equation appears (eq:EquationName, #)
Thanks in advance,
Robinson
LyX ⇒ List of Equations / Table of Equations
List of Equations / Table of Equations
Last edited by rlevin on Sat Mar 26, 2011 9:20 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10344
- Joined: Mon Mar 10, 2008 9:44 pm
List of Equations / Table of Equations
LaTeX.org admin
List of Equations / Table of Equations
I found that earlier, I'm just having some trouble working it into Lyx.
I can get the new List to appear, but to populate it with equations each equation which you want to appear in your list must include something like:
We already have a document in Lyx with hundreds of pages and equations, so adding that Latex code after each one is both ugly and a pain.
I was wondering if there was a more elegant way to include the tocloft package and have it recognize that each \begin{equation} should be listed in the TOC/List of Equations without that special \myequations following it.
Thanks,
Robinson
I can get the new List to appear, but to populate it with equations each equation which you want to appear in your list must include something like:
Code: Select all
\myequations{Equation name \ref{eq:1}}
I was wondering if there was a more elegant way to include the tocloft package and have it recognize that each \begin{equation} should be listed in the TOC/List of Equations without that special \myequations following it.
Thanks,
Robinson
List of Equations / Table of Equations
OK, I've been making some headway. If I use this code:
Then all \equations will appear in the List of Equations. That's great, but there are two problems:
Note: I am going to cross post this in a general LaTeX forum since this approach is shying away from doing things in "pure" Lyx and is (for now) adopting a more technical solution. http://www.latex-community.org/forum/vi ... =5&t=12454
Code: Select all
Code, edit and compile here:
% redefine equation to automatically include our \myequations tag\let\oldequation = \equation\let\endoldequation = \endequation\renewenvironment{equation}{\begin{oldequation}}{\end{oldequation}\myequations{\@currentlabelname}}\usepackage{tocloft}\newcommand{\listequationsname}{List of Equations}\newlistof{myequations}{equ}{\listequationsname}% myequation takes in its display name\newcommand{\myequations}[1]{% display name is printed\addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par}
- Each \equations displayed name in the List of Equations is not its own \label (eg. Torque) but instead is the name of the \subsection in which it appears (such that dozens of equations have the name "Brushless Motor Fundamentals", etc.
- Equations 2.1 - 2.9 display correctly in the List of Equations but after the equation number hits 2.10 the second digit overlaps with the display name.
Code: Select all
Code, edit and compile here:
\begin{equation}\tau=F\times r\label{eq:Torque}\end{equation}