I need to print the et al. output from \textcite{} (biblatex Pkg) in italics. As stated in this answer this can be achieved by using \xpatchbibmacro{} from the xpatch package.
Having this command either in the document itself or in a cls file providing a latex2e class works without problems. Though, when using the command in an ExplClass the patching stops working.
Is there anything one can do to make the patching work in an ExplClass, or should this be reported as bug to the xpatch maintainer(s)?
MWE
Compilable tex file
\documentclass{TestExplClass}
\addbibresource{biblatex-examples.bib}
\begin{document}
\textcite{companion} \citeauthor{companion}
\printbibliography
\end{document}
The called cls file
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{ expl3 , xpatch }
\ProvidesExplClass
{TestExplClass}
{2017/10/22}
{0.1}
{Class that is having problems}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions\relax
\LoadClass{report}
\RequirePackage[english]{babel}
\RequirePackage{csquotes}
\RequirePackage[backend=biber,style=chem-angew]{biblatex}
\xpatchbibmacro{name:andothers}{\bibstring{andothers}}{\bibstring[\emph]{andothers}}{}{}
\endinput

Explclass here? Whichexpl3content is there? I can see none directly -- it is hidden of course inexpl3andxpatch. I can imagine that you get in trouble with the catcode regime ofexpl3here that lets\xpatchbibmacrofail... – Oct 22 '17 at 15:30clsfile with several hundred lines, just, as needed for an MWE I cut it down to the minimum where it stops working, in this is the (already) use of theExplclass itself. – lcnittl Oct 22 '17 at 15:34\xpatchbibmacro, but I really feel it is connected to\ExplSyntaxOnand\ExplSyntaxOff- regime. If you try\AtBeginDocument{\xpatchbibmacro{...}}it works as well as with by adding\ExplSyntaxOffjust before\xpatchbibmacroexplicitly (which is not meant this way by the developing team ofexpl3, however. I think the:inname:andothersconfusesexpl3possibly – Oct 22 '17 at 15:48xparse, or is usage ofAtBeginDocument{...}a (let's say) normal thing? Or rather a problem withexpl3? – lcnittl Oct 22 '17 at 15:53\AtBeginDocumentis pretty widely used. At lot of LaTeX code relies on the those\@begindocumenthookcontents added with\AtBeginDocument, e.g.hyperrefdoing a lot of redefinitions of\section,\labeletc. with\AtBeginDocument– Oct 22 '17 at 15:54