2
\documentclass[12pt]{article}
\usepackage[LY1]{fontenc}\usepackage[]{step}
\usepackage{lipsum}
\begin{document}
\lipsum
\end{document}

This gives different placement depending on engine, for some reason I cannot figure out (it's using the same Type 1 fonts no matter what). The different engines don't seem to want to break in the same place, and as a result, there is a one-line difference between the pages (the last line ending in "port-" is pushed to the next page in Lua/Xe). This doesn't seem to occur with other fonts (I tried with times and stix and got the same breaks across engines). What gives?

Page 1 with pdfLaTeX (same in DVI and PDF mode): Page 1 with pdfLaTeX (same in DVI and PDF mode)

Page 1 with LuaLaTeX and XeLaTeX:

Page 1 with LuaLaTeX and XeLaTeX

2

While luatex is known to be potentially incompatible with pdftex in terms of line breaking, this is actually not the case here. (Also, AFAIK xetex is supposed to yield the same line breaks.)

Rather, the difference lies in the value of \parindent. This gets fixed when the document class is loaded, when it is set to 1.5em (in size12.clo). Now, 1em translates to different lengths in pdftex on the one hand, and xetex/luatex on the other, because of the different default fonts: OT1/cmr, where 1.5em=17.62482pt, and TU/lmr, where 1.5em=18pt.

This small difference is enough for the first line of the third paragraph to be hyphenated differently.

The fix is to reset \parindent after the new default font is defined (ie. after \usepackage{step}):

\normalfont
\parindent=1.5em
2
  • Do you have a link to any documentation on LuaTeX line breaking changes? – d909 Jan 2 at 2:56
  • @d909 See the luatex manual, section 5.7 (Breaking paragraphs into lines) and the sections leading up to it. – Robert Jan 2 at 3:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.