Bug#293183: tetex-extra: spacing of footnotes with hyperref and pdflatex
Hello,
On Wed, Feb 02, 2005 at 12:25:30PM +0100, Frank Küster wrote:
> Arnaud Giersch <arnaud.giersch@free.fr> schrieb:
>
> > The following code exhibits a similar bug, using only standard article
> > class and \refstepcounter:
> >
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> > \documentclass{article}
> >
> > %\usepackage[pdftex]{hyperref}
> > %\usepackage[dvips]{hyperref}
> > %\usepackage{hyperref}
> >
> > \newcounter{a}
> > \newlength{\La}
> > \newlength{\Lb}
> >
> > \begin{document}
> >
> > \setlength{\La}{\textwidth}
> > \addtolength{\La}{-\parindent}
> > \settowidth{\Lb}{ hyphen}
> > \addtolength{\La}{-\Lb}
> >
> > \newcommand{\test}[1]{%
> > \par\rule{\La}{1pt} #1 \rule{5em}{1pt}.}
> >
> > \test{hyphenation}
> > \test{hyphenation\stepcounter{a}}
> > \test{hyphenation\refstepcounter{a}}
> >
> > \end{document}
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
A very good minimal example!
With \refstepcounter has to set an anchor. On the baseline it looks
poor, thus it is shifted by \Hy@raisedlink. This is implemented
by \smash that sets a box. Thus the example can be reduced to
the following plain-TeX file:
\hsize1mm
a hyphenation\par
a hyphenation\hbox{}
\bye
The box prevents the hyphenation.
A penalty cures the prevented hyphenation problem:
\makeatletter
\def\Hy@raisedlink#1{%
\setlength\HyperRaiseLinkLength\HyperRaiseLinkDefault
\HyperRaiseLinkHook
\ifvmode
#1%
\else
\penalty\@M
\smash{\raise\HyperRaiseLinkLength\hbox{#1}}%
\fi
}
\makeatother
But whether it will break other things?
I have added the patch in the next version.
With driver dvips the shifting is done at PostScript level.
> > In the third test the word "hyphenation" is not always hyphenated. In
> > the following table, you can see the results for different cases:
> >
> > * without hyperref;
> >
> > * with hyperref, without option (it loads automatically the "dvips"
> > driver with latex, and the "pdftex" driver with pdflatex);
> >
> > * with hyperref, with option specifying the driver to use
> > (i.e. "dvips" for latex, or "pdftex" for pdflatex).
> >
> > In the table, I note "correct" when the word is hyphenated, and
> > "wrong" when it is not.
> >
> > DVI (latex) PDF (pdflatex)
> > ----------------------------------------------------------
> > without hyperref correct correct
> > hyperref, no option wrong wrong
> > hyperref, with option correct wrong
> > ----------------------------------------------------------
> >
> > Note that the behavior is correct with hyperref when the "dvips"
> > option is given while it is not with the implicit behavior. This is
> > because the "dvips" option redefines \Hy@raisedlink{}, while it is not
> > the case when the default is used:
> >
> > \define@key{Hyp}{dvips}[true]{%
> > \def\Hy@driver{hdvips}%
> > \def\Hy@raisedlink{}%
> > \def\XR@ext{pdf}%
> > }
Thank you very much, Arnaud, this is indeed a bug and not intended.
It is fixed in the next version.
> > This particular point may be a Debian (or teTex) specificity: with the
> > upstream hyperref (as found on CTAN), the default driver is
> > "hypertex".
Because many want to generate PDF files, driver "dvips" is better.
Thus I introduced a possibility to change the default driver
by a configuration file (hyperref.cfg). Thus the default of
hyperref is still "hypertex" without pdfTeX and VTeX, but
if hyperref.cfg is used, there another driver can be specified.
Yours sincerely
Heiko <oberdiek@uni-freiburg.de>
Reply to: