1

I am using the abstract environment to write the abstract of a report (I am using the report class)

\begin{abstract}
\addcontentsline{toc}{chapter}{Abstract}
lorem ...
\end{abstract}

I want to add the abstract to my table of contents. Adding the line \addcontentsline{toc}{chapter}{Abstract} seems to work fine (it adds the abstract in the toc) but when I click on it (I am using the package hyperref) in the TOC I am redirected to the first page of the report instead of the abstract page. Maybe I should precise that I am using the option notitlepage of the class report (I have a custom title page done with a \begin{titlepage} ... \end{titlepage} instruction).

1
  • 2
    Search for \phantomsection in the manual of the hyperref package (type texdoc hyperref at a terminal prompt, then search in the PDF document that your system should open in reply).
    – GuM
    Aug 7, 2017 at 22:38

1 Answer 1

2

As @GuM suggested it in a comment, the solution is to use \phantomsection:

\begin{abstract}
\phantomsection
\addcontentsline{toc}{chapter}{Abstract}
lorem ...
\end{abstract}

This other question was particularly useful.

1
  • 1
    \phantomsection should precede \addcontentsline. Note that, even so, the target of the link is the first line of the abstract, not the title “Abstract”.
    – GuM
    Aug 8, 2017 at 0:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .