[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#580912: marked as done (hyperref: PDF output links to wrong page with doxygen-generated LaTeX)



Your message dated Mon, 28 Mar 2011 15:03:22 +0200
with message-id <20110328130322.GA7232@preusse-16223.user.cis.dfn.de>
and subject line Re: Bug#580912: hyperref: PDF output links to wrong page with doxygen-generated LaTeX
has caused the Debian Bug report #580912,
regarding hyperref: PDF output links to wrong page with doxygen-generated LaTeX
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
580912: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580912
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: texlive-latex-base
Version: 2009-8
Severity: normal

pdflatex creates a PDF file with links to the wrong page.
If instead I use latex+dvipdf I get correct links (on my
original file).

However after creating the minimal example below both pdflatex, and latex+dvipdf
produce the wrong links. Hence I think the bug is in hyperref package.

Steps to reproduce:
1. save bugreport.tex (the minimal input file below)
2.
$ pdflatex bugreport.tex
$ pdflatex bugreport.tex
$ pdflatex bugreport.tex
3. xpdf bugreport.pdf (or okular bugreport.pdf)
4. Click on the [pe_rawaddr] link

Actual results:
You are taken to the bottom of page 2, at 'buffer_pipe_done'.

Expected results:
You are taken to page 3, at 'pe_rawaddr', which is what you clicked on.

More details:
Initially I thought it is a bug in xpdf, and filed a libpoppler bug, but after
looking at the pdf I see it is pdflatex/hyperref's fault.

Here are the links:
/Names [(Doc-Start) 11 0 R (page.1) 10 0 R (page.2) 20 0 R (page.3) 32 0 R (ref1) 15 0 R (ref2) 26 0 R]
/Limits [(Doc-Start) (ref2)]

ref1 is obj 15, ref2 is obj 26.
Here are the objs:
15 0 obj <<
/D [18 0 R /XYZ 180.87 150.401 null]
>> endobj

26 0 obj <<
/D [18 0 R /XYZ 124.802 244.506 null]
>> endobj

They both point to obj 18, which is:
18 0 obj <<
/Type /Page
/Contents 19 0 R
/Resources 17 0 R
/MediaBox [0 0 595.276 841.89]
/Parent 14 0 R
/Annots [ 16 0 R ]
>> endobj

Which points to obj 19, which is the actual page:
19 0 obj <<
/Length 2357      
/Filter /FlateDecode

So 'ref1' and 'ref2' both point to the same page. However 'ref1' (pe_rawaddr)
should point to the next page!

The below "minimal" file is probably not really minimal, but if I try to remove
more things then the link starts working. It is especially sensitive to the
location of 'pe_rawaddr': it must be on a new page, but using \newpage just
right before it makes the link work! So apparently the page needs to be broken
automatically, not by \newpage.

I see Debian has v6.79a of hyperref, latest is 6.81a.
How do I try the latest one without overwriting the system wide hyperref?

-- Package-specific info:
If you report an error when running one of the TeX-related binaries 
(latex, pdftex, metafont,...), or if the bug is related to bad or wrong
output, please include a MINIMAL example input file that produces the
error in your report. Don't forget to also include minimal examples of
other files that are needed, e.g. bibtex databases. Often it also helps
to include the logfile. Please, never send included pictures!

If your example file isn't short or produces more than one page of
output (except when multiple pages are needed to show the problem),
you can probably minimize it further. Instructions on how to do that
can be found at

http://www.latex-einfuehrung.de/mini-en.html (english)

or 

http://www.latex-einfuehrung.de/mini.html (german)

##################################
minimal input file

\documentclass[a4paper]{article}
\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex,
            pagebackref=true,
            colorlinks=true,
            linkcolor=blue,
            unicode
           ]{hyperref}
\else
\usepackage[ps2pdf,
            pagebackref=true,
            colorlinks=true,
            linkcolor=blue,
            unicode
           ]{hyperref}
\fi
\makeatletter
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{0ex}%
   {-3.25ex plus -1ex minus -0.2ex}%
   {1.5ex plus 0.2ex}%
   {\normalfont\normalsize\bfseries}}
