LaTeX forum ⇒ GeneralList of equations

LaTeX specific issues not fitting into one of the other forums of this category.
Goldfinger820
Posts: 7
Joined: Fri Jul 20, 2007 12:09 am

List of equations

Postby Goldfinger820 » Fri Jul 20, 2007 5:55 am

Is there an easy way to create a list of equations? I have used \begin{equation} to number my equations and would like to form a list of them in my front matter, similar to that created for list of figures or list of tables.....


any ideas?

GF

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia

Postby gmedina » Mon Jul 23, 2007 10:12 pm

Try the tocloft package; it lets you create new "Lists of ...".
Edit: spelling issues.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

Link:
BBcode:
HTML:
Hide post links
Show post links

braverock
Posts: 2
Joined: Wed Jul 25, 2007 3:53 pm

Postby braverock » Wed Jul 25, 2007 11:28 pm

tocloft doesn't have an easy way to generate a list from an existing tag like {equation}

If you have any ideas on how to do that, I'd certainly appreciate it.

Regards,

- Brian

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia

Postby gmedina » Thu Jul 26, 2007 3:56 am

braverock wrote:...tocloft doesn't have an easy way to generate a list from an existing tag like {equation}...

Are you sure? The following seems quite easy:

  1. \documentclass{article}
  2. \usepackage{amsmath}
  3. \usepackage{tocloft}
  4.  
  5. \begin{document}
  6. \newcommand{\listequationsname}{List of Equations}
  7. \newlistof{myequations}{equ}{\listequationsname}
  8. \newcommand{\myequations}[1]{%
  9. \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par}
  10.  
  11. \listofmyequations
  12.  
  13. \begin{equation}\label{eq:Eq1}
  14. a=b
  15. \end{equation}
  16. \myequations{Equation number \ref{eq:Eq1}}
  17.  
  18. \newpage
  19.  
  20. \begin{equation}\label{eq:Eq2}
  21. b=c
  22. \end{equation}
  23. \myequations{Equation number \ref{eq:Eq2}}
  24.  
  25. \end{document}


Edit: the code I posted is somehow "redundant"; there are easier versions. (I just took a portion of a more elaborate code that I wrote to test the suggestion I gave to GoldFinger820 in my first reply).
1,1,2,3,5,8,13,21,34,55,89,144,233,...

Link:
BBcode:
HTML:
Hide post links
Show post links

pweinstein
Posts: 1
Joined: Mon Jan 02, 2012 9:58 pm

Postby pweinstein » Mon Jan 02, 2012 10:18 pm

Thanks gmedina, this is great. It is simple and does just what I was looking for.

This may be a dumb question (I'm a complete newbie) but is there a way to get the formatting of the list of equations to be the same as the list of tables/list of figures. I'm using the \listoftables command and PdfLaTeX to build.

I've uploaded the my university's class file in case there is something starnge in there as well as a PDF of the relavant pages.

Thanks and happy 2012!

Peter
Attachments
lists.pdf
Example of formatting differnces between list of tables and list of equation
(43.04 KiB) Downloaded 1144 times
ut-thesis.cls
University of Toronto thesis class
(31.57 KiB) Downloaded 355 times

Link:
BBcode:
HTML:
Hide post links
Show post links

Nayghtik
Posts: 2
Joined: Tue Jun 14, 2016 12:33 pm

Postby Nayghtik » Tue Jun 14, 2016 12:45 pm

I am trying to use the code above for generating a list of equations, but i keep getting an error

! LaTeX Error: Command \myequations already defined.
Or name \end... illegal, see p.192 of the manual.


These are the packages i use in my document:
  1. \documentclass[12pt,a4paper,oldfontcommands,oneside]{memoir}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage[T1]{fontenc}
  4. \usepackage{microtype}
  5. \usepackage{cite}
  6. \usepackage[dvips]{graphicx}
  7. \usepackage{subfig}
  8. \usepackage{xcolor}
  9. \usepackage{times}
  10. \usepackage{tabu}
  11. \usepackage{multirow}
  12. \usepackage{textcomp}
  13. \usepackage{placeins}
  14. \usepackage[]{mcode}
  15. \usepackage{comment}
  16. \usepackage{adjustbox}
  17. \usepackage{lscape}
  18. \usepackage[utf8]{inputenc}
  19.  
  20. %following with the code
  21.  
  22. \usepackage{tocloft}
  23. \newcommand{\listequationsname}{List of Equations}
  24. \newlistof{myequations}{equ}{\listequationsname}
  25. \newcommand{\myequations}[1]{
  26. \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par}
  27.  
  28. \begin{document}
  29. \tableofcontents*
  30. \listoffigures
  31. \listoftables
  32. \listofmyequations
  33. .....

Does anyone know what is the problem with my code?

Link:
BBcode:
HTML:
Hide post links
Show post links

User avatar
Johannes_B
Site Moderator
Posts: 3181
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Tue Jun 14, 2016 7:06 pm

With the memoir class, it is slightly different.

  1. \documentclass{memoir}
  2. \usepackage{blindtext}
  3. \newcommand{\listequationsname}{List of Equations}
  4. \newlistof{listofequations}{equ}{\listequationsname}
  5. \newcommand{\myequation}[1]{%
  6. \addcontentsline{equ}{equation}{\protect\numberline{\theequation}#1}\par
  7. }
  8. \makeatletter
  9. \let\l@equation\l@figure
  10. \makeatother
  11.  
  12. \begin{document}
  13. \tableofcontents*
  14. \listofequations
  15. \clearpage
  16. \blindtext
  17. \begin{equation}\label{eq:Eq1}
  18. a=b
  19. \end{equation}
  20. \myequation{A equals B \ref{eq:Eq1}}
  21.  
  22. \clearpage
  23.  
  24. \begin{equation}\label{eq:Eq2}
  25. b=c
  26. \end{equation}
  27. \myequation{C equals B \ref{eq:Eq2}}
  28.  
  29. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Link:
BBcode:
HTML:
Hide post links
Show post links

Nayghtik
Posts: 2
Joined: Tue Jun 14, 2016 12:33 pm

Postby Nayghtik » Thu Jun 16, 2016 10:13 am

Thank you, Johannes_B! It works! :D

Link:
BBcode:
HTML:
Hide post links
Show post links


Return to “General”

Who is online

Users browsing this forum: No registered users and 5 guests