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

2014-04-15 Thread Philip Taylor

Fine, many thanks Jonathan; will do.
** Phil.


Jonathan Kew wrote:


IIRC, hyperlinks are handled entirely at the pdf output driver level;
there are no xetex primitives involved. It's just a question of
inserting appropriate \special{pdf: ...} commands.

So try looking for dvipdfmx documentation about the \special commands it
supports, and the PDF spec if you need help with the exact PDF fragments
to insert. In particular,
http://project.ktug.org/dvipdfmx/doc/tb94cho.pdf might be helpful.




--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2014-04-15 Thread Akira Kakuto

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  <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  <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





--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex


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

2014-04-15 Thread Jonathan Kew

On 15/4/14 11:05, Philip Taylor wrote:

... and are
you also aware of any documentation discussing how hyperlinks
can be embedded using XeTeX, another apparently undocumented feature
that is successfully exploited by "hyperref", "eplain", etc., yet
for which no primitive-level documentation seems to exist.


IIRC, hyperlinks are handled entirely at the pdf output driver level; 
there are no xetex primitives involved. It's just a question of 
inserting appropriate \special{pdf: ...} commands.


So try looking for dvipdfmx documentation about the \special commands it 
supports, and the PDF spec if you need help with the exact PDF fragments 
to insert. In particular, 
http://project.ktug.org/dvipdfmx/doc/tb94cho.pdf might be helpful.


JK




--
Subscriptions, Archive, and List information, etc.:
 http://tug.org/mailman/listinfo/xetex