LaTeX forum ⇒ Graphics, Figures & Tableslist 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

Postby ziselos » Sat Sep 15, 2018 5:48 pm

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.

User avatar
Johannes_B
Site Moderator
Posts: 3825
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Sep 15, 2018 10:21 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

Postby ziselos » Sat Sep 15, 2018 11:33 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

Postby ziselos » Sun Sep 16, 2018 8:42 am

Ok i opened the lof file and saw its content. It is something like this:
  1. \select@language {english}
  2. \addvspace {10\p@ }
  3. \addvspace {10\p@ }
  4. \contentsline {figure}{\numberline {2.1}{\ignorespaces A test}}{7}{figure.2.1}
  5. \addvspace {10\p@ }
  6. \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?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Sep 16, 2018 12:06 pm

That content is LaTeX, so you can run LaTeX on it.

  1. \documentclass{article}
  2. \usepackage[english]{babel}
  3. \let\addvspace\vspace
  4. \begin{document}
  5. \makeatletter
  6. \input{yourfilename.lof}
  7. \end{document}


Stefan
Site admin

ziselos
Posts: 15
Joined: Sun Mar 04, 2018 12:03 pm

Postby ziselos » Sun Sep 16, 2018 12:22 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.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 6 guests