# packages titlepage & biblatex don't work together

the following code works well:

\documentclass{scrbook}
\usepackage[british,ngerman]{babel}
\usepackage{blindtext}
\usepackage{titlepage}
\begin{document}
\begin{fullsizetitle}
\blindtext[13]
\end{fullsizetitle}
\end{document}


and same for this code:

\documentclass{scrbook}
\usepackage[british,ngerman]{babel}
\usepackage{blindtext}
\usepackage{biblatex}
\begin{document}
\begin{fullsizetitle}
\blindtext[13]
\end{fullsizetitle}
\end{document}


but both together

\documentclass{scrbook}
\usepackage[british,ngerman]{babel}
\usepackage{blindtext}
\usepackage{titlepage}
\usepackage{biblatex}
\begin{document}
\begin{fullsizetitle}
\blindtext[13]
\end{fullsizetitle}
\end{document}


give the error message:

Undefined control sequence. \begin{document}

• Where do you have the titlepage package from? It is not found on CTAN, making it a bit hard for us to help – daleif May 27 at 13:53
• I found this code here at StackExchange tex.stackexchange.com/questions/20177/… More information (in German) are given here: komascript.de/titlepage – Candu May 27 at 14:13
• Historically version mismatch can be a problem double check your versions see tex.stackexchange.com/questions/302800/… – user170109 May 27 at 14:38
• I installed TeX Live 2019 today. No updates are available.... – Candu May 27 at 14:55
• The uploaded .log is not complete and (maybe more importantly) it is not the .log of the MWE you posted here or on the KOMA-Script forum. Your .log loads scrreprt.cls, but the MWEs all use scrbook.cls. There are a few other differences in load order as well. Please run the shown MWE and upload the .log file for the MWE. If the MWE does not reproduce the issue change it so that it does. – moewe May 27 at 19:10

This is a very elusive bug in biblatex. After discussions in https://komascript.de/node/2242, the KOMA-Script developer reported the issue at https://github.com/plk/biblatex/issues/894 and suggested a possible fix that was added to biblatex with https://github.com/moewew/biblatex/commit/26c2072829d78447a9bb1931bd22662b34a19e18.

The issue should therefore be resolved in the next biblatex release (3.13).

The bug only occurred if the biblatex language module (the .lbx) for <language_1> inherits from <language_0> in a particular way and <language_0> is not loaded as a document language. In these cases biblatex would add an undefined macro to \extras<language_0>. Since <language_0> is not loaded, this macro would normally not be used and so this would not cause any issues. But titlepage uses \providecaptionname which hooks into \extras<language> in such a way that the undefined commands caused a problem.

In the specific case of the MWE british inherits from english, but english is not loaded. Still, biblatex writes undefined commands to \extrasenglish and \providecaptionname trips up.

The problem does not occur with ngerman because the inheritance setup between ngerman and german is slightly different, which means that the macros that end up undefined in the british case are actually defined here.

Until the version with the fix is released I can offer two workarounds

1. Just load english as well as british. (Be sure to get the load order/main language right.)

2. Incorporate the suggested fix into your preamble. Note that the fix should be removed from your preamble when a new version of biblatex is released. Hence the code block below will produce an error with upcoming biblatex releases.

\makeatletter
\@ifpackagelater{biblatex}{2019/05/28}
{\blx@error
{'\string\blx@maplang' fix no longer needed. Remove it}
{Remove the redefinition of '\string\blx@maplang' from your preamble}}
{\def\blx@maplang#1#2{%
\csgappto{extras#1}{%
\blx@resetpunct
\csuse{abx@extras@#2}%
\csuse{abx@strings@#2}}%
\csgappto{noextras#1}{%
\blx@resetpunct
\csuse{abx@noextras@#2}}}}
\makeatother