PaulStanley / oscola-biblatex

Oscola is a style file for the biblatex bibliography system.
9 stars 7 forks source link

bug when using postnotes since update TeX Live 2020 #11

Closed ghost closed 3 years ago

ghost commented 4 years ago

Dear Paul,

I use postnotes with non-breaking spaces and get since the update to TeX Live 2020 (I believe) the following error. I use LuaLaTeX.

(/tmp/kile-livepreview.dgjiFv/test.bbl)
! Undefined control sequence.
l.1 RE%O%%EN%AT%ON\protect \unhbox \voidb
                                       @x \protect \penalty \@M \ {}%%
l.26 Text\footcite[Recommendation~40]{guide}.

! Undefined control sequence.
l.1 RE%O%%EN%AT%ON\protect \unhbox \voidb
                                       @x \protect \penalty \@M \ {}%%
l.26 Text\footcite[Recommendation~40]{guide}.

MWE

\documentclass[a4paper,10pt]{scrartcl}
\usepackage[backend=biber,style=oscola,ecli=true]{biblatex}
% \usepackage[backend=biber,style=verbose-ibid]{biblatex}

\begin{filecontents}[overwrite]{\jobname.bib}
@book{guide,
  langid = {english},
  title = {Guidelines on the protection of personal data processed through web services provided by {{EU}} institutions},
  url = {https://edps.europa.eu/sites/edp/files/publication/16-11-07_guidelines_web_services_en.pdf},
  shorttitle = {EDPS web services guidelines},
  date = {2016-11-07},
  institution = {European Data Protection Supervisor},
  pagination = {page},
  keywords = {eu},
}
\end{filecontents}

\addbibresource{\jobname.bib}

%opening
\title{Test}
\author{Author}

\begin{document}

\maketitle

\section{Footnote Test with Postnome}

Text\footcite[Recommendation~40]{guide}.

\end{document}

The problem goes away if I switch from oscola to verbose-ibid or if I change the postnote from [Recommendation~40] to [Recommendation 40].

Best,\ Robert

moewew commented 4 years ago

I'm pretty sure that this is the same bug as https://github.com/plk/biblatex/issues/962.

You can temporarily fix the issue by adding

\makeatletter
\long\def\blx@ifnum#1#2{%
  \begingroup
  \let\protect\@unexpandable@protect
  \uppercase{\edef\blx@tempa{#2}}%
  \ifx\blx@tempa\@empty
    \aftergroup\@secondoftwo
  \else
    \catcode`\@=11
    \catcode`\%=9
    \endlinechar\m@ne
    \everyeof{\noexpand}#1%
    \uppercase{\edef\blx@tempa{\scantokens{#2}}}%
    \ifx\blx@tempa\@empty
      \aftergroup\@firstoftwo
    \else
      \aftergroup\@secondoftwo
    \fi
  \fi
  \endgroup}
\makeatother

to your preamble, but you should really remember to delete it once biblatex 3.15 is out.

ghost commented 4 years ago

Thank you so much! I added this after loading the biblatex package and the document compiles now. :slightly_smiling_face:

moewew commented 3 years ago

The error was fixed upstream, the MWE from above compiles fine again. So I guess we can close this.