[XeTeX] bidi, math, and amstext

Zdenek Wagner zdenek.wagner at gmail.com
Sat Sep 27 00:48:55 CEST 2014


2014-09-27 0:15 GMT+02:00 maxwell <maxwell at umiacs.umd.edu>:
> On 2014-09-26 16:01, Vafa Khalighi wrote:
>>
>> Not a bug. bidi package has a boolean \if at Latin. The boolean should be set
>> in higher level packages (like polyglossia) to true for non-RTL scripts
>> and
>> false for RTL scripts. Its initial value is false so that explains the
>> behaviour.
>
>
> Since we're not using polyglossia, should we be setting this variable
> ourselves?  I just now tried doing that:
>     \makeatletter
>     \@Latintrue
>     \makeatother
> and it seems to work.  However, I'm not sure how, without using Polyglossia,
> we should do this whenever we switch languages.  We never had to do that for
> other purposes--we just use
>      {\RL{some right-to-left stuff}}
>
> I guess we need to redefine \RL to be s.t. like this:
>     \makeatletter
>     \let\origRL\RL
>
> \renewcommand{\RL}[1]{\makeatletter\@Latinfalse\makeatother{\origRL{#1}}\makeatletter\@Latintrue\makeatother}
>     \makeatother
>
> Right?  I tested this on a small example and it seems to work...  (email is
> wrapping the \renewcommand here)
>
\makeatletter and \makeatother in the body of the definition is
neither needed nor a good idea. The \catcode is remembered once
forever. Thus \makeatletter inside the body cannot change the \catcode
of another character within the body of the definition because it is
already set. Moreover, if your macro is called in an environment when
@ should be considered letter, \makeotother will change it and you may
get strange errors (it usually does not happen but it may). You even
do not need to change categories if you wrote \csname
@Latinfalse\endcsname instead of \@Latinfalse.

>> Note: I did not need to load biblatex package unlike you.
>
>
> Figured that out--it was due to some old .aux file or s.t. that I had laying
> around as I was minimizing the example.
>
>     Mike Maxwell
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



More information about the XeTeX mailing list