[XeTeX] bidi.sty for plain XeTeX
Joseph Wright
joseph.wright at morningstar2.co.uk
Sat Dec 22 10:09:24 CET 2012
On 21/12/2012 22:24, John Was wrote:
> I'm not an Arabist but have occasionally had to typeset articles in
> plain XeTex using Arabic, and all I have in my file header is:
>
> \TeXXeTstate=1 % this turns e-TeX's bidi functionality on
> \def\intextarab#1{{\arabic {\beginR #1\endR}}}
>
> I define \arabic as a call to my Arabic font (the definition of \arabic
> changes according to whether I'm in main text, footnote text, or
> extract text). To achieve Arabic I just give \intextarab{ARABIC TEXT
> HERE}. That works fine for bits of Arabic embedded in English (or other
> left-to-right) text in the same paragraph. For separate Arabic
> paragraphs you really just need
> \beginR
>
> and at the end
>
> \endR
>
>
> There are no doubt slicker ways of doing things, but that gave me good
> output first time round so I stuck with it!
>
>
> John
For an entire document, you need to worry about \everypar and
\parindent, for example
\TeXXeTstate = 1 %
\newbox\indentbox
\everypar{%
\setbox\indentbox=\lastbox
\beginR
\box\indentbox
}
as \beginR is an hmode command.
--
Joseph Wright
More information about the XeTeX
mailing list