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

\abx@extras@<language> is added to \extra<language> without defining \abx@extras@<lanugage> #894

Open
komascript opened this issue May 27, 2019 · 1 comment

Comments

2 participants
@komascript
Copy link

commented May 27, 2019

If \extraslanguage is defined, biblatex adds \abx@extras@language to it without making sure, that \abx@extras@language is really defined. This results in an error message if \extraslanguage is executed but \abx@extras@english is not defined, e.g.

\documentclass{article}
\usepackage[british]{babel}
\def\extrasenglish{\def\testname{Test}}
\addto\extrasbritish{\extrasenglish}
\usepackage{biblatex}

\begin{document}
Test
\end{document}

results in an error message:

./test.aux:6: Undefined control sequence.
\extrasenglish ...@resetpunct \abx@extras@english 
                                                  \abx@strings@english 
l.6 \babel@aux{british}{}

Note, this is a simplified example. In reality the problem occurs, while testing whether or not a term definition is part of either \captionsenglish or \extrasenglish.

To solve the problem you could e.g., add \csname abx@extras@english\endcsname or \@namese{abx@extras@english} instead of \abx@extras@english.

moewew added a commit to moewew/biblatex that referenced this issue May 28, 2019

@moewew moewew added the bug label May 28, 2019

@moewew

This comment has been minimized.

Copy link
Collaborator

commented May 28, 2019

Thanks for reporting this. A first fix is at 26c2072. Since we have etoolbox available I went for \csuse and not \@nameuse or an unexpanded \csname ...\endcsname, but the effect should be the same.

That said, we should probably not add the macros at all if we don't load the language properly. ... edit: done in 9e50d57.


Workaround at https://komascript.de/node/2242. See also https://tex.stackexchange.com/q/492862/35864.

@moewew moewew added this to In Progress in biblatex 3.13 May 28, 2019

moewew added a commit that referenced this issue Jun 1, 2019

Add extras/strings only if necessary (#894)
It only makes sense to add \abx@extras@<lang> and \abx@strings@<lang>
to \extras<lang> for languages that are loaded properly (and not just
for inheritance reasons).
This avoids possibly undefined commands floating around.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.