plk / biblatex

biblatex is a sophisticated bibliography system for LaTeX users. It has considerably more features than traditional bibtex and supports UTF-8
507 stars 115 forks source link

newrefcontext breaks numeric styles #396

Closed moewew closed 8 years ago

moewew commented 8 years ago

I wanted to play around with labelprefix in the newest dev version of 3.4 and found that adding \newrefcontext[labelprefix=A] resets all numbers in citations to zero before \printbibliography.

See

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=numeric,backend=biber,defernumbers=true]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
\newrefcontext[labelprefix=A]
\cite{sigfridsson,worman}
\printbibliography
\cite{sigfridsson,worman}
\end{document}

examples 16, 17, and 19 in the docs didn't work for me either. The prefix is always dropped and with numeric citations I get only "0".


BTW: I find it quite confusing the \newrefcontext seems to take only an optional argument ([...]), but when I omit it, biblatex complains; is it really a mandatory argument?

dcpurton commented 8 years ago

Confirmed! Works for me now.

moewew commented 8 years ago

Things work now.

But it seems as though biblatex keeps writing the same lines to the .aux over and over again. This leads to a very long .aux file if there are many citations and the temporary files are not cleared regularly. (I don't know about performance problems here, could be an issue if the entire list has to be read back.) It also confuses latexmk since that monitors the .aux file for changes and only considers the document stable if the .aux file is, which here it is never. Maybe there could be some redundancy checking before writing a line to the .aux?

plk commented 8 years ago

I should check with latexmk - I haven't used it for a while. Should be ok now.

moewew commented 8 years ago

Yes, thank you! It works absolutely fine now.