Hello, I think that displacement of a the of a math display is missing when \leqno is used in RTL paragraph.
I attached a patch. Here is a simple test code (it requires the cmr10 font): \catcode`\{=1\catcode`\}=2\catcode`\$=3 \directlua{tex.enableprimitives("",{"pardirection", "textdirection", "Umathquad"})} \tracingoutput=1\tracingonline=1 \showboxbreadth 16384 \showboxdepth 16384 \font\tenrm=cmr10 \textfont0=\tenrm \hsize=345pt\vsize=550pt\parfillskip=0.0pt plus 1.0fil \parindent=15pt\parskip=0pt plus1pt \Umathquad\textstyle=10pt \pardirection=1\textdirection=1 $$1 \leqno(1)$$ \end Udi
diff --git a/source/texk/web2c/luatexdir/tex/texmath.c b/source/texk/web2c/luatexdir/tex/texmath.c index 8b6138e7c..32c066daf 100644 --- a/source/texk/web2c/luatexdir/tex/texmath.c +++ b/source/texk/web2c/luatexdir/tex/texmath.c @@ -2590,11 +2590,16 @@ static void finish_displayed_math(boolean l, pointer eqno_box, pointer p) if (swap_dir) { if (math_direction_par==dir_TLT) { /*tex TRT + TLT + \leqno: (swap_dir=true, math_direction_par=TLT, l=false) */ + s = new_kern(d); + try_couple_nodes(s,eq_box); + try_couple_nodes(eq_box,r); + try_couple_nodes(r,eqno_box); + eq_box = s; } else { /*tex TLT + TRT + \leqno: (swap_dir=true, math_direction_par=TRT, l=false) */ + try_couple_nodes(eq_box,r); + try_couple_nodes(r,eqno_box); } - try_couple_nodes(eq_box,r); - try_couple_nodes(r,eqno_box); } else { if (math_direction_par==dir_TLT) { /*tex TLT + TLT + \eqno: (swap_dir=false, math_direction_par=TLT, l=false) */
_______________________________________________ dev-luatex mailing list -- dev-luatex@ntg.nl To unsubscribe send an email to dev-luatex-le...@ntg.nl