This is a follow-up to Use \fauxsc if small caps not avaiaible

I need to use the Chivo font but, for unknown reasons, when package microtype is used, only the first invocation of \textsc works as expected.

Besides, is there a way to extend the \fauxsc macro so that it can accommodate math?

Here is a MWE:



  \sbox0{\scshape x\xdef\testB{\the\font}}%
  \ifx\testA\testB\fauxsc{#1}\else{\scshape #1}\fi

\newcommand\fauxsc[1]{\fauxschelper#1 \relax\relax}
\def\fauxschelper#1 #2\relax{%
  \if\relax#2\relax\else\ \fauxschelper#2\relax\fi


With \verb+\testsc+

\textsc{Abc def}

\textsc{Ghi jkl} % Incorrect output when package microtype is used



\fauxsc{Abc def}

\fauxsc{Ghi jkl}


% \textsc{Case $x$ is odd} % Math (in this case, $x$) produces an error


enter image description here

  • 2
    The result of \fauxsc is not pretty anyway. Consider giving up with small caps.
    – egreg
    Feb 4 at 21:06

1 Answer 1


First of all, I agree with @egreg's comment that the faux small caps are far from pretty and I wouldn't recommend using them at all. That said, here's what happens and how to fix it:

The problem is a side effect of pdflatex's font expansion, which makes fonts unequal (in terms of \ifx). I've reported this here a year ago, but it's unclear whether anything will be done about it, or whether it should even be considered a bug.

There is a simple solution, however, which Hans proposed in the above mentioned thread, and that is to compare \fontname\font instead of \the\font, so:

  \sbox0{\scshape x\xdef\testB{\fontname\font}}%
  \ifx\testA\testB\fauxsc{#1}\else{\scshape #1}\fi

should yield the correct (albeit ugly) faux small caps.

  • Thank you for the fix!
    – user94293
    Feb 7 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .