## LaTeX forum ⇒ General ⇒ Problems 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

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:

\tf@toc=\write4
pdfTeX warning (ext4): destination with the same identifier (name{page.}) has b

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.

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Hi ppaulo,

\tf@toc=\write4
pdfTeX warning (ext4): destination with the same identifier (name{page.}) has b

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
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}
\capa
\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
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.

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

Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 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
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
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:

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

Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am
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.

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?

\renewcommand{\ABNTaddcontentsline}[3]%   {\ifthenelse{\boolean{ABNTNextOutOfTOC}}      {\setboolean{ABNTNextOutOfTOC}{false}}      {\phantomsection\addcontentsline{#1}{#2}{#3}}%      }

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

Me too!

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:

If you simply comment out the line redefining \thepage:
%\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: