[luatex] About \mathdir and \pardir

Vafa Khalighi vafa at users.berlios.de
Thu Apr 1 12:02:36 CEST 2010


If one defines,

\newif\if at RTL
\newif\if at RTLmaths
\def\paragraphdir{\if at RTL\pardir TRT \textdir TRT\else \pardir TLT \textdir
TLT\fi}
\def\mathsdir{\if at RTLmaths\mathdir TRT\else\mathdir TLT}
\everypar{\paragraphdir}
\everymath{\mathsdir}
\everydisplay{\mathsdir}
\def\setRTLmaths{\@RTLmathstrue}
\def\setLTRmaths{\@RTLmathsfalse}
\def\setRTL{\@RTLtrue}
\def\setLTR{\@RTLfalse}

But
 If you say,

\setRTLmaths
$$1+2=3$$

You see no LTR maths, no change. Further, if you have

\setRTL

This is a test.

Then you get the wrong behaviour; text direction is RTL but paragraph
direction is  not.

I think this behaviour is not correct. LuaTeX's direction primitives should
be accessible through \everypar, \everymath and \everydisplay primitives.

-- 
Best wishes,
Vafa Khalighi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20100401/2264fad6/attachment.html>


More information about the luatex mailing list