2

I have a problem with the Hyperref package: when one reference, in the footnote, starts at the bottom of one page and is extended to the second page, all the second page is considered as the reference. For example, here, the reference is "de Groot, Bondy and Schuitema, 2019" but because "Schuitema, 2019" is extended on the second page, in the footnote, all the second page is considered as the reference.... Would there be an easy way to fix this? Many thanks in advance.

enter image description here

Antoine
  • 33
  • 3
    As always on the site, please provide a full but minimal example that others can copy and test and which demonstratens the problem. Then we have a better idea as to what exactly you are doing. – daleif Oct 04 '23 at 08:45
  • I would try adding \interfootnotelinepenalty=10000 somewhere in your preamble, but without an MWE it is difficult to help. – Jes Oct 04 '23 at 09:29
  • 1
    The problem is even more general. In any case, the same thing happens if there is a page break in the link text. Here is an MWE. – hair-splitter Oct 04 '23 at 10:03
  • Sorry, I did not think about adding a MWE. But hair-splitter did (thank you for that). It seems the problem is not limited to me then? @Jes idea worked for the footnote... But I have the same problem outside footnotes, as well... – Antoine Oct 04 '23 at 10:29
  • 3
    you should always provide an example. Beside this check https://tex.stackexchange.com/a/671759/2388 – Ulrike Fischer Oct 04 '23 at 13:07

1 Answers1

0

There are two issues that I can see. The first one has to do with footnotes, whereas the second with page breaks within the text. Since I assume that these cases are not common, I found a workaround for both cases:

  1. For the footnotes, setting \interfootnotelinepenalty=10000 as proposed here: Footnote runs onto second page
  2. For the page breaks, enclosing the "target" text with an fbox does the trick, as this will prevent the text breaking.

Maybe the fbox approach also works with the footnotes, but I am unable to reproduce the issue by myself, so I cannot test it.

Here is an MWE with both workarounds.

\documentclass{article}
\usepackage{hyperref,lipsum}
\usepackage[style=mla,backend=bibtex]{biblatex}
\addbibresource{biblatex-examples.bib}
\interfootnotelinepenalty=10000
% Removes borders from fbox
\setlength{\fboxsep}{0pt}%
\setlength{\fboxrule}{0pt}%
\begin{document}
\lipsum[-5]
Suspendisse vel felis. Ut lorem lorem, interdum eu, tincidunt sit
\fbox{\href{https://tex.stackexchange.com}{link text hello world}} Furthermore, footnotes are feasible \footnote{Yes this is a long footnote as defined by whoever did it text text text text text text text~\cite{baez/article, kastenholz}}

\lipsum[-2]

\printbibliography \end{document}

Jes
  • 839
  • Why do you use \fbox? Why not \mbox instead? On the other hand, I think this is just avoiding the problem, not solving it. – hair-splitter Oct 04 '23 at 12:42
  • I did not remember that \mbox exists either, there is no other reason. I agree that this does not solve the issue, it presents a workaround around it. – Jes Oct 04 '23 at 12:51