\makeatother
\newenvironment{DoxyReturn}[1]{}{}
\newenvironment{DoxyDesc}[1]{%
  \begin{list}{}{}%
  \item[#1]%
}{%
  \end{list}%
}
\newenvironment{DoxyParams}[1]{%
    \begin{description}%
}{%
    \end{description}%
}
\begin{document}
\begin{itemize}
  \setlength{\itemsep}{-3pt}
\item 
uint32\_\-t \hyperlink{ref1}{pe\_\-rawaddr} (uint32\_\-t rva)
\newpage
\item 
int32\_\-t {buffer\_\-pipe\_\-read\_\-stopped} (int32\_\-t id, uint32\_\-t amount)
\item 
uint32\_\-t {buffer\_\-pipe\_\-write\_\-avail} (int32\_\-t id)
\item 
uint8\_\-t $\ast$ {buffer\_\-pipe\_\-write\_\-get} (int32\_\-t id, uint32\_\-t size)
\item 
int32\_\-t {buffer\_\-pipe\_\-write\_\-stopped} (int32\_\-t id, uint32\_\-t amount)
\item 
int32\_\-t \hyperlink{ref2}{buffer\_\-pipe\_\-done} (int32\_\-t id)
\item 
int32\_\-t {inflate\_\-init} (int32\_\-t from\_\-buffer, int32\_\-t to\_\-buffer, int32\_\-t windowBits)
\item 
int32\_\-t {inflate\_\-process} (int32\_\-t id)
\item 
int32\_\-t {inflate\_\-done} (int32\_\-t id)
\item 
int32\_\-t {bytecode\_\-rt\_\-error} (int32\_\-t locationid)
\item 
int32\_\-t {jsnorm\_\-init} (int32\_\-t from\_\-buffer)
\item 
int32\_\-t {jsnorm\_\-process} (int32\_\-t id)
\end{itemize}
\subsubsection*{Variables}
\begin{itemize}
\item 
const uint32\_\-t {\_\-\_\-clambc\_\-match\_\-counts} \mbox{[}64\mbox{]}
\begin{itemize}\small\item\em Logical signature match counts. \item\end{itemize}\item 
struct {cli\_\-pe\_\-hook\_\-data} {\_\-\_\-clambc\_\-pedata}
\item 
const uint32\_\-t {\_\-\_\-clambc\_\-filesize} \mbox{[}1\mbox{]}
\item 
const uint16\_\-t {\_\-\_\-clambc\_\-kind}
\end{itemize}

\begin{itemize}
\item[Enumerator: ]\par
\begin{description}
\index{SEEK\_\-SET@{SEEK\_\-SET}!bytecode\_\-api.h@{bytecode\_\-api.h}}\index{bytecode\_\-api.h@{bytecode\_\-api.h}!SEEK\_\-SET@{SEEK\_\-SET}}\item[{\em 
}]set file position to specified absolute position \index{SEEK\_\-CUR@{SEEK\_\-CUR}!bytecode\_\-api.h@{bytecode\_\-api.h}}\index{bytecode\_\-api.h@{bytecode\_\-api.h}!SEEK\_\-CUR@{SEEK\_\-CUR}}\item[{\em 
}]set file position relative to current position \index{SEEK\_\-END@{SEEK\_\-END}!bytecode\_\-api.h@{bytecode\_\-api.h}}\index{bytecode\_\-api.h@{bytecode\_\-api.h}!SEEK\_\-END@{SEEK\_\-END}}\item[{\em 
}]set file position relative to file end \end{description}
\end{itemize}

\index{bytecode\_\-api.h@{bytecode\_\-api.h}!BytecodeKind@{BytecodeKind}}
\index{BytecodeKind@{BytecodeKind}!bytecode_api.h@{bytecode\_\-api.h}}
\paragraph[{BytecodeKind}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf BytecodeKind}}\hfill
Bytecode trigger kind \begin{itemize}
\item[Enumerator: ]\par
\begin{description}
\index{BC\_\-GENERIC@{BC\_\-GENERIC}!bytecode\_\-api.h@{bytecode\_\-api.h}}\index{bytecode\_\-api.h@{bytecode\_\-api.h}!BC\_\-GENERIC@{BC\_\-GENERIC}}\item[{\em 
}]generic bytecode, not tied a specific hook \index{BC\_\-LOGICAL@{BC\_\-LOGICAL}!bytecode\_\-api.h@{bytecode\_\-api.h}}\index{bytecode\_\-api.h@{bytecode\_\-api.h}!BC\_\-LOGICAL@{BC\_\-LOGICAL}}\item[{\em 
}]triggered by a logical signature \index{BC\_\-PE\_\-UNPACKER@{BC\_\-PE\_\-UNPACKER}!bytecode\_\-api.h@{bytecode\_\-api.h}}\index{bytecode\_\-api.h@{bytecode\_\-api.h}!BC\_\-PE\_\-UNPACKER@{BC\_\-PE\_\-UNPACKER}}\item[{\em 
}]a PE unpacker \end{description}
\end{itemize}


