1

This question already has an answer here:

I have some issues with classicthesis' \spacedlowsmallcaps command that I could bring down to the following MWE:

\documentclass{scrartcl}

\usepackage{microtype}

\newcommand{\spacedword}[1]{\textls[150]{#1}}

\begin{document}
    Hello! $abc = def + ghi$

    \spacedword{Hello! $abc = def + ghi$}

    Hello! $abc = def + ghi$
\end{document}

The first line is displayed as it should. The second line as well with larger spacings between the characters. However, in the third line, the text "Hello!" is shown as it should be (with normal spacing), but the formula in the math mode is still spaced.

As it was shown here, this is a known bug. In the first answer, it was suggested to use the following command after \textls:

\makeatletter\let\glb@currsize\@empty\makeatother

However, is there a possibility to incorporate this workaround into the command spacedword such that I do not have to care about the bad spacing any more? This would be the preferred solution since I use \textls quite a lot. Simply adding it into the command definition does not work, likely due to makeatletter/makeatother parsing issues.

Update: Okay, next problem. Consider the following MWE:

\documentclass{scrreprt}

\usepackage{etoolbox}
\usepackage{microtype}
\usepackage{textcase}


% From classicthesis.sty:
\DeclareRobustCommand{\spacedlowsmallcaps}[1]{\sffamily\textls[80]{\scshape\MakeTextLowercase{#1}}}
% From arsclassica.sty:
\renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}%
\bfseries\spacedlowsmallcaps{#1}}


% New Workaround:
\makeatletter
\let\OldSpacedLowSmallCaps\spacedlowsmallcaps
\renewrobustcmd{\spacedlowsmallcaps}[1]{\OldSpacedLowSmallCaps{#1}\let\glb@currsize\@empty}
\makeatother


\begin{document}
    Hello $abc = def + ghi$

    \spacedlowsmallcaps{Hello $abc = def + ghi$}

    Hello $abc = def + ghi$

    \begin{description}
        \item[$x$] y
    \end{description}

    Hello $abc = def + ghi$
\end{document}

Thanks to the solution suggested by Ulrike Fischer in the comments below, the first three lines look as they should. However, after the description environment, the rendering of the last line again breaks, i.e., the characters have too much space between them although the description x, which appears in spacedlowsmallcaps, is afterwards "repaired" by the wordaround.

marked as duplicate by egreg macros Jun 23 '16 at 9:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    The makeatletter must go before the newcommand: \makeatletter \newcommand{\spacedword}[1]{\textls[150]{#1}\let\glb@currsize\@empty} \makeatother – Ulrike Fischer Feb 5 '16 at 14:49
  • Thanks for the reply. I updated the original question with the next problem. – user1742364 Feb 5 '16 at 15:12
  • 3
    Always make complete examples, snippets are evil. – Ulrike Fischer Feb 5 '16 at 15:29
  • You are right. When I tried to build a MWE, I could not reproduce my error. However, now I managed to reproduce it and, again, edited the original question. – user1742364 Feb 10 '16 at 9:51
  • 1
    You need a \global before \let\glb@currsize\@empty. – Robert Feb 12 '16 at 22:36