[Tex/LaTex] Actual page number and Contents page number do not match

page-numberingtable of contents

The page number indicated in the contents sections and the actual page number do not match up. Contents page

The Abstract should start at page i, List of abbreviations should start on page iv. While Acknowledgements, Contents, and list of figures are numbered correctly, the list figures is on a completely different scheme !

I have been using ..

\documentclass[12pt, parskip=full]{report}
\usepackage[doublespacing]{setspace}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[letterpaper, left=1.5in, right=1in, top=1in, bottom=1in,]{geometry}
\usepackage{adjustbox}
\usepackage{tikz}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage{enumitem}

\usepackage{tocbibind}

\begin{document}
\maketitle

\pagenumbering{roman}   
\input{abstr}
\addcontentsline{toc}{chapter}{Abstract}

\input{ack}
\addcontentsline{toc}{chapter}{Acknowledgements}

\input{abbrev}
\addcontentsline{toc}{chapter}{List of Abbreviations}

\tableofcontents
\listoffigures
\listoftables


\pagenumbering{arabic}  
\part{Introduction}
\input{intro}

For the chapters titled Abstract, Acknowledgements and List of Abbreviations, I'm using the command:

\*chapter{Chapter Name}

Any help as to how to get the page numbering correctly would be really appreciated. Thanks in advance !

EDIT: Page number of the section List of Tables have been corrected by using

\clearpage

after

\listoftables

Best Answer

In order for the chapter title and its corresponding entry in the ToC to have the same page number, the issue of \chapter* and \addcontentsline should be done on the same page (\chapter already includes a call to \addcontentsline so they will appear on the same page).

Using

\input{<chapter-file>.tex}
\addcontentsline{toc}{chapter}{<chapter title>}

will only work if the contents of <chapter-file>.tex doesn't exceed the setting of a single page. And this is rarely the case for a "chapter", in general.

Your solution would be one of the following approaches:

  1. Include the line

    \addcontentsline{toc}{chapter}{<chapter title>}
    

    as part of your <chapter-file>.tex immediately following the \chapter* command.

  2. If you don't have access to <chapter-file>.tex, or wish to keep the chapter text separate from layout constructions, you can also use

    \cleardoublepage
    \addcontentsline{toc}{chapter}{<chapter title>}
    \input{<chapter-file>}
    

    Since \addcontentsline doesn't set any content, the \chapter* issued within \input{<chapter-file>} will still occur on the same page and therefore provide the correct page within the ToC.

  3. Automate the process by using switches: \addstarchaptertotoc starts the insertion of \chapter*'s titles into the ToC while \removestarchapterfromtoc reverts to the old format where \chapter* is not added to the ToC.

    Here is the code you'd need to automate this process (with some help from xparse):

    \usepackage{xparse}
    
    \let\oldchapter\chapter % Copy \chapter into \oldchapter
    \NewDocumentCommand{\starchaptotoc}{s o m}{%
      \IfBooleanTF{#1}
        {\oldchapter*{#3}% \chapter*
         \addcontentsline{toc}{chapter}{#3}% Add chapter title to ToC
        }
        {\IfValueTF{#2}
          {\oldchapter[#2]{#3}}% \chapter[.]{..}
          {\oldchapter{#3}}% \chapter{..}
        }%
    }
    
    \newcommand{\addstarchaptertotoc}{\renewcommand{\chapter}{\starchaptotoc}}
    \newcommand{\removestarchapterfromtoc}{\renewcommand{\chapter}{\oldchapter}}
    

I'd probably go with option (2).