On 12/12/2012 09:03, Joseph Wright wrote: > Hello all, > > Continuing my attempts to understand RTL primitives in LuaTeX, I've come > across what I'd regard as unexpected behaviour in terms of the > relationship between \textdir and \pardir. > > For example, in the demo > > \newbox\mybox > \parskip 1 em % > > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > > \pardir TRT > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > > \leavevmode > \setbox\mybox=\lastbox > \textdir TRT\box\mybox\textdir TLT > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > Hello world Hello world Hello world Hello world Hello world > > \bye > > I find it surprising that the middle paragraph has the \indent on the > left, and that it's necessary to alter the text direction to get it on > the right. > > How do others see this: is the current behaviour 'expected', and more > importantly is it useful? (OK, most of the time \pardir and \textdir > will agree on direction, but my reading of the primitive names was that > they are intended to separate out the run of the text and the shape of > the paragraph.)
BTW, I assume the argument for the behaviour is something like 'the \indent is just an \hbox, so it's treated like any other, while the \parfillskip is not a box, so is attached to the end of the paragraph in a different way'. -- Joseph Wright
