[XeTeX] Letter-spacing

John Was john.was at ntlworld.com
Fri Jun 15 12:00:14 CEST 2007


The letter-spacing worked with à rather than \`a but I didn't investigate 
further.  It may well be possible to teach the package about all the 
non-standard characters one wants to use, though obviously it would be more 
convenient if this support were written into it in a Unicode-specific 
adaptation.  I'm not sure that I agree that invoking a completely new 
version of the font is the natural solution in most contexts (though it is 
clearly completely stable):  one might want to define a heading as 'Van Dyck 
centred, letter-spaced small capitals', where I guess providing a font in 
the document heading just for that purpose would be appropriate; but (for 
example) in continuous German or ancient Greek, if one wanted to use the 
traditional convention of letter-spacing (rather than italic) for emphasis, 
it would be more natural just to say \so{gesperrter Text}.  (Of course, you 
could define \so to call the spaced version of the font so it amounts to 
much the same thing!)

The underlining facility of the soul package can also be useful:  not that 
I'm a fan of underlining in most typographical situations, but it can be 
adapted to achieve striking through and overlining, both of which I've had 
to employ rather extensively in the past - when I used a rather cumbersome 
method that prevented automatic hyphenation.

Best


John

----- Original Message ----- 
From: "Bruno Voisin" <bvoisin at mac.com>
To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
Sent: Friday, June 15, 2007 10:38 AM
Subject: JunkEmail: Re: [XeTeX] Letter-spacing


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

_______________________________________________
XeTeX mailing list
postmaster at tug.org
http://tug.org/mailman/listinfo/xetex


More information about the XeTeX mailing list