I am working on a document. In my document I want to include page numbers of list of figures and list of table in my table of contents but I do not want to number the list of figures and list of tables. The first chapter is introduction so I want to have introduction becomes number 1. I use the following code in my document:
\documentclass [12pt]{article}
\usepackage[nottoc,numbib]{tocbibind}
\renewcommand{\listoffigures}{\begingroup
\tocsection
\tocfile{\listfigurename}{lof}
\endgroup}
\begin{document}
\pagenumbering{roman}
\frontmatter
\tableofcontents
\newpage
\listoffigures
\newpage
\listoftables
\mainmatter
\newcommand{\sectionbreak} {\clearpage}
\section{Introduction}
\pagenumbering{arabic}
\clearpage
\bibliographystyle{apacite}
\bibliography{bibfile}
\end{document}
The issue that I have is that when I write this code, it numbers list of figures and list of tables but I only need to include them in my TOC. Currently it looks like below image:
And list of figures is numbered:
While I do not like that 1 behind list of figures.
I tried other codes in the forum. For example I tried to replace
\tableofcontents
\newpage
\listoffigures
\newpage
\listoftables
by
\tableofcontents
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables
\chapter{Introduction}
from here which I customized it for my own document, but it did not work, and after running I observed that in one line I have introduction, list of figures and list of tables. Even they had overlaps to each other. It looks like below figure after replacing:
I really appreciate if someone can help me.
Best Answer
Package
tocbibind
includes LoF and LoT unnumbered in ToC. The list of figures gets numbered if you redefine\listoffigures
using command\tocsection
. So you only have to remove this redefinition of\listoffigures
to get an unnumbered LoF including a ToC entry.Note that
\frontmatter
and\mainmatter
are undefined forarticle
class.