[luatex] LuaTeX file almost 2.5x bigger

Paul Isambert zappathustra at free.fr
Mon Aug 9 13:28:19 CEST 2010

Selon Hartmut Henkel <hartmut_henkel at gmx.de>:

> Hi Paul,
> On Mon, 9 Aug 2010, Paul Isambert wrote:
> >
> > On the whole, nothing fascinating: InDesign uses Tm for expansion (and
> > move to the next like). Which was expected. The difference in result
> > is rather striking, though, but might be tied to differences in space
> > stretching/shrinking.
> very interesting, many thanks! In this example InDesign treats whole
> lines by only one Tm, so that all glyphs in one line have the same
> expansion. This gets much more busy in the page stream when characters
> have different \efcode values, so that glyphs within one line need
> different expansion, leading to the file size increase as seen in the
> discussed luatex examples. But as it looks, there should be no file size
> penalty with luatex over InDesign, if all characters have the same
> \efcode. The \efcode refinement can be seen as a quality feature for
> pdftex/luatex.
> Does InDesign also allow such variable glyph expansion by \efcode within
> one line?

If there is such an option, I haven't found it. I guess there isn't any.

Interestingly, the expansion step, if any, seems very small in InDesign. For
instance, on line 179:

9.8327 0 0 10 85.0394 685.8898 Tm

which translates as .98327 ... Tm for us (there must be a scaling somewhere but
I can't find it); pdfTeX's step is as least 1, i.e. one thousandth... although I
guess you can use decimal values in LuaTeX's fonts.expansions table?

Now, you can set TeX's spacing to InDesign's values, which are much more

\spaceskip=3.33333pt plus 1.1pt minus 0.66666pt

This represents 133% stretch and 80% shrink (whereas TeX's default plus
1.66666pt minus 1.11111pt is 150% stretch and 67% shrink, if I'm not mistaken).

The results are then similar in the expanded text: TeX produces one bad box in
the third paragraph, and InDesign too ("widow, an emergence from C, a titular
C,"). The difference is that InDesign creates an undefull line, whereas TeX
makes an overfull one (InDesign isn't allowed to create overfull boxes, I

In the non-expanded text, InDesign produces 12 bad boxes, pdfTeX 1, and LuaTeX
10... I understand the difference between InDesign and LuaTeX (TeX may avoid
several undefull boxes with one overfull one, so actually there's no real
difference), but I don't understand the difference between LuaTeX and pdfTeX. I
know difference in justification are supposed to occur, but is it normal to this


More information about the luatex mailing list