[luatex] The effect of \pardir and \textdir on \indent and \parfillskip
joseph.wright at morningstar2.co.uk
Wed Dec 12 19:27:32 CET 2012
On 12/12/2012 17:56, Ulrike Fischer wrote:
> Well I'm not qualified to say something definitive about
> bidirectional text. I do find the idea of text changing its
> direction quite bewildering. Last time I got involved (when trying
> to analyze a xetex bug) I had to fight against hebrew chars suddenly
> writing in the wrong direction ;-).
Neither am I :-)
> But as you wrote about "shape" I tried \parshape + hangindent: It
> doesn't change the side either -- even with \textdir. And this I do
> find inconsequent. Why does \parindent move with \textdir but not
> the shape defined with \parshape?
See previous queries :-) \parshape flips side with \bodydir (which seems
to require \pagedir too to keep things on the page!). As I understand it:
- \textdir flips the text, which includes \parindent as it's a
box added to the first line (so 'text like').
- \bodydir flips the definition of the 'outline' of a paragraph,
which is set \parshape (or \hangindent, which is a simplified
\parshape). It also does other stuff: see comment on \pagedir.
- \pardir flips the definition of the 'inside' of the paragraph,
which alters what \leftskip and \rightskip do (they 'push against
the outline'), and where \parfillskip goes (same idea).
\pagedir seems to be even more tricky: at present, I'm going with 'it
has to agree with \bodydir'.
More information about the luatex