2

Using \caps from the soul package with user-defined language shorthands generates an error. However, it works fine with language shorthands defined by babel itself, e.g. by using \usepackage[ngerman]{babel}.

Example:

\documentclass{article}
\usepackage[english]{babel} 
\useshorthands{"}
\defineshorthand{"~}{\textormath{\leavevmode\hbox{-}}{-}}
\usepackage{soul} 

\begin{document}
    \caps{LS"~2}
\end{document}
3
  • 2
    May I suggest to not use \caps, and use a real small caps font instead? This might even look better.
    – mafp
    Mar 14, 2013 at 14:20
  • @mafp, I use \caps to increase spacing with normal capitals or small caps font.
    – Aydin
    Mar 15, 2013 at 8:38
  • Letter spacing of a small caps font could also be increased with microtype, if this is an option for you.
    – mafp
    Mar 15, 2013 at 8:49

1 Answer 1

4

soul performs a little test to see if the german language has been loaded, so that the shorthand " is taken into account when parsing the string. Just add to the preamble:

\newcommand{\mdqoff}{}
1
  • Thanks. Also loading with \usepackage[ngerman,english]{babel} solves the problem.
    – Aydin
    Mar 15, 2013 at 8:44

You must log in to answer this question.

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