# List of figures as a section with number

How can I get the list of figures as a section in an article document, so it will be listed in the table of contents? At the moment it's listed in the ToC, but without number.

-
Welcome to Tex! Why don't you try something like \section{List of Figures}\lofwithouttitle\addcontentsline{toc}{section}{List o Figures} – Thanos Nov 11 '12 at 16:22
@Thanos: You would also need \makeatletter\newcommand{\lofwithouttitle}{\@starttoc{lof}}\makeatother. – Werner Nov 11 '12 at 16:34
@Werner:Yeas you are right...I forgot to copy it...Thank's and sorry for the inconvinience... – Thanos Nov 11 '12 at 16:36

In the default article document class \listoffigures is set as \section*, thereby removing it from being displayed in the ToC:

\newcommand\listoffigures{%
\section*{\listfigurename}%
\@mkboth{\MakeUppercase\listfigurename}%
{\MakeUppercase\listfigurename}%
\@starttoc{lof}%
}


Modifying this to actually use \section instead inserts the appropriate numbering:

\documentclass{article}
\newcommand{\insertfigure}{\begin{figure}\caption{A figure caption}\end{figure}}
\makeatletter
\renewcommand\listoffigures{%
\section{\listfigurename}% Used to be \section*{\listfigurename}
\@mkboth{\MakeUppercase\listfigurename}%
{\MakeUppercase\listfigurename}%
\@starttoc{lof}%
}
\makeatother
\begin{document}
\tableofcontents
\listoffigures
\section{A section}\insertfigure\insertfigure\insertfigure
\section{A section}\insertfigure\insertfigure\insertfigure
\section{A section}\insertfigure\insertfigure\insertfigure
\section{A section}\insertfigure\insertfigure\insertfigure
\section{A section}\insertfigure\insertfigure\insertfigure
\section{A section}\insertfigure\insertfigure\insertfigure
\end{document}

-
thanks a lot :) – heysamhey Nov 11 '12 at 16:42

With the KOMA-Script classes, simply use the class option listof=totocnumbered.

\documentclass[listof=totocnumbered]{scrartcl}

\begin{document}

\tableofcontents

\listoffigures

\section{foo}

\begin{figure}[h]
\centering
\rule{1cm}{1cm}
\caption{A figure}
\end{figure}

\end{document}


-