\subsubsection{Function Documentation}
\hypertarget{ref2}{
\index{bytecode\_\-api.h@{bytecode\_\-api.h}!buffer\_\-pipe\_\-done@{buffer\_\-pipe\_\-done}}
\index{buffer\_\-pipe\_\-done@{buffer\_\-pipe\_\-done}!bytecode_api.h@{bytecode\_\-api.h}}
\paragraph[{buffer\_\-pipe\_\-done}]{\setlength{\rightskip}{0pt plus 5cm}int32\_\-t buffer\_\-pipe\_\-done (int32\_\-t {\em id})}\hfill}
\label{ref2}
Deallocate memory used by buffer. After this all attempts to use this buffer will result in error. All buffer\_\-pipes are automatically deallocated when bytecode finishes execution. 
\begin{DoxyParams}{Parameters}
\item[{\em id}]ID of buffer\_\-pipe \end{DoxyParams}
0 on success 
\hypertarget{ref1}{
\index{bytecode\_\-api.h@{bytecode\_\-api.h}!pe\_\-rawaddr@{pe\_\-rawaddr}}
\index{pe\_\-rawaddr@{pe\_\-rawaddr}!bytecode_api.h@{bytecode\_\-api.h}}
\paragraph[{pe\_\-rawaddr}]{\setlength{\rightskip}{0pt plus 5cm}uint32\_\-t pe\_\-rawaddr (uint32\_\-t {\em rva})}\hfill}
\label{ref1}
Converts a RVA (Relative Virtual Address) to an absolute PE file offset. 
\begin{DoxyParams}{Parameters}
\item[{\em rva}]a rva address from the PE file \end{DoxyParams}
\begin{DoxyReturn}{Returns}
absolute file offset mapped to the {\ttfamily rva}, or PE\_\-INVALID\_\-RVA if the {\ttfamily rva} is invalid. 
\end{DoxyReturn}
\end{document}


##################################
other files

######################################
 List of ls-R files

-rw-r--r-- 1 root root 1661 May  9 14:34 /var/lib/texmf/ls-R
-rw-rw-r-- 1 root staff 4327 Apr 29 10:25 /usr/local/share/texmf/ls-R
lrwxrwxrwx 1 root root 29 Apr 14 17:47 /usr/share/texmf/ls-R -> /var/lib/texmf/ls-R-TEXMFMAIN
lrwxrwxrwx 1 root root 27 Apr 14 17:47 /usr/share/texmf-texlive/ls-R -> /var/lib/texmf/ls-R-TEXLIVE
lrwxrwxrwx 1 root root 27 Apr 14 17:47 /usr/share/texmf-texlive/ls-R -> /var/lib/texmf/ls-R-TEXLIVE
######################################
 Config files
lrwxrwxrwx 1 root root 20 Apr 14 17:47 /usr/share/texmf/web2c/texmf.cnf -> /etc/texmf/texmf.cnf
-rw-r--r-- 1 root root 10081 May  9 14:34 /var/lib/texmf/web2c/fmtutil.cnf
-rw-r--r-- 1 root root 24192 May  9 14:34 /var/lib/texmf/web2c/updmap.cfg
-rw-r--r-- 1 root root 15119 May  9 14:34 /var/lib/texmf/tex/generic/config/language.dat
######################################
 Files in /etc/texmf/web2c/
