[Tex/LaTex] tocloft and list of figures: get rid of page number of apperance

table of contentstocloft

I would like to get rid of the page number of appearance in my List of figures, since it should only reference to the sources of the figures. I am working with tocloft. Following code gets rid of the first number, but I have the feeling, that it is the right way to handle that problem.

\renewcommand{\cftfigpagefont}[1]{}
\renewcommand{\cftfigafterpnum}{\cftparfillskip}

Best Answer

Simply use

\cftpagenumbersoff{figure}

A complete example:

\documentclass{article}
\usepackage{tocloft}

\cftpagenumbersoff{figure}

\begin{document}

\listoffigures

\begin{figure}
\caption{test}
\end{figure}

\end{document}

enter image description here