Within report
, the abstract
environment is set using within a titlepage
, which defaults to putting the content on its own page. So you have to insert the ToC-writing piece using some patching (supported via etoolbox
).
\documentclass{report}
\usepackage[paper=a6paper]{geometry}% Just for this example
\usepackage{lipsum,etoolbox}% http://ctan.org/pkg/{lipsum,etoolbox}
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\abstract}{\titlepage}{\titlepage% Insert ToC-writing after starting a titlepage
\addcontentsline{toc}{chapter}{Abstract}}{}{}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\begin{document}
\title{My Title}
\author{My Name}
\maketitle
\tableofcontents
\begin{abstract}
\lipsum[1]
\end{abstract}
\chapter{A chapter}
\end{document}
I've written the ToC-entry as a chapter
, just so the formatting seems consistent
\addcontentsline{toc}{chapter}{Abstract}
However, that can be changed to whatever you like.
Another way would be to write the ToC-entry within the abstract
environment - this ensures that it falls on the same page as the Abstract:
\begin{abstract}
\addcontentsline{toc}{chapter}{Abstract}
...
\end{abstract}
You can redifine the abstract:
\documentclass{report}
\newenvironment{multipleabstract}[1]
{\renewcommand{\abstractname}{#1}\begin{abstract}\thispagestyle{plain}}
{\end{abstract}}
\makeatletter
\renewenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else
\small
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\makeatother
\begin{document}
\begin{multipleabstract}{Abstract1}
...
\end{multipleabstract}
\newpage
\begin{multipleabstract}{Abstract2}
...
\end{multipleabstract}
\end{document}
Best Answer
Assuming that the abstract and acknowledgement contents is typeset using a
\chapter*{...}
, you could do the following:This will add a chapter-level (
chapter
) entry to the table of contents (toc
) without a chapter number (\numberline{}
).