4

I have two types on numbering, roman for toc tof and tables and arabic for the document.

I'm using

\usepackage[hidelinks]{hyperref}
\usepackage{bookmark}

and the code is written this way.

\setcounter{page}{1}
\pagenumbering{roman}

\tableofcontents
\providecommand\phantomsection{}
\addcontentsline{toc}{chapter}{Contents}

\clearpage\thispagestyle{empty}\phantom{a}\mbox{}\clearpage

\listoffigures
\providecommand\phantomsection{}
\addcontentsline{toc}{chapter}{List of Figures}


\clearpage\thispagestyle{empty}\phantom{a}\mbox{}\clearpage

\listoftables
\providecommand\phantomsection{}
\addcontentsline{toc}{chapter}{List of Tables}

\clearpage\thispagestyle{empty}\phantom{a}\mbox{}\clearpage

enter image description here

As you can see in the index they are not correctly numbered. The numbers on toc correspond to the last page of each section.

7

With your current settings, the \addcontentsline commands are too late in the code (once the lists have been typeset). The correct order should be something like

\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents

And similarly for the other lists.

Also, remove these lines:

\providecommand\phantomsection{}
0
    \clearpage      
    \addcontentsline{toc}{chapter}{LIST OF TABLES}
    \listoftables 

    \clearpage      
    \addcontentsline{toc}{chapter}{\protect LIST OF FIGURES}
    \listoffigures

This will solve your problem. Just put \protect.

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.