![](https://secure.gravatar.com/avatar/11bdb092d7681af7742fdd43617e975c.jpg?s=120&d=mm&r=g)
On Fri, 08 Jul 2016 10:55:36 -0600, Hans Hagen
On 7/8/2016 6:48 PM, Javier Bezos wrote:
Hans,
Sure. Compare the behaviour of \leftskip and \parshape. IMO, they should be the same.
Well, after thinking a little more about this I'm not so sure.
But same problem with \hangindent. This is easier to catch (just change the sign), but it would be nice if its behaviour is mirrored like \parindent, \leftskip, etc. I think LuaTeX must overcome the limitations of the XeT-TeX bidi model.
changing such things now will break existing code
I know, but not changing it breaks also existing code for bidi texts, except if we modify lots of things, which is an overkill (and very likely the code will end up with many hacks). And after all, 0.95 also broke existing code. I think not adding now a proper bidi model is a missed opportunity and in the years to come very likely we'll speak of a "long standing bug" in the bidi behavior of \hangindent. It's MHO.
Well, if one looks at it from the point of viuew of the par builder where left/right skips are kind of global and applied later to the broken lines, then it's not a bug but a choice.
Since Hans is adding support for more mirroring options, I suppose the following is moot. In any case, I played around with this today. It seems that \parshape and \hangindent are interpreted so as to assume a global coordinate system for the page, i.e., beyond the paragraph level. After thinking about this global-page vs local-paragraph distinction, went back and found the old Omega documentation: There were two other primitives \pardirHR \pardirLR (which were later expunged from luatex). I suspect that \parshape and \hangindent were mirrored with \pardirHR invoked. If so, then the current issue raised by Javier is a residue of the old Omega/Aleph model: Dropping \pardirHR \pardirLR left an ambiguity. If the above analysis is correct, we should ask: What other primitives if any (besides \parshape and \hangindent) did the Omega/Aleph bidi model treat at the \pardirHR \pardirLR level? I think Hans' point (philosophy?) is that the macropackage should handle things at the page/coordinate-system level. Perhaps that had something to do with dropping \pardirHR \pardirLR in the first place? A related point is that luatex is explicitly designed for extensibility of, e.g, primitives via lua, so there should also be a straightforward way for experts to implement the desired low-level behavior. For example, something along the lines of \pardirHR \pardirLR could be reimplemented in lua. That *might* be a better approach than the mirroring Javier requested and which Hans has agreed to do; especially if there is additional residue out there of more primitives that need this kind of treatment. Again, the question may be moot now, but that's my 2 cents (perhaps 1 cent). Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523