[luatex] LuaTeX file almost 2.5x bigger

Paul Isambert zappathustra at free.fr
Sun Aug 8 11:07:56 CEST 2010


Selon Reinhard Kotucha <reinhard.kotucha at web.de>:

> Nevertheless, as Patrick pointed out, the reason that the file created
> by LuaTeX is so large is that each glyph is preceded by the TextMatrix:
>
>   0.98 0 0 1 226.832 147.716 Tm [<0057>]TJ
>   0.985 0 0 1 230.145 147.716 Tm [<0058>]TJ
>   0.98 0 0 1 235.264 147.716 Tm [<0055>]TJ
>   0.985 0 0 1 238.686 147.716 Tm [<0044>]TJ
>   0.98 0 0 1 242.624 147.716 Tm [<004F>]TJ
>   0.985 0 0 1 247.57 147.716 Tm [<0056>]TJ
>   0.98 0 0 1 251.064 147.716 Tm [<00B5004F>]TJ
>
> There is probably some room for improvements.  The TJ operator
> supports kerning already quite similar to dvips, which is very
> efficient.

By the way, and perhaps slightly off-topic, I've noted that pdfTeX uses the Td
operator to move to a new line, while LuaTeX uses a Tm. Since Td takes only two
arguments (it's just a translation) and Tm takes 6 (and of course (of course? in
the normal case at least) only the last two matter), this makes LuaTeX files
larger than pdfTeX files, although I don't know if the difference is
significant. What's the rationale behind this change of operator?

(LuaTeX has another difference: every line of text is a separate line of code in
the PDF, whereas pdfTeX produces very long lines; the Lua way is definitely more
readable, although I don't spend my time reading PDFs.)

Best,
Paul


More information about the luatex mailing list