[luatex] reverse node lists
Heiko Oberdiek
heiko.oberdiek at googlemail.com
Tue Nov 1 23:36:03 CET 2011
On Tue, Nov 01, 2011 at 09:58:22PM +0100, Arno Trautmann wrote:
> Heiko Oberdiek wrote:
> >On Tue, Nov 01, 2011 at 06:07:59PM +0100, Arno Trautmann wrote:
> >>Heiko Oberdiek wrote:
> >>>A rotation using
> >>>\rotatebox{...} with pdftex.def gives an example.
> >>
> >>There's no \rotatebox in pdftex.def, neither a \Grot at box@kv or
> >>anything. But I guess that's not what you meant?
> >
> >Package graphics+pdftex.def.
>
> Ok, I've tried to understand the definition of \rotatebox and what's
> going on, and partially was successfull ? but I don't see how that
> can help me here now ? if it's only about using pdf_save and
> _restore, I get along now.
Put your stuff in a box and use \showbox wit
\showboxdepth=\maxdimen and \showboxbreadth=\maxdimen.
That should help in analyzing what's going on.
> Anyhow, for the following I stuck to pdf_literal (I want to use the
> last two parameters of cm later),
I wouldn't use them unless you *know* what you are doing.
> but get the same result with
> _save, _setmatrix and _restore. And I don't like the result: In the
> first line of the second paragraph, I use the rotation once, which
> results in a shift of the /second/ line by the width of the rotated
> glpyh to the left. The third line is shifted even more, as in the
> second line I have more rotations (all uppercase letters). Something
> goes terribly wrong here, but I do not manage to understand my
> mistakes. So, I'd be happy for any explanation about what's going on
> here ?
The change of the transfer matrix (\pdfliteral or \pdfsetmatrix)
is done at PDF level, the TeX engine doesn't know this.
To avoid problems, the trick is to use "save" and "restore"
at the *same* position. \pdfrestore also prints a warning
if the position of the previous \pdfsave does not match.
Then at \pdfrestore the position of PDF and TeX are the same.
Yours sincerely
Heiko Oberdiek
More information about the luatex
mailing list