Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
2  
May I suggest to not use \caps, and use a real small caps font instead? This might even look better. –  mafp Mar 14 '13 at 14:20
    
@mafp, I use \caps to increase spacing with normal capitals or small caps font. –  Aydin Mar 15 '13 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 '13 at 8:49
add comment

1 Answer 1

up vote 4 down vote accepted

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}{}
share|improve this answer
    
Thanks. Also loading with \usepackage[ngerman,english]{babel} solves the problem. –  Aydin Mar 15 '13 at 8:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.