[Dev-luatex] LuaTeX doesn't discard empty paragraphs when textdir is used

Marcel Kr├╝ger tex at 2krueger.de
Mon Jun 21 16:54:36 CEST 2021


Hi,

consider the following plain LuaTeX document:

\textdir TRT
\noindent\par
\bye

without the `\textdir TRT` line or with `\textdir TLT`, this would lead
to "warning  (pdf backend): no pages of output.", but with the non
default "\textdir", it creates an empty (except for the page number) page
instead.

This can be avoided by setting \pardir too:

\textdir TRT\pardir TRT
\noindent\par
\bye

again produces no output, but adding a group around it reintroduces the
issue:

\begingroup
\textdir TRT\pardir TRT
\noindent\par
\endgroup
\bye

leads to an empty page.

Of course similar things happen not only for otherwise empty documents:
Instead of empty paragraphs disappearing, they add empty lines.

Together, this is not only inconsistent with other engines which always
discard empty paragraphs, but also leads to hard to predict behavior
(especially for users who are not familiar with the implementation of
LuaTeX's directional system), so I think it would be great if LuaTeX
could always remove such empty paragraphs.

Best,
Marcel


More information about the dev-luatex mailing list