[XeTeX] XeTeX, \XeTeXprotrudechars, \rpcode, etc.

Akira Kakuto kakuto at fuk.kindai.ac.jp
Tue Apr 15 12:55:58 CEST 2014


Dear Philip,

I found Corresponding ones in pdfTeX in the pdfTeX manual:

\pdfprotrudechars (integer)
Yet another way of optimizing paragraph breaking is to let certain characters
move into the margin (‘character protrusion’). When \pdfprotrudechars=1,
the glyphs qualified as such will make this move when applicable, without
changing the line-breaking. When \pdfprotrudechars=2 (or greater),
character protrusion will be taken into account while considering breakpoints,
so line-breaking might be changed. This qualification and the amount of shift
are set by the primitives \rpcode and \lpcode. Character protrusion is
disabled when \pdfprotrudechars=0 (or negative).
If you want to protrude some item other than a character (e.g. a \hbox),
you can do so by padding the item with an invisible zero--width character,
for which protrusion is activated.

\rpcode <font> <8-bit number> (integer)
The amount that a character from a given font may shift into the right
margin (‘character protrusion’) is set by the primitive \rpcode. The
protrusion distance is the integer value given to \rpcode, multiplied with
0.001em from the current font. The given integer value is clipped to the
range -1000..1000, corresponding to a usable protrusion range of -1 em..1 em.
Example:

\rpcode\somefont`,=200
\rpcode\somefont`-=150

Here the comma may shift by 0.2 em into the margin and the hyphen by 0.15 em.
All these small bits and pieces will help pdfTEX to give you better
paragraphs (use \rpcode judiciously; don’t overdo it).
Remark: old versions of pdfTEX use the character width as measure.
This was changed to a proportion of the em-width after Han The´ Thanh
finished his master’s thesis.

\lpcode <font> <8-bit number> (integer)
This is similar to \rpcode, but affects the amount by which characters
may protrude into the left margin. Also here the given integer value is
clipped to the range -1000..1000.

Best,
Akira





More information about the XeTeX mailing list