4

I am using a report document classe. I have an abstract and an acknowledgement sections before the toc.

This is my definition for Acknowledgements. I took it from someplace in the web, so there might be errors.

\makeatletter
\newcommand\ackname{Acknowledgements}
\if@titlepage
  \newenvironment{acknowledgements}{%
      \titlepage
      \null\vfil
      \@beginparpenalty\@lowpenalty
      \begin{center}%
        \bfseries \ackname
        \@endparpenalty\@M
      \end{center}}%
     {\par\vfil\null\endtitlepage}
\else
  \newenvironment{acknowledgements}{%
      \if@twocolumn
        \section*{\abstractname}%
      \else
        \small
        \begin{center}%
          {\bfseries \ackname\vspace{-.5em}\vspace{\z@}}%
        \end{center}%
        \quotation
      \fi}
      {\if@twocolumn\else\endquotation\fi}
\fi
\makeatother

Every time I compile my file I get the following:

(../abstract/abstract.tex)pdfTeX warning (ext4): destination with the same identifier (name{page.a}) has been already used, duplicate ignored
[1]) (../ack/root.texpdfTeX warning (ext4): destination with the same identifier (name{page.a}) has been already used, duplicate ignored

My guess is that its trying to typeset these two pages to the same page as the title page.

1
  • I am still having problems with this. Now I need two abstracts and I've noticed that the Abstract environment forces the page number reset. Dec 20, 2010 at 15:58

2 Answers 2

5

hyperref creates page anchors. Since you've got 2 pages with the same number, even if it might not be printed, you would get two anchors with the same name. If no page anchors are needed, pageanchor=false removed the anchors and the warning.

But if they are required, for instance for the index, you need another fix. One could switch it off and on:

\hypersetup{pageanchor=false}
\begin{document}
\maketitle
\begin{abstract}
...
\end{abstract}
\hypersetup{pageanchor=true}
...

Or check the definition of acknowledgements: what's the reason why you use the titlepage environment? This sets the page number (again) to 1. You could do it in another way, for example use \thispagestyle{empty} instead if your reason is to have a page without visible page number.

Further there are hyperref options for avoiding such problems: pdfpagelabels and plainpages=false are useful if page numbers repeat, though they don't help if \thepage is repeated. Have a look at Hyperref and repeated page numbers in the TeX FAQ.

0
1

A small correction in the \else branch should do the trick.

\section*{\ackname}%

In your version you have still \abstractname in this line.

1
  • Thanks for noticing. I fixed it, but it still gives me the warnings. Dec 17, 2010 at 8:57

You must log in to answer this question.

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