2

As mentioned in the comments in Biblatex, citing with endnotes, ibid tracker gets thrown off, in the following biblatex will issue a cry wolf, issuing a warning that some citations were undefined.

\documentclass{scrartcl} 
\usepackage{enotez} 
\usepackage[style=authoryear-icomp,autocite=footnote,backend=biber]{biblatex} 
\addbibresource{biblatex-examples.bib} 
\let\footnote\endnote% 

\begin{document} 
Lorem\footcite{malinowski} 
\printendnotes 
\printbibliography 
\end{document}

How can I identify genuine warnings?

I thought about running without \let\footnote\endnote, checking there are no biblatex warnings, then changing back. My concern is that it is possible that I may run pdflatex insufficiently many times after changing back.

A plausible solution would be to redefine the behaviour of biblatex so that undefined citations are printed as ?? (or some other unique word) which I could search for in the pdf.

Hugh
  • 2,374
  • 17
  • 30
  • Parse the log file? Biblatex spews unnecessary warnings to console regardless. At least, it does for me. It worries incessantly about everything. Or change the \jobname for your test-run. Or use a tool which ensures recompilations are done if required. (None is perfect, of course.) – cfr Jun 29 '16 at 00:34
  • How do I parse it (in high-level terms)? If the log file is free of any Citation malinowksi undefined on line..., does that guarantee that all citations are defined? – Hugh Jun 29 '16 at 00:36
  • Have you looked at texloganalyzer? Some combination of that with grep or sed should work. – cfr Jun 29 '16 at 01:28
  • Thanks! I guess my comment before was 'what should I be grepping for?', – Hugh Jun 29 '16 at 02:30
  • Probably undefined and Citation. But it might be better to pull out all the Biblatex warnings with the -p option and then grep -v to get rid of the ones you know you don't want. This is probably a bit more annoying to set up, but you're less likely to lose something you needed to see. – cfr Jun 29 '16 at 02:40

1 Answers1

1

This issue was resolved in version 3.11 of biblatex. See https://github.com/plk/biblatex/issues/707

The problem here was that enotez writes the contents of endnotes to an external file. Normally biblatex's cite commands detokenize the entry keys, but this happens in an early step whose result is already expanded when the endnotes are written to the file. Upon reading from the file, the citation keys are not detokenized again. This leads to checks for rerun warnings giving incorrect results because the tokens have the wrong category codes. The solution was to detokenize keys more aggressively, so that they are also detokenized when read back from the enotez file.


If you are using an older version of biblatex and want to be able to search for genuinely undefined citation keys in your document you can try

\makeatletter
\def\blx@citeadd#1{%
  \ifcsdef{blx@keyalias@\the\c@refsection @#1}
    {\edef\blx@realkey{\csuse{blx@keyalias@\the\c@refsection @#1}}}
    {\def\blx@realkey{#1}}%
  \expandafter\blx@getrefcontext\expandafter{\blx@realkey}% needed for \ifdata
  \expandafter\blx@citation\expandafter{\blx@realkey}\blx@msg@cundefon
  \expandafter\blx@ifdata\expandafter{\blx@realkey}
    {\advance\blx@tempcnta\@ne
     \listeadd\blx@tempa{\blx@realkey}}
    {\ifnum\blx@tempcntb>\z@\multicitedelim\fi
     \expandafter\abx@missing\expandafter{\blx@realkey{} ???}%
     \advance\blx@tempcntb\@ne}}
\makeatother

This will add "???" to undefined citation labels, making them much easier to search for.

moewe
  • 175,683