Graphics, Figures & Tableslistoffigures like section and NOT section*

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
pozzyx
Posts: 8
Joined: Fri Jun 18, 2010 12:20 pm

listoffigures like section and NOT section*

Post by pozzyx »

Hello everybody

I'm new to latex and I've a little problem.

I had at the end of my document a listoffigures but this listoffigures hasn't a number like my other sections and it doesn't appear (with a number) in the tableofcontent.

I've tried :
\addcontentsline{toc}{section}{Liste des figures}
\listoffigures

But in the table of content my line hasn't a number like the other sections.

I'm using documentclass article

Is there anyway the listoffigures appaears like a normal section ?

Thanks for your help.
Last edited by pozzyx on Mon Jun 21, 2010 10:51 am, edited 1 time in total.

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

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

listoffigures like section and NOT section*

Post by php1ic »

This seems like a bit if a dirty hack, but could you manually add the number like this

Code: Select all

\listoffigures
\addcontentsline{toc}{section}{5\ \ \ \listfigurename}
Obviously change the number and perhaps the space between the number and title so it is right for you.
pozzyx
Posts: 8
Joined: Fri Jun 18, 2010 12:20 pm

Re: listoffigures like section and NOT section*

Post by pozzyx »

Yes but in this case the number will not be shown on the page of the list of figure before the title
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

listoffigures like section and NOT section*

Post by localghost »

Not very common to number the LoF (or LoT). Try the tocbibind package.


Best regards and welcome to the board
Thorsten
pozzyx
Posts: 8
Joined: Fri Jun 18, 2010 12:20 pm

Re: listoffigures like section and NOT section*

Post by pozzyx »

ok thank you I'll keep it unnumbered ;)

Thanks for your help !!
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

listoffigures like section and NOT section*

Post by localghost »

pozzyx wrote:ok thank you I'll keep it unnumbered […]
If that settles the matter you should act as I directed you in my last reply and mark the topic as solved.

It seems that I messed things up a little bit. The recommended package won't help. It only numbers the ToC entry of the bibliography and the index. But you can also try another approach. For this we have to pick up some code from the »article.cls« file and modify it slightly.

Code: Select all

\makeatletter
\renewcommand\listoffigures{%
  \section{\listfigurename}%
  \@mkboth{\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}%
  \@starttoc{lof}%
}
\renewcommand\listoftables{%
  \section{\listtablename}%
  \@mkboth{\MakeUppercase\listtablename}{\MakeUppercase\listtablename}%
  \@starttoc{lot}%
}
\makeatother
These lines go into the preamble of your document. The only modification is to replace the starred \section* command in the original with the usual \section command to get numbered headings.
Post Reply