1

I am writing an article where I both need a list of figures and a list of Lemmas. I can create a custom list using tocloft and this works fine. However, the two lists are indented differently and I cannot figure out how tocloft commands can be used to fix this.

Thanks in advance to everyone providing some hints. Alternative solutions to tocloft for custom lists are appreciated as well. This is an example:

\documentclass[11pt]{article}

\usepackage[titles]{tocloft}


\newcommand{\lemma}[1]{
\refstepcounter{lemma}#1\addcontentsline{lem}{lemma}
{\protect\numberline{\thelemma}#1}
}
\newlistof{lemma}{lem}{List of Lemmas}

\begin{document}
Here I write \lemma{Lemma One} and \lemma{Lemma Two} and here I put a figure:
\begin{figure}[h!]
\centering
$\pi$
\caption{Figure 1}
\end{figure}

\listoffigures
\listoflemma

\end{document}

enter image description here

1

You can redefine \cftlemmaindent and \cftlemmanumwidth to \cftfigindent and \cftfignumwidth respectively

\renewcommand\cftlemmaindent{\cftfigindent}
\renewcommand\cftlemmanumwidth{\cftfignumwidth}

Example:

\documentclass[11pt]{article}
\usepackage[titles]{tocloft}

\newcommand{\lemma}[1]{%
  \refstepcounter{lemma}#1\addcontentsline{lem}{lemma}
    {\protect\numberline{\thelemma}#1}%
}
\newlistof{lemma}{lem}{List of Lemmas}
\renewcommand\cftlemmaindent{\cftfigindent}
\renewcommand\cftlemmanumwidth{\cftfignumwidth}

\begin{document}
Here I write \lemma{Lemma One} and \lemma{Lemma Two} and here I put a figure:
\begin{figure}[h!]
\centering
$\pi$
\caption{Figure 1}
\end{figure}
\listoffigures
\listoflemma
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.