I'd like to change my list of listings to match my list of figures, which I have changed using tocloft:


Is there a way to do the same with my list of listings?


This is not possible using tocloft commands, but you can emulate tocloft's behaviour by redefining \l@lstlisting. (Note: If you don't want to redefine \cftfigpagefont, you have to omit the second \sffamily in my redefinition of \l@lstlisting.)


% \usepackage{tocloft}
% \renewcommand{\cftfigfont}{\sffamily}
% \renewcommand{\cftfigpagefont}{\sffamily}





\caption{A figure}

\begin{lstlisting}[caption={A listing}]
(Listing content)

  • If you don't want to change the fonts, this is meant: \renewcommand*{\l@lstlisting}[2]{\@dottedtocline{1}{<lengthFromLeftMargin>}{lengthFromNumbersStartToLabelsStart}{#1}{#2}} – kando Aug 19 '16 at 15:40

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.