[luatex] reverse node lists
patrick at gundla.ch
Tue Nov 1 12:04:28 CET 2011
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. You need a bit of math, but that's not much more than school math (but I had to relearn everything as school was so long ago). To transform the page, you can probably use the AtBeginShi package (name?). Take a look at the code for the luacolor package.
More information about the luatex