TransWikia.com

How do edit a list (of equations) made with tocloft?

TeX - LaTeX Asked by flowmymind on October 1, 2021

I use this for my list of equations:

documentclass{article}
usepackage{amsmath}
usepackage{tocloft}

begin{document}
newcommand{listequationsname}{Formelverzeichnis}
newlistof[section]{myequations}{equ}{listequationsname}
newcommand{myequations}[1]{%
addcontentsline{equ}{myequations}{protectnumberline{theequation}#1}par}
setlengthcftmyequationsindent{1.5em}
setlengthcftmyequationsnumwidth{2.3em}
renewcommand{cftequtitlefont}{normalfontLargebfseries}

listofmyequations

newpage

begin{equation}label{eq:Eq1}
  a=b
end{equation}
myequations{Abc ref{eq:Eq1}}

newpage

begin{equation}label{eq:Eq2}
  b=c
end{equation}
myequations{Xyz ref{eq:Eq2}}  

end{document}

The result is this:
Latex Result

It’s nice, but I need the table like this:

Formel 1: Abc 1 . . . . . . 2

Formel 2: Xyz 2 . . . . . . 3

One Answer

Change the myequations to

newcommand{myequations}[1]{%
  addcontentsline{equ}{myequations}
    {protectnumberline{bfseries Formel~theequation:}#1}par}

and enlarge cftmyequationsnumwidth.

Full example:

documentclass{article}
usepackage{amsmath}
usepackage{tocloft}

newcommand{listequationsname}{Formelverzeichnis}
newlistof[section]{myequations}{equ}{listequationsname}
newcommand{myequations}[1]{%
  addcontentsline{equ}{myequations}
    {protectnumberline{bfseries Formel~theequation:}#1}par}
setlengthcftmyequationsindent{1.5em}
setlengthcftmyequationsnumwidth{5.5em}
renewcommand{cftequtitlefont}{normalfontLargebfseries}

begin{document}

listofmyequations
newpage

begin{equation}label{eq:Eq1}
  a=b
end{equation}
myequations{Abc ref{eq:Eq1}}

newpage

begin{equation}label{eq:Eq2}
  b=c
end{equation}
myequations{Xyz ref{eq:Eq2}}

end{document}

enter image description here

Answered by muzimuzhi Z on October 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP