I got a problem with the number issue in the Table of Content. My abstract has two pages (Page Vii and Viii). When I using the following codes, the generated pdf shows the number of the second page (Page Viii) in the table of content. There are no issues with tables and figures. The only issue is the number of the abstract. I really appreciate it if someone can help me to solve this issue. Thanks.

The codes are:

\input{Abstract.tex}
\newpage
\tableofcontents
\input{ListofFigures.tex}
\input{ListofTables.tex}
\newpage


In abstract.tex, the codes are:

\newpage
\flushleft
\section*{\hfill Abstract \hfill}
\justify

• Your \addcontentsline command is at the end of the abstract and so naturally inserts the page number of the end of the abstract in the table of contents. Sep 12, 2018 at 16:40
• Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Sep 12, 2018 at 16:40

Because the abstract occupies more than one page, you need to switch the ordering of two instructions in your code. Specifically, change

\input{Abstract.tex}


to

\addcontentsline{toc}{section}{Abstract}
\input{Abstract.tex}


To play it really safe, add \clearpage (or \newpage) instruction immediately before \addcontentsline{toc}{section}{Abstract}.

• I did what you wrote. It works. But, I got one Bad Boxe issue: [3] [4] [5]) [6] (Abstract.tex) Underfull \hbox (badness 10000) in paragraph at lines 8--35. Sep 12, 2018 at 16:54
• @TYuan - Please clarify what "I did what you wrote" entails. Are you referring to the suggestion to insert \clearpage before \addcontentsline{toc}{section}{Abstract}?
– Mico
Sep 12, 2018 at 17:01
• Yes. I insert \clearpage before that line. I referred to your suggestion. Thanks. By the way, what the meaning of badness 10000? Can you help me to solve the bad box issue? I appreciate it. Sep 12, 2018 at 17:10
• @TYuan - I can only guess that there's either an overfull or an underfull line somewhere on pages 3, 4, 5, or 6. Since that's before the abstract (which, according to your query, occupies pages 7 and 8), it must be related to code that you haven't shown so far -- and which I am therefore not able to comment on usefully.
– Mico
Sep 12, 2018 at 17:26
• I see. Thanks again for solving my problem. I appreciate it. Sep 12, 2018 at 18:25