## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ list of figures Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
ziselos
Posts: 15
Joined: Sun Mar 04, 2018 12:03 pm

### list of figures

I would like to ask if there is a way to export the list of figures to a separate file (CSV, pdf or any other)? Just as it is produced in the pdf file :

Figure label page number
figure 1 10
figure 2 20

My purpose is to be able to have a file with figures and page number of them, every time I make changes to my main tex file.

Johannes_B
Site Moderator
Posts: 4029
Joined: Thu Nov 01, 2012 4:08 pm
There already is such a file, which is updated each time. It has the file ending lof.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

ziselos
Posts: 15
Joined: Sun Mar 04, 2018 12:03 pm
Yes I can see it each time I export PDF again. So is there a way to edit it? Open it and see its format?

ziselos
Posts: 15
Joined: Sun Mar 04, 2018 12:03 pm
Ok i opened the lof file and saw its content. It is something like this:
\select@language {english}\addvspace {10\p@ }\addvspace {10\p@ }\contentsline {figure}{\numberline {2.1}{\ignorespaces A test}}{7}{figure.2.1}\addvspace {10\p@ }\contentsline {figure}{\numberline {3.1}{\ignorespaces A test2}}{11}{figure.3.1}

So i have to write a script that extracts the name of each figure (A test, A test2) and the page number (7, 11) on another file?

Stefan Kottwitz
Posts: 9388
Joined: Mon Mar 10, 2008 9:44 pm
That content is LaTeX, so you can run LaTeX on it.

\documentclass{article}\usepackage[english]{babel}\let\addvspace\vspace\begin{document}\makeatletter\input{yourfilename.lof}\end{document}

Stefan

ziselos
Posts: 15
Joined: Sun Mar 04, 2018 12:03 pm
Thank you Stefan, i agree with you. I run the file as you said and the export is what i want.
Thanks again for your help.

rolf_claus
Posts: 1
Joined: Fri Oct 19, 2018 5:00 pm
Thanks stranger for your help! Here it is:

This error message cost me more than 3 years searching for a solution of the problem. One could click it away but this still was frustrating.

I don't understand what this line really stands for but it does the trick. I eventually got rid of the enervating