biblatex icon indicating copy to clipboard operation
biblatex copied to clipboard

Make biblatex be able to detect pages where "ibid" at boundaries causes infinite compiler passes

Open dbitouze opened this issue 11 years ago • 10 comments

Currently, in case of infinite compiler passes due to "ibid" citations at page boundaries, biblatex just writes in the .log file:

Package biblatex Warning: Please rerun LaTeX.
(biblatex)                Page breaks have changed.

as seen with the following MCE:

\documentclass[12pt]{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{foo,
  author = {Author With a Very Long Name, An},
  editor = {Editor, An},
  title = {A Title},
  date = {2013-04-15}
}
\end{filecontents*}
\usepackage{blindtext}
\usepackage[backend=biber,style=authoryear-icomp]{biblatex}
%
\addbibresource{\jobname.bib}
%
\begin{document}
%
See \autocite{foo}.
%
\blindtext[3]
%
These words are only for demonstration purposes. These words are only
for demonstration purposes. These words are only for demonstration
purposes. These words are only for demonstration purposes. These words
are only for demonstration purposes. These words are only for
demonstration purposes. These words are only for demonstration
purposes. These words are only for demonstration purposes. These words
are only for demonstration purposes. These are
%
\autocite{foo} for demonstration purposes.
%
\printbibliography
\end{document}

It could be nice if biblatex would be able to stipulate relevant pages, as varioref package does: with the following MCE, second compilation fails with the error message:

! Package varioref Error: \vref or \vpageref at page boundary 1-2 (may loop).
\documentclass[12pt]{article}
\usepackage{blindtext,varioref}
\begin{document}
\blindtext[3]

These words are only for demonstration purposes. These words are only
for demonstration purposes. These words are only for demonstration
purposes. These words are only for demonstration purposes. These words
are only for demonstration purposes. These words are only for
demonstration purposes. These words are only for demonstration
purposes. These words are only for demonstration purposes. These words
are only for ... See table \vref{tab:example}

\begin{table}[htbp]
\centering
\begin{tabular}{l}
Test\\
\end{tabular}
\caption{Example Table}
\label{tab:example}
\end{table}
\blindtext
\end{document}

dbitouze avatar Apr 15 '13 09:04 dbitouze

This case seems artificial. When you encountered this problem in your actual document, did the citation text break across the page boundary or was it more akin to the setting described in this TeX.SE post (where the varioref approach won't work)?

aboruvka avatar Apr 15 '13 14:04 aboruvka

I don't see your point about artificiality of this MCE: this case could arise.

dbitouze avatar Apr 22 '13 16:04 dbitouze

The point of my comment was to collect more information on how you encountered this problem in the first place. There are a number of scenarios in which the re-run warning persists. One is covered by your MWE, where the output alternates between:

"<citation label> <text> <part of recurrent citation label <pagebreak> rest of label>"

and

"<citation label> <text> <pagebreak> <ibidem label>"

Another case mentioned by the TeX.SE post linked above is:

"<citation label> <text> <recurrent citation label> <text> <pagebreak>"

and

"<citation label> <text> <pagebreak> <text> <ibidem label>"

Your proposed solution borrowing from varioref would only address the first case, not the second. A good fix for this issue should at least cover the most likely scenarios. In your actual document, did the problem arise due to the first case, the second or some other setting?

aboruvka avatar Apr 22 '13 17:04 aboruvka

@dbitouze - did you have any more comments on this? I would like to either close this or decide what needs to be done ...

plk avatar Mar 15 '14 16:03 plk

@plk IMHO, this issue shouldn't be closed since, as said, the case I described could arise and would be very annoying, especially with long documents: long reruns, and difficulty to locate the involved citation. Hence a solution covering at least the case I described would be welcome.

dbitouze avatar Mar 16 '14 08:03 dbitouze

Checking the code, the approach currently taken by biblatex is rather different from that taken by varioref. A change will not be without risks. I suggest we delay this until after the TL2015 freeze then I take it.

josephwright avatar Mar 15 '15 20:03 josephwright

Ok, great - this would be beyond me.

plk avatar Mar 15 '15 20:03 plk

@plk A quick look at the code told me this was one for me :-)

josephwright avatar Mar 15 '15 20:03 josephwright

As did a quick look at the code tell me it wasn't for me ...

plk avatar Mar 15 '15 20:03 plk

I've encountered this problem multiple times writing my thesis. See this question on tex.stackexchange.com for detailed description.

katexochen avatar Jun 20 '22 08:06 katexochen