# [luatex] The effect of \pardir on \leftskip versus \parshape

Khaled Hosny khaledhosny at eglug.org
Fri Dec 7 14:17:43 CET 2012

On Fri, Dec 07, 2012 at 09:36:02AM +0000, Joseph Wright wrote:
> On 07/12/2012 07:34, Taco Hoekwater wrote:
> > On 12/07/2012 08:09 AM, Joseph Wright wrote:
> >> On 06/12/2012 22:42, Joseph Wright wrote:
> >>> Hello all,
> >>>
> >>> Playing around with RTL primitives, I find something a bit strange, or
> >>> at least unexpected, with the treatment of paragraph parameters. In the
> >>> following, "\pardir TRT" swaps the effect of \leftskip and \rightskip,
> >>> which I can understand, but leaves the indent set up by \parshape on the
> >>> 'absolute' left (\hangindent is the same). Is this deliberate, and if so
> >>> is it documented (Omega manual?).
> >
> > As far as I know, that was not documented. I cannot even see from the
> > source whether the curent behaviour was intentional or missed case. But
> > the real question is: does it need changing?
> >
> > Best wishes,
> > Taco
>
> Hello Taco,
>
> As I'm not a RTL user, I can only give a rather limited answer to that.
>
> I'd say \leftskip and \rightskip make most sense as 'absolute' page
> sides, not to the 'start of text line' and 'end of text line'. The names
> does say 'left' and 'right', after all.
>
> The case with \hangindent/\parshape is more tricky, but the description
> in The TeXbook does talk about indenting from 'the left margin' rather
> than 'the start of the line'. I can see the argument here that as
> Knuth's TeX only does LTR this is understandable but not relevant to RTL
> work!
>
> However, any change would presumably break stuff. More importantly, I've
> no idea what really makes sense in describing a RTL page. So I guess my
> bottom line is 'What do the experts think?'.

Being named left and right does not necessarily mean they don't
actually mean start and end, after all who named them was only
considering left to right, top to bottom setting. Now, if I understand
\left and \rightskip correctly, it seems like something one wants to
mirror with directional change, otherwise one would want to explicitly
adapt styles depending on text directionality, which is not something I
really like (especially when dealing with something like LaTeX styles
that are PITA to modify).

In general the layout in right to left settings is usually an identical
mirror of left to right one (including the position of odd and even
pages). We also need to consider top to bottom directionality, which I
suspect is handled the same.

Regards,
Khaled