1

I would like to make a list of equation and found this post List of equation. That's what i want but I have the problem that my list does not look like the lof or lot. My MWE:

\documentclass[12pt]{report}
\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=3.2cm]{geometry}

\usepackage{tocloft}

\newcommand{\listequationsname}{Formelverzeichnis}
\newlistof{equations}{equ}{\listequationsname}

\newcommand{\myequations}[1]{%
    \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}}

\begin{document}
    \listofequations

    \begin{equation}
    Z = 1
    \end{equation}
\myequations{A simple equation}

\end{document}

My Output looks like this: enter image description here

What is the Problem? How can I correct it?

1
  • You need to change myequations to equations in the \addcontentsline command.
    – DG'
    Jun 4, 2020 at 8:52

2 Answers 2

2

Fix the names. However, your placement of \myequations is wrong. I'd call it \eqdesc (personal preference) and place it inside the equation, because it's where it belongs.

Also, you can use it in align and make it to cooperate with hyperref, which is a good reason for use such a list.

As the code is written, it's not relevant whether you load hyperref or not.

\documentclass[12pt]{report}
\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=3.2cm]{geometry}
\usepackage{amsmath}
\usepackage{tocloft}
\usepackage{hyperref}

\usepackage{lipsum} % for mock text

\newcommand{\listequationsname}{Formelverzeichnis}
\newlistof{equations}{equ}{\listequationsname}

\newcommand{\eqdesc}[1]{%
  \csname phantomsection\endcsname % if hyperref is loaded
  \addcontentsline{equ}{equations}{\protect\numberline{\theequation}#1}%
}

\begin{document}

\listofequations

\clearpage

\lipsum[1-2]
\begin{equation}
Z = 1
\eqdesc{A simple equation}
\end{equation}
\lipsum[3][1-2]
\begin{align}
a &= 1 \eqdesc{Another equation} \\
b &= 2 \eqdesc{Yet another one}
\end{align}

\end{document}

enter image description here

2
  • Thank you very much! Works perfectly.
    – Dugfax
    Jun 4, 2020 at 13:22
  • This is wonderful! Nov 2, 2020 at 3:31
1

You took the code from Werners answer and changed the name of the list from myequations to equations but forgot to change it in the \addcontentsline command:

\documentclass[12pt]{report}
\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=3.2cm]{geometry}

\usepackage{tocloft}

\newcommand{\listequationsname}{Formelverzeichnis}
\newlistof{equations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%
\addcontentsline{equ}{equations}{\protect\numberline{\theequation}#1}\par}


\begin{document}
  \listofequations

  \begin{equation}
    Z = 1
  \end{equation}
  \myequations{A simple equation}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .