Graphics, Figures & TablesWrong numbers in List of Figures

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
zillions
Posts: 11
Joined: Fri Sep 04, 2009 10:45 pm

Wrong numbers in List of Figures

Post by zillions »

I'm adding three new lines (see below) to my list of figures at the start of my document. These are all given a figure number of 0. Please see the photo attachment. I would like to give them the correct numbers.

Code: Select all

\listoffigures

\newpage
\addcontentsline{lof}{figure}{\protect\numberline{\thefigure}\textbf{CV in English}}
\includepdf[pages=1-2]{rohrkemperCV2pages}

\newpage
\addcontentsline{lof}{figure}{\protect\numberline{\thefigure}\textbf{CV in German}}
\includepdf[pages=1-2]{rohrkemperCV2pages_german}

\newpage
\addcontentsline{lof}{figure}{\protect\numberline{\thefigure}\textbf{Reference: Larry Abbott}}

\includepdf[pages=1]{abbott_reference.pdf}
thanks for your help!
Bobby
Attachments
Screen shot 2009-09-04 at 10.38.55 PM.png
Screen shot 2009-09-04 at 10.38.55 PM.png (34.75 KiB) Viewed 2306 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Wrong numbers in List of Figures

Post by localghost »

At first, please read Section 2.2 and 2.4 of the Board Rules.

Regarding your problem, you have to increase the counter for figures right before every \addcontensline command to get the correct output.

Code: Select all

\stepcounter{figure}

Best regards and welcome to the board
Thorsten
zillions
Posts: 11
Joined: Fri Sep 04, 2009 10:45 pm

Re: Wrong numbers in List of Figures

Post by zillions »

Thanks Thorsten, that definitely works now. And I see the code button now. Very cool. --bobby
Post Reply