[luatex] Direction of hbox inside math

Khaled Hosny khaledhosny at eglug.org
Mon Apr 12 20:02:52 CEST 2010


Currently, hbox inside math inherits math not text direction, so in this
example:

\textdir TRT text $\hbox{math}$
\bye

The "math" word will be set left-to-right. At first glance this looks
natural, but with more thought I think it should instead follow the text
direction. In Iran and Morocco, math is set from left-to-right but with
Arabic text (sin, cos, "if else" etc.) so it would be simpler if text
set inside hboxes followed the text not math direction. The other issue,
which what actually inclined me to think about this, is that many tex
code abuses math mode to typeset text, most notably latex's tabular
environment, as a result one either needs to always set mathdir the same
as textdir (which is not an option for many) or go through hoops
redefining many internal macros of latex kernel and many other "frozen"
packages, to get things work.

What do you think?

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer


More information about the luatex mailing list