Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defernumbers causes problem in very specific case #568

Closed
moewew opened this issue Apr 23, 2017 · 3 comments
Closed

defernumbers causes problem in very specific case #568

moewew opened this issue Apr 23, 2017 · 3 comments
Assignees
Labels

Comments

@moewew
Copy link
Collaborator

moewew commented Apr 23, 2017

Via https://tex.stackexchange.com/q/366106/35864

Unfortunately, I could not reduce the MWe further, but even though it uses biblatex-chicago, the problem is with the defernumbers option.

\documentclass{article}
\usepackage[defernumbers=true,annotation,backend=biber,notes]{biblatex-chicago}

\DeclareBibliographyCategory{cited}
\AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@collection{author:main,
  location = {Somewhere},
  title = {Collection Title},
  publisher = {Publisher},
  editor = {The Editor},
  date = {9999}
}

@incollection{author:item,
  author = {The Author},
  title = {Item Title},
  pages = {999},
  crossref = {author:main}
}

@book{uncited:book,
  location = {Elsewhere},
  title = {Book Title},
  publisher = {Other Publisher},
  author = {Uncited Author},
  date = {9999}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}
Some text \autocite{author:item}.

\printbibliography[category=cited]% default title for `article` class: "References"
\printbibliography[title={Further Reading},notcategory=cited]
\end{document}

If compiled with

  1. LaTeX
  2. Biber
  3. LaTeX
  4. LaTeX

fails on the last step with

! Undefined control sequence.
<argument> ...xt@context }{\abx@field@localnumber

A few tests suggest that it has to do with https://github.com/plk/biblatex/blob/dev/tex/latex/biblatex/biblatex.sty#L7055 where is not defined when the thing is supposed to be written.

@plk
Copy link
Owner

plk commented Apr 23, 2017

Hmm, it seems only impact biblatex-chicago and that's fairly complex to diagnose. It should be fairly obvious - some option which gets into the code paths where localnumber isn't defined like omitnumbers or something ...

@moewew
Copy link
Collaborator Author

moewew commented Apr 23, 2017

I suppose it has to do with the fact that biblatex-chicago calls a cite command in the bibliography here. Many styles don't do that.

I'm not sure what happens, but we get to the point where we try to write \abx@field@localnumber to the aux even if it is undefined. I could fix the problem by adding a guard in https://github.com/plk/biblatex/blob/dev/tex/latex/biblatex/biblatex.sty#L7055 that checks if \abx@field@localnumber is defined. But I'm not sure if that is really what should be done, and if I'm treating the symptom or the real illness there.

@plk
Copy link
Owner

plk commented Apr 23, 2017

It's probably ok - I thought this was already dealt with as a year or so ago I had a similar issue with some other style doing similar things.

moewew added a commit to moewew/biblatex that referenced this issue Aug 8, 2017
plk added a commit that referenced this issue Aug 8, 2017
Guard against undefined localnumber (#568)
@plk plk closed this as completed Aug 12, 2017
@moewew moewew self-assigned this Aug 15, 2017
@moewew moewew added the bug label Aug 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants