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?

Dugfax
  • 13
  • 3

2 Answers2

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

egreg
  • 1,121,712
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

DG'
  • 21,727