1

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}
\addcontentsline{toc}{section}{Abstract}
\newpage
\tableofcontents
\input{ListofFigures.tex}
\input{ListofTables.tex}
\newpage

In abstract.tex, the codes are:

\newpage
\flushleft
\section*{\hfill Abstract \hfill}
\justify
  • 3
    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. – Ulrike Fischer Sep 12 '18 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. – BambOo Sep 12 '18 at 16:40
1

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}
\addcontentsline{toc}{section}{Abstract}

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. – TYuan Sep 12 '18 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 '18 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. – TYuan Sep 12 '18 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 '18 at 17:26
  • I see. Thanks again for solving my problem. I appreciate it. – TYuan Sep 12 '18 at 18:25

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.