My problem is not exactly creating the list, but I create it according to the norms of my country. The list should look like this
Figure 1 – Caption (white space or dotted) 6
It should start with the word figure followed by its numbering, then a dash, then its caption and in the right corner of the page the number of the page where it appears.
There is a class called abntex2 that does this, but I could not make it work using the book class. Some commands contained in the abntex2 class that are related to the list of figures are
\renewcommand{\cftfigurename}{\figurename\space}
\renewcommand*{\cftfigureaftersnum}{\hfill\textendash\hfill}
Add un minimal code (need any figure called 1)
\documentclass{book}
\usepackage{hyperref}
\usepackage{graphicx}
\renewcommand{\cftfigurename}{\figurename\space}
\renewcommand*{\cftfigureaftersnum}{\hfill\textendash\hfill}
\begin{document}
\pdfbookmark[0]{\listfigurename}{lof}%need \usepackage{hyperref}
\listoffigures*
\cleardoublepage
\begin{figure}
\includegraphics[width=\linewidth]{1}
\caption{Test}
\end{figure}
\end{document}
Best Answer
Here is a way. I supposed you won't have more than 99 figures (one has to compute the width of the label in the list of figures). I also added the
emptypage
package, to have no header/footer on empty pages.Also, as mentioned by @ChristianHupfer, the hand-made
\pdfbookmark[0]{…}
can be replaced with loading packagetocbibind
with option[notoc]
so that the table of contents does not refer to itself.