LaTeX forum ⇒ GeneralProblems with hyperref package

LaTeX specific issues not fitting into one of the other forums of this category.
ppaulo
Posts: 8
Joined: Sun Nov 16, 2008 11:42 pm

Problems with hyperref package

Postby ppaulo » Mon Nov 17, 2008 6:02 am

I'm trying to include links to websites in my document using the \href{*}{*} command, but actually i can't do that!

If i just include the "\usepackage{hyperref}" in my code it gets me and error saying:

(mestrado.toc)
\tf@toc=\write4
pdfTeX warning (ext4): destination with the same identifier (name{page.}) has b
een already used, duplicate ignored
<to be read again>

What is this "destination with the same identifier"?
Why i can't use this packege? I checked and i have it installed here!

I'm using Miktex and WinEdt.

Thanks in advance!

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Postby phi » Mon Nov 17, 2008 9:47 am

Hello,

could you please post a minimal working example to reproduce the error? Normally, the inclusion of hyperref doesn't produce errors.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Postby gmedina » Mon Nov 17, 2008 10:27 am

Hi ppaulo,

ppaulo wrote:(mestrado.toc)
\tf@toc=\write4
pdfTeX warning (ext4): destination with the same identifier (name{page.}) has b
een already used, duplicate ignored
<to be read again>

What is this "destination with the same identifier"?
...

In the meantime (while you post your MWE, as phi suggested), in the following link you can find information about the message that you are getting:
TeX-Frequently Asked Questions - PDFTeX destination ... ignored
1,1,2,3,5,8,13,21,34,55,89,144,233,...

ppaulo
Posts: 8
Joined: Sun Nov 16, 2008 11:42 pm

Postby ppaulo » Tue Nov 18, 2008 5:34 am

Thanks for helping me!

You can see a minimal code below: if i compile it i'll get the error.

