[Tex/LaTex] How to add the roman page number of abstract and acknowledgement into table of contents

page-numberingtable of contents

In a table of contents the page number first starts from the "Introduction" page. I want it to start from "Abstract" using \section not \chapter. How do I achieve that?

\documentclass[11pt]{article}
\begin{document}
\pagenumbering{roman}
\section*{Abstract}
\section*{Acknowledgment}
\tableofcontents
\pagenumbering{arabic}
\section{Introduction}

Best Answer

By default, \section* adds nothing to the ToC. You have to add it manually:

enter image description here

\documentclass{article}
\begin{document}

\pagenumbering{roman}
\section*{Abstract}
\addcontentsline{toc}{section}{Abstract}
\clearpage

\section*{Acknowledgment}
\addcontentsline{toc}{section}{\protect\numberline{}Acknowledgement}
\clearpage

\tableofcontents
\clearpage

\pagenumbering{arabic}
\section{Introduction}

\end{document}

Here are some additional things you need to note:

  • \pagenumbering resets the page counter and changes the page display. However, in your example you've set it to roman and arabic on the same page. Only the last reference will be used as page numbering is only visible during page shipout.

  • Adding section-specific content to the ToC is achieved using

    \addcontentsline{toc}{section}{<stuff>}
    

    where <stuff> includes your \section* title. You may decide to align this (unnumbered) title with the other (numbered) titles or not. Abstract is not aligned and flush left, while Acknowledgement is aligned with the other section titles.

  • I've added \clearpage between every section so as to highlight the effect of the page numbering. This may differ from your actual implementation. Consider the effect of \pagenumbering though, as mentioned above.