[luatex] \latelua

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sun Jul 13 11:30:06 CEST 2014

Am 13.07.2014 10:01, schrieb Joseph Wright:

> the text "late" is inserted into the second page after "Second" but
> before "direct", while if I omit the \directlua call on page two "late"
> vanishes entirely. The manual does not give a lot away: is there a good
> explanation/set of demos somewhere?

\def\pdfsave{\latelua{pdf.print("page", "q\string\n")}}
\def\pdfrestore{\latelua{pdf.print("page", "Q\string\n")}}
    \gstatelevel=\currentgrouplevel \pdfsave \aftergroup\pdfrestore
\bf\pdflocal{0.5 g}{This is \pdflocal{0.6 g}{\it gray}} and this black!

With \latelua the color setting is written into the pdf during
shipout when the objects are also written.

Replace the \latelua with \directlua and have a look into the
created PDF. You'll see that the color setting was too early
written into the pdf.


More information about the luatex mailing list