Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  Tiago Veloso Dec 20 '10 at 15:58

2 Answers 2

up vote 4 down vote accepted

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 UK TeX FAQ.

share|improve this answer

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

\section*{\ackname}%

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

share|improve this answer
    
Thanks for noticing. I fixed it, but it still gives me the warnings. –  Tiago Veloso Dec 17 '10 at 8:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.