[Tex/LaTex] remove numbering from list of figures and list of tables but have them in TOC

table of contents

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:

enter image description here

And list of figures is numbered:

enter image description here

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:

enter image description here

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.

\documentclass [12pt]{article}
\usepackage[nottoc,numbib]{tocbibind}

 \begin{document}
 \pagenumbering{roman}
 \tableofcontents
 \newpage
 \listoffigures
 \newpage
 \listoftables

 \cleardoublepage
 \pagenumbering{arabic}
 \section{Introduction}
 \end{document}

enter image description here

Note that \frontmatter and \mainmatter are undefined for article class.

Related Question