GeneralList of equations

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

List of equations

Post by Goldfinger820 »

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

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

List of equations

Post by gmedina »

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,...
braverock
Posts: 2
Joined: Wed Jul 25, 2007 3:53 pm

Re: List of equations

Post by braverock »

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
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

List of equations

Post by gmedina »

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:

Code: Select all

Code, edit and compile here:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tocloft}
\begin{document}
\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%
\addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par}
\listofmyequations
\begin{equation}\label{eq:Eq1}
a=b
\end{equation}
\myequations{Equation number \ref{eq:Eq1}}
\newpage
\begin{equation}\label{eq:Eq2}
b=c
\end{equation}
\myequations{Equation number \ref{eq:Eq2}}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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,...
pweinstein
Posts: 1
Joined: Mon Jan 02, 2012 9:58 pm

Re: List of equations

Post by pweinstein »

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 3168 times
ut-thesis.cls
University of Toronto thesis class
(31.57 KiB) Downloaded 1715 times
Nayghtik
Posts: 2
Joined: Tue Jun 14, 2016 12:33 pm

List of equations

Post by Nayghtik »

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:

Code: Select all

Code, edit and compile here:
\documentclass[12pt,a4paper,oldfontcommands,oneside]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{cite}
\usepackage[dvips]{graphicx}
\usepackage{subfig}
\usepackage{xcolor}
\usepackage{times}
\usepackage{tabu}
\usepackage{multirow}
\usepackage{textcomp}
\usepackage{placeins}
\usepackage[]{mcode}
\usepackage{comment}
\usepackage{adjustbox}
\usepackage{lscape}
\usepackage[utf8]{inputenc}
%following with the code
\usepackage{tocloft}
\newcommand{\listequationsname}{List of Equations}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{
\addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par}
\begin{document}
\tableofcontents*
\listoffigures
\listoftables
\listofmyequations
.....
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Does anyone know what is the problem with my code?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

List of equations

Post by Johannes_B »

With the memoir class, it is slightly different.

Code: Select all

Code, edit and compile here:
\documentclass{memoir}
\usepackage{blindtext}
\newcommand{\listequationsname}{List of Equations}
\newlistof{listofequations}{equ}{\listequationsname}
\newcommand{\myequation}[1]{%
\addcontentsline{equ}{equation}{\protect\numberline{\theequation}#1}\par
}
\makeatletter
\let\l@equation\l@figure
\makeatother
\begin{document}
\tableofcontents*
\listofequations
\clearpage
\blindtext
\begin{equation}\label{eq:Eq1}
a=b
\end{equation}
\myequation{A equals B \ref{eq:Eq1}}
\clearpage
\begin{equation}\label{eq:Eq2}
b=c
\end{equation}
\myequation{C equals B \ref{eq:Eq2}}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Nayghtik
Posts: 2
Joined: Tue Jun 14, 2016 12:33 pm

Re: List of equations

Post by Nayghtik »

Thank you, Johannes_B! It works! :D
Post Reply