total 4
-rw-r--r-- 1 root root 283 Feb 28 06:15 mktex.cnf
######################################
 md5sums of texmf.d
3875bf0f4a53a29b7f247399dc9833e2  /etc/texmf/texmf.d/05TeXMF.cnf
6e82a3d4c00ae7e4f86aa8dcf9438cf3  /etc/texmf/texmf.d/15Plain.cnf
c60a084820a0b73e3bfbf2e90bda437c  /etc/texmf/texmf.d/45TeXinputs.cnf
ea33127256c6a9f37145ae5b16fdb80c  /etc/texmf/texmf.d/55Fonts.cnf
afccf1d3f87057411166a77c58e00bd1  /etc/texmf/texmf.d/65BibTeX.cnf
9da7c1c7b1eaf06f941af91f48a23068  /etc/texmf/texmf.d/75DviPS.cnf
7ae52efac46feb97010986e57877d12e  /etc/texmf/texmf.d/80DVIPDFMx.cnf
055e06548bac99958d8ab2dd1248f2b4  /etc/texmf/texmf.d/80tex4ht.cnf
37329819f1109e8a457e64b8b58fecdb  /etc/texmf/texmf.d/85Misc.cnf
a8952d594677235951d447665ec46e9c  /etc/texmf/texmf.d/90TeXDoc.cnf
bab3b7e578107f999fa1b0768994f6f8  /etc/texmf/texmf.d/95NonPath.cnf

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.34-rc5-00118-gf259493 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages texlive-latex-base depends on:
ii  dpkg                          1.15.7.1   Debian package management system
ii  tex-common                    2.07       common infrastructure for building
ii  texlive-base                  2009-8     TeX Live: Essential programs and f
ii  texlive-binaries              2009-5     Binaries for TeX Live
ii  texlive-common                2009-8     TeX Live: Base component

Versions of packages texlive-latex-base recommends:
ii  texlive-latex-base-doc        2009-8     TeX Live: Documentation files for 

texlive-latex-base suggests no packages.

Versions of packages tex-common depends on:
ii  debconf [debconf-2.0]         1.5.32     Debian configuration management sy
ii  dpkg                          1.15.7.1   Debian package management system
ii  ucf                           3.0025     Update Configuration File: preserv

Versions of packages texlive-latex-base is related to:
pn  tetex-base                    <none>     (no description available)
pn  tetex-bin                     <none>     (no description available)
pn  tetex-extra                   <none>     (no description available)
ii  tex-common                    2.07       common infrastructure for building

-- debconf information:
  tex-common/check_texmf_wrong:
  tex-common/check_texmf_missing:



--- End Message ---
--- Begin Message ---
On 09.05.10 Török Edwin (edwintorok@gmail.com) wrote:

Hi,

> pdflatex creates a PDF file with links to the wrong page.  If
> instead I use latex+dvipdf I get correct links (on my original
> file).
> 
This time I was really lazy anf simply forwarded the bug report to
upstream. Heiko responded promptly, here is his answer:

Because the "minimal" file contains lots of unreadable garbage, I
restrict myself to checking the first link \hyperlink{ref1}{...} and
the anchor setting \hypertarget{ref1}{...}.

The anchor setting is done at the end of the paragraph with "on
success " (including the space) as last words.  Then the whatsit with
the anchor setting follows.  The last line of the paragraph is at the
bottom of page 2.  Therefore it's correct that the link point to that
location (both pdflatex and latex/dvips/ps2pdf).

BTW. \label{ref1} refers to the previous \paragraph.  It can be
referenced by \hyperref[ref1]{...} (The internal anchor name is
different from "ref1".)

Result: Bug report closed, because a bug could not be found.
</quote>

I'm closing the "bug" in Debian too. Please blame doxygen if the
documents don't look as expected.

Thanks,
  Hilmar
-- 
sigmentation fault


--- End Message ---

Reply to: