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

Bug#176049: tetex-extra: Hyperref makes latex confuse labels after footnotes



Package: tetex-extra
Version: 1.0.2+20021025-5
Severity: normal
Tags: upstream

When I use the latex \label command after a \footnote command, the
created section numbers are wrong.  This only seems to happen when I use
the hyperref package.  The labels that are defined after a footnote
refer not to the section number, but to the footnote number instead.

Here is an example latex code:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\section{Section Heading}
\label{first}
\footnote{footnote 1}
\footnote{footnote 2}
\label{second}

First label, section \ref{first}.
Second label, section \ref{second}.
\end{document}

The resulting .dvi file reads approximately

1 Section Heading

1 2

First label, secion 1.  Second label, section 2.

(end of .dvi file)

I would expect both labels to refer to section 1 (the only existing
section).  Yet the command \ref{second} creates the output "2",
referring to the footnote 2.  This also happens when there is a lot of
text between the footnote and the \label marker.

The corresponding .aux file also contains a suspicious entry:

\@writefile{toc}{\contentsline {section}{\numberline {1}Section
Heading}{1}{section.1}}
\newlabel{first}{{1}{1}{Section Heading\relax }{section.1}{}}
\newlabel{second}{{2}{1}{Section Heading\relax }{Hfootnote.2}{}}

The entry for "second" should not have the "Hfootnote" tag, but rather
"section", as does the entry for "first".

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux because 2.4.20-686 #1 Sat Dec 21 15:58:35 EST 2002 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages tetex-extra depends on:
ii  dpkg                    1.10.9           Package maintenance system for Deb
ii  gsfonts                 6.0-2.1          Fonts for the ghostscript interpre
ii  perl-tk                 1:800.024-1.1    Perl module providing the Tk graph
ii  tetex-base              1.0.2+20021025-5 basic teTeX library files
ii  tetex-bin               1.0.7+20021025-8 teTeX binary files

-- no debconf information




Reply to: