Vincent Lefevre
2009-04-02 14:39:28 UTC
We have a LaTeX document (private, so that I can't provide a testcase
without doing much work first) using hyperref and with something like:
\newtheorem{example}{Example}
... Text with some floating tables ...
\begin{example}[Some text for first example]
\label{ex:decimal:decimal:1}
...
\end{example}
\begin{example}[Some text for second example]
... \ref{ex:decimal:decimal:1} ...
\end{example}
The problem is that the label ex:decimal:decimal:1 points to the
wrong page: the .aux file says page 109, whereas it should be
page 113. Note that there is a later example also with its own
label, which points to the correct page (page 114). So, this
problem seems to be purely local. I've tried adding \phantomsection
before the \label or the \begin{example}, but this does not change
anything.
The .aux file looks like this:
[...]
\citation{Erle2007}
\newlabel{ex:decimal:decimal:1}{{3}{109}{Section title\relax }{example.3}{}}
\@writefile{lot}{\contentsline {table}{\numberline {3.17}{\ignorespaces Table caption.}}{110}{table.3.17}}
\newlabel{tab:decimal:encoding}{{3.17}{110}{Table caption}{table.3.17}{}}
\@writefile{lot}{\contentsline {table}{\numberline {3.18}{\ignorespaces Table caption.}}{111}{table.3.18}}
\newlabel{tab:binary:encoding}{{3.18}{111}{Table caption}{table.3.18}{}}
\@writefile{lot}{\contentsline {table}{\numberline {3.19}{\ignorespaces Table caption.}}{112}{table.3.19}}
\newlabel{declet-to-decimal}{{3.19}{112}{Table caption}{table.3.19}{}}
\@writefile{lot}{\contentsline {table}{\numberline {3.20}{\ignorespaces Table caption.}}{112}{table.3.20}}
\newlabel{decimal-to_declet}{{3.20}{112}{Table caption}{table.3.20}{}}
\newlabel{ex:decimal:decimal:2}{{5}{114}{Decimal interchange format encodings\relax }{example.5}{}}
[...]
What's strange is that the tables are defined in the .tex file
*before* the examples. But perhaps pdflatex can decide their layout
only after seeing the beginning of the example. However I suppose
that it should have taken care of such problems.
Also, the page numbers for the tables are correct: page 110 contains
only Table 3.17, page 111 contains only Table 3.18, and page 112
contains both Tables 3.19 and 3.20 (and no text).
Is it a known problem? Is there anything we should do?
FYI, all the packages that are used:
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[pdftex]{graphicx}
\usepackage{rotating}
\usepackage{palatino}
\usepackage[scaled=0.85]{beramono}
\usepackage{url,lettrine}
\usepackage{amsthm,amssymb,amsmath}
\usepackage{color}
\usepackage{soul}
\usepackage{listings}
\usepackage{float}
\usepackage[titles]{tocloft}
\usepackage{array,longtable}
\usepackage{comment}
\usepackage{makeidx}
\usepackage{multirow,bigstrut}
\usepackage[table]{xcolor}
\usepackage{proof}
\usepackage{tocbibind}
\usepackage{caption}
\usepackage{algorithmic}
\usepackage{boxedminipage}
\usepackage{hyperref}
and package info from the log file:
Package: inputenc 2006/05/05 v1.1b Input encoding file
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
Package graphics Info: Driver file: pdftex.def on input line 90.
Package: rotating 1997/09/26, v2.13 Rotation package
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
Package: palatino 2005/04/12 PSNFSS-v9.2a (SPQR)
Package: beramono 2004/01/31 (WaS)
Package: url 2005/06/27 ver 3.2 Verb mode for urls, etc.
Package: amsthm 2004/08/06 v2.20
Package: amssymb 2002/01/22 v2.2d
Package: amsfonts 2001/10/25 v2.2f
Package: amsmath 2000/07/18 v2.13 AMS math features
Package: amstext 2000/06/29 v2.01
Package: amsbsy 1999/11/29 v1.2d
Package: amsopn 1999/12/14 v2.01 operator names
Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)
Package color Info: Driver file: pdftex.def on input line 130.
Package: soul 2003/11/17 v2.4 letterspacing/underlining (mf)
Package: listings 2004/10/17 1.3b (Carsten Heinz)
Package: float 2001/11/08 v1.3d Float enhancements (AL)
Package: tocloft 2003/09/26 v2.3c parameterised ToC, etc., typesetting
Package tocloft Note: The document has chapter divisions.
Package: array 2005/08/23 v2.4b Tabular extension package (FMi)
Package: longtable 2004/02/01 v4.11 Multi-page Table package (DPC)
Package: makeidx 2000/03/29 v1.0m Standard LaTeX package
Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
Package xcolor Info: Driver file: pdftex.def on input line 225.
Package: colortbl 2001/02/13 v0.1j Color table columns (DPC)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
Package xcolor Info: Model `RGB' extended on input line 1353.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
Package: tocbibind 2003/03/13 v1.5g extra ToC listings
Package tocbibind Note: The document has chapter divisions.
Package tocbibind Note: Using chapter style headings, unless overridden.
Package: caption 2007/01/07 v3.0k Customising captions (AR)
Package: caption3 2007/01/07 v3.0k caption3 kernel (AR)
Package caption Info: float package v1.3 (or newer) detected on input line 275.
Package caption Info: listings package v1.2 (or newer) detected on input line 3
Package caption Info: longtable package v3.15 (or newer) detected on input line
Package caption Info: rotating package v2.0 (or newer) detected on input line 3
Package: algorithmic 2006/06/02
Package: calc 2005/08/06 v4.2 Infix arithmetic (KKT,FJ)
Package: hyperref 2007/02/07 v6.75r Hypertext links for LaTeX
Package: kvoptions 2006/08/22 v2.4 Connects package keyval with LaTeX options (
Package hyperref Info: Hyper figures OFF on input line 2288.
Package hyperref Info: Link nesting OFF on input line 2293.
Package hyperref Info: Hyper index ON on input line 2296.
Package hyperref Info: Plain pages OFF on input line 2303.
Package hyperref Info: Backreferencing OFF on input line 2308.
Package hyperref Info: Bookmarks ON on input line 2444.
Package hyperref Info: Hyper figures OFF on input line 3102.
Package hyperref Info: Link nesting OFF on input line 3107.
Package hyperref Info: Hyper index ON on input line 3110.
Package hyperref Info: backreferencing OFF on input line 3117.
Package hyperref Info: Link coloring OFF on input line 3122.
Package: ragged2e 2003/03/25 v2.04 ragged2e Package (MS)
Package: everysel 1999/06/08 v1.03 EverySelectfont Package (MS)
Package caption Info: hyperref package v6.74m (or newer) detected on input line
Package hyperref Info: Link coloring OFF on input line 234.
Package: nameref 2006/12/27 v2.28 Cross-referencing by name of section
Package: refcount 2006/02/20 v3.0 Data extraction from references (HO)
Package hyperref Info: bookmark level for unknown program defaults to 0 on inpu
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package amsthm Warning: The \qedhere command may not work correctly here on inp
without doing much work first) using hyperref and with something like:
\newtheorem{example}{Example}
... Text with some floating tables ...
\begin{example}[Some text for first example]
\label{ex:decimal:decimal:1}
...
\end{example}
\begin{example}[Some text for second example]
... \ref{ex:decimal:decimal:1} ...
\end{example}
The problem is that the label ex:decimal:decimal:1 points to the
wrong page: the .aux file says page 109, whereas it should be
page 113. Note that there is a later example also with its own
label, which points to the correct page (page 114). So, this
problem seems to be purely local. I've tried adding \phantomsection
before the \label or the \begin{example}, but this does not change
anything.
The .aux file looks like this:
[...]
\citation{Erle2007}
\newlabel{ex:decimal:decimal:1}{{3}{109}{Section title\relax }{example.3}{}}
\@writefile{lot}{\contentsline {table}{\numberline {3.17}{\ignorespaces Table caption.}}{110}{table.3.17}}
\newlabel{tab:decimal:encoding}{{3.17}{110}{Table caption}{table.3.17}{}}
\@writefile{lot}{\contentsline {table}{\numberline {3.18}{\ignorespaces Table caption.}}{111}{table.3.18}}
\newlabel{tab:binary:encoding}{{3.18}{111}{Table caption}{table.3.18}{}}
\@writefile{lot}{\contentsline {table}{\numberline {3.19}{\ignorespaces Table caption.}}{112}{table.3.19}}
\newlabel{declet-to-decimal}{{3.19}{112}{Table caption}{table.3.19}{}}
\@writefile{lot}{\contentsline {table}{\numberline {3.20}{\ignorespaces Table caption.}}{112}{table.3.20}}
\newlabel{decimal-to_declet}{{3.20}{112}{Table caption}{table.3.20}{}}
\newlabel{ex:decimal:decimal:2}{{5}{114}{Decimal interchange format encodings\relax }{example.5}{}}
[...]
What's strange is that the tables are defined in the .tex file
*before* the examples. But perhaps pdflatex can decide their layout
only after seeing the beginning of the example. However I suppose
that it should have taken care of such problems.
Also, the page numbers for the tables are correct: page 110 contains
only Table 3.17, page 111 contains only Table 3.18, and page 112
contains both Tables 3.19 and 3.20 (and no text).
Is it a known problem? Is there anything we should do?
FYI, all the packages that are used:
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[pdftex]{graphicx}
\usepackage{rotating}
\usepackage{palatino}
\usepackage[scaled=0.85]{beramono}
\usepackage{url,lettrine}
\usepackage{amsthm,amssymb,amsmath}
\usepackage{color}
\usepackage{soul}
\usepackage{listings}
\usepackage{float}
\usepackage[titles]{tocloft}
\usepackage{array,longtable}
\usepackage{comment}
\usepackage{makeidx}
\usepackage{multirow,bigstrut}
\usepackage[table]{xcolor}
\usepackage{proof}
\usepackage{tocbibind}
\usepackage{caption}
\usepackage{algorithmic}
\usepackage{boxedminipage}
\usepackage{hyperref}
and package info from the log file:
Package: inputenc 2006/05/05 v1.1b Input encoding file
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
Package: graphics 2006/02/20 v1.0o Standard LaTeX Graphics (DPC,SPQR)
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
Package graphics Info: Driver file: pdftex.def on input line 90.
Package: rotating 1997/09/26, v2.13 Rotation package
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
Package: palatino 2005/04/12 PSNFSS-v9.2a (SPQR)
Package: beramono 2004/01/31 (WaS)
Package: url 2005/06/27 ver 3.2 Verb mode for urls, etc.
Package: amsthm 2004/08/06 v2.20
Package: amssymb 2002/01/22 v2.2d
Package: amsfonts 2001/10/25 v2.2f
Package: amsmath 2000/07/18 v2.13 AMS math features
Package: amstext 2000/06/29 v2.01
Package: amsbsy 1999/11/29 v1.2d
Package: amsopn 1999/12/14 v2.01 operator names
Package: color 2005/11/14 v1.0j Standard LaTeX Color (DPC)
Package color Info: Driver file: pdftex.def on input line 130.
Package: soul 2003/11/17 v2.4 letterspacing/underlining (mf)
Package: listings 2004/10/17 1.3b (Carsten Heinz)
Package: float 2001/11/08 v1.3d Float enhancements (AL)
Package: tocloft 2003/09/26 v2.3c parameterised ToC, etc., typesetting
Package tocloft Note: The document has chapter divisions.
Package: array 2005/08/23 v2.4b Tabular extension package (FMi)
Package: longtable 2004/02/01 v4.11 Multi-page Table package (DPC)
Package: makeidx 2000/03/29 v1.0m Standard LaTeX package
Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)
Package xcolor Info: Driver file: pdftex.def on input line 225.
Package: colortbl 2001/02/13 v0.1j Color table columns (DPC)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341.
Package xcolor Info: Model `RGB' extended on input line 1353.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
Package: tocbibind 2003/03/13 v1.5g extra ToC listings
Package tocbibind Note: The document has chapter divisions.
Package tocbibind Note: Using chapter style headings, unless overridden.
Package: caption 2007/01/07 v3.0k Customising captions (AR)
Package: caption3 2007/01/07 v3.0k caption3 kernel (AR)
Package caption Info: float package v1.3 (or newer) detected on input line 275.
Package caption Info: listings package v1.2 (or newer) detected on input line 3
Package caption Info: longtable package v3.15 (or newer) detected on input line
Package caption Info: rotating package v2.0 (or newer) detected on input line 3
Package: algorithmic 2006/06/02
Package: calc 2005/08/06 v4.2 Infix arithmetic (KKT,FJ)
Package: hyperref 2007/02/07 v6.75r Hypertext links for LaTeX
Package: kvoptions 2006/08/22 v2.4 Connects package keyval with LaTeX options (
Package hyperref Info: Hyper figures OFF on input line 2288.
Package hyperref Info: Link nesting OFF on input line 2293.
Package hyperref Info: Hyper index ON on input line 2296.
Package hyperref Info: Plain pages OFF on input line 2303.
Package hyperref Info: Backreferencing OFF on input line 2308.
Package hyperref Info: Bookmarks ON on input line 2444.
Package hyperref Info: Hyper figures OFF on input line 3102.
Package hyperref Info: Link nesting OFF on input line 3107.
Package hyperref Info: Hyper index ON on input line 3110.
Package hyperref Info: backreferencing OFF on input line 3117.
Package hyperref Info: Link coloring OFF on input line 3122.
Package: ragged2e 2003/03/25 v2.04 ragged2e Package (MS)
Package: everysel 1999/06/08 v1.03 EverySelectfont Package (MS)
Package caption Info: hyperref package v6.74m (or newer) detected on input line
Package hyperref Info: Link coloring OFF on input line 234.
Package: nameref 2006/12/27 v2.28 Cross-referencing by name of section
Package: refcount 2006/02/20 v3.0 Data extraction from references (HO)
Package hyperref Info: bookmark level for unknown program defaults to 0 on inpu
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
Package amsthm Warning: The \qedhere command may not work correctly here on inp
--
Vincent Lefèvre <***@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
Vincent Lefèvre <***@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)