6

I've got a problem with the soul package while adding a letter-spacing to a result of a command that is defined just like this:

\newcommand{\myCommand}{some text}

In the document I'd like to have the result of that command displayed with letter-spacing:

\par{\centering{\Huge
 \textbf{\myAnotherCommand{} \textsc{\so{\myCommand{}}}}
}\bigskip\par}

but I get "Package soul error: Reconstruction failed" and a black square after the text "some text". If I understand soul package documentation properly, it's a problem with "grouping hyphenatable material" or font switching commands, isn't it? Unfortunately, I've no idea how to fix it. Am I supposed to register some command with \soulregister?

I'd be grateful for any advice.

1 Answer 1

5

With pdflatex the most easy way to get letterspacing is via microtype

\usepackage{microtype}

...

\par
{\centering\Huge
 \textbf{\myAnotherCommand{} \textsc{\lsstyle \myCommand}}
 \par\bigskip}

This avoids the need to do all the involved tricks of soul. Letterspacing can be obtained via the package letterspace (included with microtype), but it doesn't hurt to load the bigger one (it's very advantageous, actually).

With XeLaTeX a similar effect can be obtained with

\addfontfeature{LetterSpace=2.0}

(the number can be chosen to suit one's needs):

\par
{\centering\Huge
 \textbf{\myAnotherCommand{} \textsc{\addfontfeature{LetterSpace=2.0} \myCommand}}
 \par\bigskip}

This particular combination might fail, because not all fonts family have a boldface small caps font.

1
  • Thanks for showing me another way to do that. It's really much simpler and works fine for me :)
    – Paulina R
    Jul 14, 2011 at 12:07

You must log in to answer this question.

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