[XeTeX] bidi, math, and amstext

Vafa Khalighi ctan.upload at gmail.com
Sun Sep 28 05:55:12 CEST 2014


Or use \bidi at newrobustcmd:

\bidi at newrobustcmd*{\ArabicScript}[1]{\RL{\@Latinfalse\ArabicFont #1}}



On Sun, Sep 28, 2014 at 6:20 AM, Zdenek Wagner <zdenek.wagner at gmail.com>
wrote:

> 2014-09-27 22:12 GMT+02:00 Mike Maxwell <maxwell at 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 various right-to-left scripts in the middle of a
> bunch of
> > left-to-right text (a grammar).
> >
> >> 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 defining commands:
> >>
> >> \newcommand*{\textarab}[1]{\RL{\@Latinfalse\arabicfont #1}}
> >
> >
> > Ok, tried that; it (and also my original attempt at redefining \RL) fails
> > for some reason in captions.  The minimal example is
>
> Your definition is fragile but a robust macro is needed inside
> \caption. Use \DeclareRobustCommand instead of \newcommand, the syntax
> is the same.
> > ---------------
> > \documentclass{report}
> > \usepackage{fontspec}
> > \newfontfamily\ArabicFont[Script=Arabic]{Scheherazade}
> >
> > \usepackage{bidi}
> > \makeatletter
> > \@Latintrue
> > \newcommand*{\ArabicScript}[1]{\RL{\@Latinfalse\ArabicFont #1}}
> > \makeatother
> >
> > \begin{document}
> >
> > \begin{table}
> > \caption{{\ArabicScript{دن}}}
> > \end{table}
> > \end{document}
> > -----------
> >
> > The error msg is
> >     ! Incomplete \iffalse; all text was ignored after line 15.
> >     <inserted text>
> >                     \fi
> >     <*> RLBug.xetex
> > --
> >         Mike Maxwell
> >         maxwell at umiacs.umd.edu
> >         "My definition of an interesting universe is
> >         one that has the capacity to study itself."
> >         --Stephen Eastmond
> >
> >
> >
> > --------------------------------------------------
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20140928/7172ec3d/attachment.html>


More information about the XeTeX mailing list