I'm trying to alter \scshape
in XeLaTeX, but for some reason, three reasonable attempts (xpatch, \def, and \renewcommand) seem to have no effect whatsoever (only in XeLaTeX). A nonworking example is below (note that the 5 em space is just to make it clear when the redefinition is working, and obviously not intended for use in a real document):
\documentclass{article}
\usepackage{xpatch}
\xapptocmd{\scshape}
{\spaceskip=5em}
{}{}
%\let\myscshape\scshape
%\def\scshape{\spaceskip=5em\myscshape}
%\renewcommand{\scshape}{\myscshape\spaceskip=5em}
\begin{document}
\noindent\textsc{Test thing test}\\
\scshape Test thing test\\
\scshape\spaceskip=5em Test thing test
\end{document}
\scshape
might be protected. If you append to a hook (parameterless macro),\appto{\xscshape}{\spaceskip=5em >>\color{red}}
, it works; if you append to an unprotected macro,\newcommand\xscshape{\scshape}\xapptocmd{\xscshape} {\spaceskip=5em >>\color{red}} {}{}
, it also works. The prepends also work. If you pre/append to a command (=parametered macro, like\textsc
), the replacement text is per/appended to as expected.