Tabbing in RtoL text (was Re: [XeTeX] Right-indents with Arabic
in xelatex)
Jonathan Kew
jonathan_kew at sil.org
Mon Feb 7 20:10:15 CET 2005
On 7 Feb 2005, at 6:04 pm, Frederick Hoyt wrote:
> Thank you for the suggestion regarding hanging indents.
>
> Could anyone then suggest a solution for using tab spaces with a
> \beginR environment, so that the tabs proceed to from the left margin
> rightwards.
Did you mean "from the right margin leftwards", perhaps? That would
seem more logical.
> I tried using the \tabbing environment, but it places the tabs (and
> associated text at the left margin.
>
> The project in question involves typsetting an Arabic text in playbook
> format:
>
> Mary : Blah blah blah.
> John : Grumble grumble grumble.
>
> The text portion requires hanging indentation (hence my previous
> inquiry), and then the spacing between the character identifiers, the
> colon, and the text needs to be uniform (hence the tabbing).
>
I'm not sure exactly what your source text looks like for this, but if
it were my project, I'd probably write a little custom macro to handle
each "line" (potentially wrapped). Supposing your source contains lines
of the form:
<speaker> <TAB> <colon> <TAB> <text of the speech, possibly long enough
to wrap>
with a blank line separating each such line. Then you could do
something like:
\parindent=1in % or whatever measure you like for the "speaker : " part
\def\doplayline #1^^I:^^I{%
\hangindent -\parindent \hangafter=1
\setbox0=\lastbox \beginR \hbox to \parindent{#1\hfil:\kern1em}}
\everypar={\doplayline}
followed by a series of such lines.
I'd expect LaTeX's various tab-related environments and commands to be
L-R oriented, and to need some adaptation for R-L use; I haven't looked
into this in any detail, not being much of a LaTeX user.
JK
More information about the XeTeX
mailing list