By default \tableofcontents
and \listoffigures
do not use numbered headings. This can be changed using the tocbibind
package.
The following code redefines \tableofcontents
and inserts the \tocchapter
instruction, then loading the .toc
file with \tocfile{\contentsname}{toc}
.
The macro \unboldchapternumber
defines the chapter number to be not bold and switches to \Roman
and redefines the potential hyper anchor \theHchapter
in case of hyperref
being loaded.
\renewcommand{\tableofcontents}{%
\begingroup
\unboldchapternumber%
\tocchapter
\tocfile{\contentsname}{toc}
\endgroup
}
After loading \listoffigures
, the chapter counter should be reset to zero.
\documentclass{report}
\usepackage{tocbibind}
\usepackage{blindtext}
\usepackage{hyperref}
\makeatletter
\newif\ifhyperrefloaded
% Check whether hyperref is loaded
\@ifpackageloaded{hyperref}{
\hyperrefloadedtrue
}{}
\makeatother
\newcommand{\unboldchapternumber}{%
\renewcommand{\thechapter}{\normalfont\Roman{chapter}\bfseries}%
\ifhyperrefloaded
% Change the hyperanchors to prevent wrong anchors
\renewcommand{\theHchapter}{tocchapter.\arabic{chapter}}%
\fi
}
\renewcommand{\tableofcontents}{%
\begingroup
\unboldchapternumber%
\tocchapter
\tocfile{\contentsname}{toc}
\endgroup
}
\renewcommand{\listoffigures}{%
\begingroup
\unboldchapternumber
\tocchapter
\tocfile{\listfigurename}{lof}
\endgroup
}
\begin{document}
\tableofcontents
\listoffigures
\setcounter{chapter}{0}
\chapter{One}
\blindtext
\chapter{Two}
\blindtext
\end{document}
\usepackage[nottoc,notlof,notlot,chapter]{tocbibind}
could help, in conjunction with\renewcommand{\thechapter}{\Roman{chapter}}
just before\listoffigures\listoftables
and\renewcommand{\thechapter}{\arabic{chapter}}
after...