1

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.

  • Hi, welcome! Would you mind to provide a full compilable example instead of just two fragments? – user121799 Jul 31 '18 at 2:58
  • @marmot I edited it. I hope it be more clear now. – questionaskerprogrammer Jul 31 '18 at 3:59
  • Thanks! Could you please also add your \documentclass command? As well as some figure environment? – user121799 Jul 31 '18 at 4:13
  • Those lists are unnumbered by default. – Johannes_B Jul 31 '18 at 5:29
  • @marmot I added \documentclass and a snap of list of figures. Does this work as a figure environment? – questionaskerprogrammer Jul 31 '18 at 5:48
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.