[XeTeX] Bidi equation numbering

Aryeh Weiss aryeh at cc.huji.ac.il
Tue Oct 6 15:58:01 CEST 2009


Thank you for your reply. Concerning the )I( appearance, Mehdi Omidali 
sent me a patch that fixed this, so that the parentheses now appear 
correctly.

This is the patch:

\makeatletter
\def\equation{\beginL$$\refstepcounter{equation}}
\def\endequation{\eqno \hbox{\@eqnnum}$$\endL\@ignoretrue}
\def\@eqnnum{{\normalfont \normalcolor
\if at RTL\beginR\fi(\theequation)\if at RTL\endR\fi}}
\makeatother


I tried the leqno option, but the equation number remained on the right.
I found that this is caused by the patched equation environment 
definition. If I remove it, then the leqno option works, but then I also 
get )1( instead of (1).

I attached a minimal example -- tex file and the resulting pdf, with the 
patch commented out. If the patch is included, then the parenthesis will 
be in the correct order, but the number will on the right.

Best regards
--aryeh

Vafa Khalighi wrote:
> 
>     I have a problem with the equation environment using bidi.sty. The 
> 
>     attached source and PDF output should show the problem. The equation 
>     number appears one the right side of the page, even when working RTL, 
>     and it appears as )I( .
> 
> 
> Can you send a minimal example that I can try and understand the issue 
> you are talking about. I believe there are things in RTL that reversing 
> them does not make sense. One example is equation numbers. In a normal 
> LaTeX document, equation numbers appear on the right and if you use 
> leqno option, they appear in the left. This should be absolutely 
> unchanged whether you are in RTL mode or in LTR mode. Now if you define 
> your fonts correctly, equation numbers as in your )I( example, should 
> appear correctly.
> 
>     Underneath these equation, is an example of how I shold what it to 
>     appear (ie, with the number left  justified, and with the parentheses 
> 
>     correctly placed.
> 
>      
> 
> 
> I do not agree with the equation being on the left. I believe, it should 
> be on the right. I actually think if the equation numbers with defualt 
> settings were on the left, then it would be really funny, what would you 
> then call leqno (so equations appear on the right as your taste shows)?
> 
> So if you like to have equations on the left, use leqno option.
> 
>     Also, note what happens to the English sentence in the RTL mode. The 
> 
>     sentence should read "We now insert an equation, still under setRTL." 
>     However, I assume that the correct thing to do is to switch to setLTR 
>     before this sentence if I want itto be set correctly.
> 
> I do not understand your point here. In RTL mode, we typeset from right 
> to left and in LTR mode, we typeset from left to right. If you need 
> short LTR insertions in RTL mode use \LRE{} and if you need short RTL 
> insertions in LTR mode, then use \RLE{}. In bidi, we make documents RTL 
> or LTR by using the \everypar primitive. For more details look at XeTeX 
> companion. You also can use grouping like:
> 
> {\setRTL
> 
> This is a sentense that appears RT.}
> 
> 
> This is a sentense that appears LTR.
> 
> 
> That blank line is vital to have.
> 
> 
> If you still think there is an issue, send a minimal example used two 
> fonts in it, one for Hebew and one for English and then I will look into 
> it to see if there is anything for me to investigate. But I think, you 
> should have no problem.
> 
> 
> 
>  


-- 
Aryeh Weiss
School of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384050

-------------- next part --------------
A non-text attachment was scrubbed...
Name: xetextest-1.pdf
Type: application/pdf
Size: 46836 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20091006/57b27ea3/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xetextest-1.tex
Type: application/x-tex
Size: 1898 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20091006/57b27ea3/attachment-0001.tex>


More information about the XeTeX mailing list