ho-tex / oberdiek

Updating the oberdiek bundle
Other
16 stars 6 forks source link

hyperref changes spacing of \footnote #50

Closed nbeisert closed 5 years ago

nbeisert commented 5 years ago

Hi,

I noticed that using hyperref changes the default latex behaviour of \footnote as follows:

Latex removes any spaces at the beginning of the \footnote argument. This is implemented by the combination "\ignorespaces#1" in \@footnotetext. Presumably the intention is to ignore any line breaks after "\footnote{" which people may use to format the source file. The footnote mark will then be followed immediately by the footnote text without any space irrespectively of whether there are spaces following "\footnote{" or not.

Hyperref hooks into the macro \@footnotetext, adds some additional code into the argument before passing on to the original definition and thus masks out the \ignorespaces command. Therefore footnote marks and text are separated by a space depending on spaces in the latex source. This may spoil the uniform look of the footnote section.

In general, I would expect the usage of hyperref not to change the spacing behaviour of latex. It may or may not be desirable to change this behaviour, but e.g. I found no note concerning this change in the manual. Note that in either situation one can add or remove the space with additional latex code, so requesting the original latex behaviour does not break functionality.

The attached test file compares the default behaviour and provides some suggested replacement code for hyperref. Note that \@mpfootnotetext might have to be adjusted as well, I did not look into this.

relevant versions: hyperref 2018/09/30 v6.88a LaTeX2e <2018-04-01> patch level 5 (TeX Live 2018)

Best Regards, Niklas Beisert

test.zip test.pdf

u-fischer commented 5 years ago

Thanks for the report. That is actually a hyperref and not an oberdiek issue. It will be resolved with the next update of hyperref.