[XeTeX] \beginR ...\endR

Jonathan Kew jonathan_kew at sil.org
Fri Nov 5 17:34:19 CET 2004

On 5 Nov 2004, at 4:26 pm, Michael Gedalin wrote:

> Jonathan,
> Thanks a lot. I did not realize these are TeX-XeT primitives and tried 
> to use them as environment delimiters. Now I defined new commands:
> \newcommand{\LL}{\everypar={\setbox0=\lastbox \beginL \box0 }}
> \newcommand{\RR}{\everypar={\setbox0=\lastbox \beginR \box0 }}
> and use them for switching LTR-RTL. Should I be cautious ?
> Michael

There's no need for an initial \beginL in plain LTR paragraphs (though 
I suppose it would be harmless); TeX's default is left-to-right anyway. 
So your \LL could just set \everypar={}.

In the LaTeX world, there might be interactions with 
packages/environments that make use of \everypar for their own 
purposes; one of the LaTeX experts on the list can probably suggest a 
more robust approach. But this should be sufficient for simple cases, 
at least.


More information about the XeTeX mailing list