Using \ExplSyntaxOn breaks \xpatchbibmacro. Can this be fixed, or will I just need to use xpatch commands elsewhere?
MWE:
\documentclass{article}
\usepackage{expl3}
\usepackage{xpatch}
\usepackage[style=authoryear]{biblatex}
\begin{filecontents}[overwrite]{\jobname.bib}
@book{1person,
author = {John Smith},
title = {Some Random Thing},
date = {1970}
}
@book{2people,
author = {John Smith and Bob Smith},
title = {Some Other Thing},
date = {1971}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\nocite{*}
\DeclareNameAlias{sortname}{given-family}
\ExplSyntaxOn % Removing this fixes it...
\xpatchbibmacro{date+extradate}% Remove date's parentheses, add period before (/a/428193)
{\printtext[parens]}{\setunit*{\addperiod\addspace}\printtext}{}{}
\ExplSyntaxOff
\begin{document}
\printbibliography
\end{document}
\ExplSyntaxOn? – egreg Aug 13 '20 at 11:45l3keys, and there's a lot of conditional groups.\ExplSyntaxOncan't be put into groups, which forces me to split and double my conditionals. – TakingItCasual Aug 13 '20 at 11:47expl3syntax changes quite a few of them, so patching breaks. For example, if a command contains a~and then you patch it, it becomes a space inexpl3syntax. – Phelype Oleinik Aug 13 '20 at 11:49