Re: [XeTeX] bidi, math, and amstext

2014-09-28 Thread Vafa Khalighi
Or use \bidi@newrobustcmd: \bidi@newrobustcmd*{\ArabicScript}[1]{\RL{\@Latinfalse\ArabicFont #1}} On Sun, Sep 28, 2014 at 6:20 AM, Zdenek Wagner zdenek.wag...@gmail.com wrote: 2014-09-27 22:12 GMT+02:00 Mike Maxwell maxw...@umiacs.umd.edu: On 9/27/2014 12:24 AM, Vafa Khalighi wrote:

Re: [XeTeX] bidi, math, and amstext

2014-09-27 Thread Mike Maxwell
On 9/27/2014 12:24 AM, Vafa Khalighi wrote: Well, I suppose you do not use low-level commands like \RL to typeset say Arabic. Do you? We have been; perhaps relevant is the fact that we're typesetting small amounts of text in various right-to-left scripts in the middle of a bunch of

Re: [XeTeX] bidi, math, and amstext

2014-09-27 Thread Zdenek Wagner
2014-09-27 22:12 GMT+02:00 Mike Maxwell maxw...@umiacs.umd.edu: On 9/27/2014 12:24 AM, Vafa Khalighi wrote: Well, I suppose you do not use low-level commands like \RL to typeset say Arabic. Do you? We have been; perhaps relevant is the fact that we're typesetting small amounts of text in

Re: [XeTeX] bidi, math, and amstext

2014-09-27 Thread Mike Maxwell
On 9/27/2014 4:20 PM, Zdenek Wagner wrote: Your definition is fragile but a robust macro is needed inside \caption. Use \DeclareRobustCommand instead of \newcommand, the syntax is the same. Ah, thanks, I'll try that! -- Mike Maxwell maxw...@umiacs.umd.edu My definition

[XeTeX] bidi, math, and amstext

2014-09-26 Thread maxwell
Not sure if this is the appropriate place to say this, but: I seem to have found a problematic interaction (aka bug?) between the bidi package and the amstext package. Here's a minimal example: \documentclass{report} \usepackage{fontspec} \usepackage{biblatex}

Re: [XeTeX] bidi, math, and amstext

2014-09-26 Thread Vafa Khalighi
Not a bug. bidi package has a boolean \if@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. Therefore \documentclass{report} \usepackage{amstext}

Re: [XeTeX] bidi, math, and amstext

2014-09-26 Thread maxwell
On 2014-09-26 16:01, Vafa Khalighi wrote: Not a bug. bidi package has a boolean \if@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

Re: [XeTeX] bidi, math, and amstext

2014-09-26 Thread Zdenek Wagner
2014-09-27 0:15 GMT+02:00 maxwell maxw...@umiacs.umd.edu: On 2014-09-26 16:01, Vafa Khalighi wrote: Not a bug. bidi package has a boolean \if@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

Re: [XeTeX] bidi, math, and amstext

2014-09-26 Thread Vafa Khalighi
Well, I suppose you do not use low-level commands like \RL to typeset say Arabic. Do you? One usually defines an environment like: \newfontfamily\arabicfont[ExternalLocation,Script=Arabic]{amiri-regular} \newenvironment{arabtext}{\begin{RTL}\@Latinfalse\arabicfont}{\end{RTL} or if you are