[luatex] \enddir
John Plaice
johnplaice at gmail.com
Thu Dec 13 13:17:15 CET 2012
Hello everyone,
I think the whole thing needs to be redone, starting with a proper
understanding of how boxes nest with different directions inside. Once
that is done, then we can move on to the mixed-direction typesetting within
a paragraph. I do have some old code for the box nesting just for mixed
left-right and right-left horizontal typesetting, which never got into the
Omega code base, which could be revived and generalized to the vertical
case as well. The work done by the pTeX people in Japan is also relevant.
Where is the current luatex code base? Is there a git repository?
Cheers,
John Plaice
On Thu, Dec 13, 2012 at 5:54 AM, Joseph Wright <
joseph.wright at morningstar2.co.uk> wrote:
> On 13/12/2012 10:11, Taco Hoekwater wrote:
> > Normally, the code that exports the box to PDF/DVI takes care of
> > closing up the open direction nodes based on the box's 'box direction'.
> > But if there is a group involved, then the box does not give enough
> > hints, hence the explicit \enddir in that case.
> >
> > The missing \enddir is a number-of-nodes optimization from Omega that
> > Hans is not too happy about as it is both confusing and makes it a
> > little hard to process the node list directions in lua, so it will
> > likely go away at some point, and explicit \enddirs will be present
> > always at some point in the future.
>
> OK, all makes sense.
>
> >> For testing, I tried
> >>
> >> \hbox{\textdir TRT ABC\textdir TLT D}
> >>
> >> which gives the slightly odd
> >>
> >> ..\hbox(6.83331+0.0)x29.4445, direction TLT
> >> ...\begindir TRT
> >> ...\tenrm A
> >> ...\tenrm B
> >> ...\tenrm C
> >> ...\begindir TRT
> >> ...\begindir TLT
> >> ...\tenrm D
> >> ..\glue 0.0 plus 1.0fill
> >>
> >> (Can't imagine this is deliberate.)
> >
> > Code copied from Omega, and there were no comments in that code
> > anywhere, so I just kept it as is originally. But it does look
> > weird, so I made a local change to produce \enddir TRT instead
> > of the second \begindir TRT. For this source:
> >
> > (\hbox{\textdir TRT ABC\textdir TLT DEF})
> >
> > The change actually changed the output PDF from (old):
> >
> > (DEFCBA)
> >
> > to (new)
> >
> > (CBADEF)
> >
> > which to my layman's eyes appears to make more sense (the second
> > \textdir now actually replaces the first, instead of starting an
> > implied direction group).
> >
> > But then, I find the direction stuff utterly confusing, so before I
> > commit the change, I would really like a second opinion.
>
> Totally agree: I've no idea either what is 'correct'. Frank asked John
> Plaice if he could enlighten us (LaTeX team) on the Omega approach. I've
> CC'd him on this reply: perhaps he has more insight.
> --
> Joseph Wright
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/luatex/attachments/20121213/46619d5a/attachment.html>
More information about the luatex
mailing list