[luatex] reverse node lists

Heiko Oberdiek heiko.oberdiek at googlemail.com
Tue Nov 1 12:36:35 CET 2011

On Tue, Nov 01, 2011 at 12:04:28PM +0100, Patrick Gundlach wrote:

> Am 01.11.2011 um 10:03 schrieb Arno Trautmann:
> > p.s.: as I'm already writing about silly manipulations, I have two more ?useless? questions:
> > ? I want to rotate a page after it has been completed. Could anyone give me a hint where to start for this? (callbacks, how to rotate a box? ?)
> > ? I'd like to rotate single glyphs by an arbitrary angle. Is this possible with Lua code, after line breaking? Or would I have to create a new font for that?
> You can insert a whatsit/pdf_literal node before and after the glyph/box
> you want to rotate. IIRC the "cm" operator (use with q...Q) does exactly
> what you want.

I would prefer pdf_save+pdf_setmatrix ... pdf_restore. Using
pdf_setmatrix gives LuaTeX the chance to calculate correct
values for destinations and annotations. A rotation using
\rotatebox{...} with pdftex.def gives an example. (In especially
the rotation is done without moving TeX's position to avoid
that TeX's position management gets out of sync with the
PDF position after the rotation.

Yours sincerely
  Heiko Oberdiek

More information about the luatex mailing list