[tlbuild] etex serious bug

Peter Breitenlohner peb at mppmu.mpg.de
Fri Apr 20 13:50:58 CEST 2012


On Fri, 20 Apr 2012, Vafa Khalighi wrote:

> I reported this bug a year ago to the author of etex:

Hi,

I don't remember having seen this, but anyway

> \noindent\beginR\indent
> And finally, a right-to-left paragraph, interrupted
> $$
> \predisplaydirection = 1
> x^2 + y^2 = z^2 \eqno(1)
> $$
> by a displayed equation that thinks the paragraph is left-to-right.
> (The reduced space above the equation looks like it may be a bug.)

This is an admittedly deplorable design feature, but I don't consider it a
bug.

The e-TeX manual lists the additional 'integer parameters'
   \predisplaydirection (text direction preceding a display)
but certainly doesn't say what happens when you modify the value.

======================

The problem is this:

(1) At the first '$$' e-TeX (a) does line-breaking for the partial
paragraph, (b) determines the visible part of the last (right-to-left) line
and sets \predisplaydirection=-1, and (c) enters display math mode.

(2) You set \predisplaydirection=1 and subsequent computations are done as
if that had always been the case.

(3) At the second '$$' e-TeX decides to use
   \abovedisplayshortskip = 0pt plus 3pt
instead of
   \abovedisplayskip = 12pt plus 3pt minus 9pt
based on these inconsistent \predisplaydirection values (and I don't see any
way to avoid this problem).

======================

Why do you want that the displayed equation thinks the paragraph is
left-to-right when it is in fact right-to-left?

Regards
Peter Breitenlohner <peb at mppmu.mpg.de>


More information about the tlbuild mailing list