[XeTeX] Letter-spacing

Bruno Voisin bvoisin at mac.com
Fri Jun 15 11:38:49 CEST 2007


Le 15 juin 07 à 11:06, John Was a écrit :

> As I suspected might be the case, the soul package (letter-spacing and
> underlining) seems to work fine for ASCII characters but not  
> outside that
> range - it worked on some Hungarian but swallowed the e-double  
> acute when it
> got to it, and it swallowed all of the ancient Greek I tried it on  
> (just
> producing an empty space where the characters should be).  But for  
> ordinary
> text it might be useful since it allows localized spacing rather than
> invoking a fresh spaced version of an entire font.  And it would  
> certainly
> be a great asset if it were modified to take UTF-8 input.
>
> Incidentally, I just typed \input soul.sty to get it on the TeXLive
> distribution.  LaTeX users may have to load it as a package (I  
> haven't got
> to grips with LaTeX yet!).

The soul package seems to only know by default about a fixed list of  
accents:

\`, \', \^, \", \~, \=, \., \u, \v, \H, \t, \c, \d, \b, and \r

However, it includes a command \soulaccent for adding new accents (in  
your case double acute, apparently). See section 5 "Customization" of  
the doc soul.pdf. On the Mac and TeXLive-2007, it lives at /usr/local/ 
texlive/2007/texmf-dist/doc/latex/soul/soul.pdf.

This applies when using [Mapping=tex-text] to use TeX's traditional  
input such as \'e for accents. Have you tried using instead direct  
UTF-8 input, such as é, after making sure your text editor is set to  
use UTF-8 encoding? It's possible (but I'm not sure) that soul would  
not have then to consider non-ASCII characters in any special: with  
XeTeX's direct Unicode processing, these would just be standard  
characters from the current font.

An alternative, working also with both plain TeX and LaTeX, is  
tracking.sty (doc included as comments in the .sty file). Beware  
though: it uses devious macro trickery (such as the recursive \def 
\endlist{\endlist}), based on exercise 11.5 on p. 65 of the TeXbook  
and its answer on pp. 310-311, and isn't as robust or flexible as soul.

But in any case using a XeTeX primitive (the letterspace font  
modifier just mentioned by Will) would certainly be a better  
solution, delegating to the font what belongs to the font.

Bruno Voisin



More information about the XeTeX mailing list