[XeTeX] Right-indents with Arabic in xelatex

Jonathan Kew jonathan_kew at sil.org
Sun Feb 6 22:07:28 CET 2005


On 5 Feb 2005, at 3:33 pm, Frederick Hoyt wrote:

> Hi,
>
> I am using xelatex to typeset Arabic using Musa Furber's template as a 
> starting point:
>
> http://www.tug.org/pipermail/xetex/2004-July/000533.html
>
> However, the document I am working on requires hanging indents from 
> the right margin. Mr. Furber's template explicitly disables indents 
> since latex will generate them on the left margin.
>
> I have tried to find a way to insert right indents as a class of 
> objects distinct from left-indents, or to switch the whole direction 
> of text, as in Klaus Legally's arabtex. I have not found an obvious 
> way to do either.
>

A basic fragment of TeX code that would give you right-to-left 
paragraphs with hanging indents would be:

	\everypar={\setbox0=\lastbox \beginR \hangindent-\parindent 
\hangafter1 }

(or give a different value for \hangindent, if \parindent isn't what 
you want; but make it negative, to apply at the right instead of the 
left). Maybe some of the LaTeX folks here can suggest how this would be 
integrated properly with LaTeX environments and other parameters. But 
it may be enough to get you started, at least.

JK



More information about the XeTeX mailing list