\documentclass[a4]{abnt}
\usepackage[latin1]{inputenc}
\usepackage[brazil, english]{babel}
\usepackage{babelbib}
\usepackage[pdftex, dvips]{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{subfigure}
\usepackage{mathrsfs}
\usepackage{float}
\usepackage{hyperref}
\parindent 0pt

\begin{document}
\restylefloat{figure}

\selectlanguage{brazil}
\autor{abc}
\titulo{x}
\instituicao{y}
\local{Vitória - ES}
\data{2008}
\orientador{z}
\capa
\folhaderosto
\begin{resumo}
teste
\end{resumo}
\sumario
\chapter{Introdução}
teste
\chapter{Desenvolvimento}
teste
\end{document}


Thank you very much!

To compile it i think you must have abntex (http://abntex.codigolivre.org.br/).

ppaulo
Posts: 8
Joined: Sun Nov 16, 2008 11:42 pm

Postby ppaulo » Tue Nov 18, 2008 6:08 am

According the website (http://www.tex.ac.uk/cgi-bin/texfaq2htm ... perdupdest) :

"Some packages are simply incompatible with hyperref"
I've tried to remove almost all packages and it continues with the problem.

"you should load your package before you load hyperref"
I've tried this too but didn't worked...

I don't think it's a question of page numbers as they say there...but i don't have enought knowladge to say that...i'm just a begginer with latex.

Thanks!

ppaulo
Posts: 8
Joined: Sun Nov 16, 2008 11:42 pm

Postby ppaulo » Sun Nov 23, 2008 2:27 am

please? someone?

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Postby Juanjo » Sun Nov 23, 2008 4:50 am

ppaulo wrote:I don't think it's a question of page numbers as they say there...but i don't have enought knowladge to say that...i'm just a begginer with latex.

Yes, it is a question of page numbers, as said here. The abnt class redefines \thepage and changes values of the page counter for the first pages. Just write your document forgetting those warnings and check that links after the ToC are correct. And write to the authors of this class reporting this issue.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.

ppaulo
Posts: 8
Joined: Sun Nov 16, 2008 11:42 pm

Postby ppaulo » Sun Nov 23, 2008 7:08 am

Just write your document forgetting those warnings and check that links after the ToC are correct.


Can you please teach me how to do it? I can't compile my code with this problem, i think that that's an error, not a warning, isn't it?
And what is a ToC?

And write to the authors of this class reporting this issue.


I'll do it as soon as i solve the problem. =)

Thank you very much!!!

ppaulo
Posts: 8
Joined: Sun Nov 16, 2008 11:42 pm

Postby ppaulo » Sun Nov 23, 2008 7:24 am

I've just checked and, yes, i can compile and generate a pdf file with this "error" (and you were right! it's not an error, it's a warning!)!

The links are correct! Except from the references link, that points to the last chapter!

I'll be reporting this problem to the abntex people!

About the Toc, i don't know exactly what is it, but i checked that during the compilation of the code, a file called *.toc is created.

My .toc generated is this one:

  1. \select@language {english}
  2. \select@language {english}
  3. \select@language {brazil}
  4. \contentsline {chapter}{\numberline {1}Introdu\c c\~ao}{5}{chapter.1}
  5. \contentsline {section}{\numberline {1.1}Ontologias}{5}{section.1.1}
  6. \contentsline {section}{\numberline {1.2}ITU Telecommunication Standardization Sector}{5}{section.1.2}
  7. \contentsline {chapter}{\numberline {2}Desenvolvimento}{7}{chapter.2}
  8. \contentsline {section}{\numberline {2.1}Prot\'eg\'e}{7}{section.2.1}
  9. \contentsline {section}{\numberline {2.2}ITU-T Rec. 805 - Arquitetura Funcional Gen\'erica da Rede de Transporte}{7}{section.2.2}
  10. \contentsline {section}{\numberline {2.3}ITU-T Rec. 872 - Arquitetura de Redes \'Opticas de Transporte}{8}{section.2.3}
  11. \contentsline {section}{\numberline {2.4}Plataforma LightPad}{8}{section.2.4}
  12. \contentsline {chapter}{\numberline {3}Resultados Esperados}{9}{chapter.3}
  13. \contentsline {chapter}{\numberline {4}Trabalhos Futuros}{10}{chapter.4}
  14. \contentsline {chapter}{Refer\^encias}{11}{chapter.4}


I can see that the last line, that refers to the references, links to chapter 4. Is there any way to make it link to the references?

Thak you very much! Every day i'm learning more about latex and liking it even more! ;)

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Postby Juanjo » Sun Nov 23, 2008 11:43 pm

ppaulo wrote:I've just checked and, yes, i can compile and generate a pdf file with this "error" (and you were right! it's not an error, it's a warning!)!

Errors stop compilation, warnings don't, as you can see.
ppaulo wrote:The links are correct! Except from the references link, that points to the last chapter!

The problem only affected to the few first pages, so links to most of the document pages should be correct.
ppaulo wrote:I'll be reporting this problem to the abntex people!

This will help others. Report the issue and refer to this thread. See below for an additional comment. They may also be interested in this other thread, which also concerns abnTeX.
ppaulo wrote:About the Toc, i don't know exactly what is it, but i checked that during the compilation of the code, a file called *.toc is created.

ToC is just "Table of Contents". I've wanted to save some keystrokes ;) :lol:
ppaulo wrote:My .toc generated is this one:
...............
I can see that the last line, that refers to the references, links to chapter 4. Is there any way to make it link to the references?

After loading hyperref, copy this in the preamble:
  1. \renewcommand{\ABNTaddcontentsline}[3]%
  2. {\ifthenelse{\boolean{ABNTNextOutOfTOC}}
  3. {\setboolean{ABNTNextOutOfTOC}{false}}
  4. {\phantomsection\addcontentsline{#1}{#2}{#3}}%
  5. }

ppaulo wrote:Thak you very much! Every day i'm learning more about latex and liking it even more! ;)

Me too! :D

Coming back to the problem with hyperref, it seems it comes from the following piece of code inside abnt.cls, which is in effect with the default options:
  1. .................................
  2. \let\ABNToldendtitlepage\endtitlepage\relax
  3. \renewcommand{\endtitlepage}{\ABNToldendtitlepage\addtocounter{page}{1}}
  4. \pagestyle{empty}
  5. \renewcommand{\thepage}{}
  6. \renewcommand{\chaptertitlepagestyle}{empty}
  7. \renewcommand{\ABNTBeginOfTextualPart}%
  8. {%
  9. \renewcommand{\thepage}{\arabic{page}}
  10. \ifthenelse{\boolean{ABNTheader}}
  11. ............................

If you simply comment out the line redefining \thepage:
  1. %\renewcommand{\thepage}{}

the problem disappears. This line is superfluous: since the pagestyle is empty in the first pages, there is no need of "hiding" the page number by redefining \thepage.

Some final remarks concerning the code in your second post:
  • Remove \usepackage{amsfonts}; amsfonts is already loaded by amssymb
  • the subfigure package has been superseded by subfig; you can also use subcation instead (see the documentation of the caption package).
  • Remove options when loading graphicx (so simply write \usepackage{graphicx}). LaTeX will find the right driver.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.


Return to “General”

Who is online

Users browsing this forum: No registered users and 8 guests