[luatex] parshape
Ingo Krabbe
ikrabbe.ask at gmail.com
Wed Feb 29 05:44:43 CET 2012
On Wed, Feb 29, 2012 at 12:15:31AM +0100, Reinhard Kotucha wrote:
> On 2012-02-28 at 07:29:01 +0100, Patrick Gundlach wrote:
>
> >
> > >> tex.parshape = {
> > >> {<i1>, <l1>},
> > >> {<i2>, <l2>},
> > >> ...
> > >> {<in>, <ln>}
> > >> }
> > >>
> > >> As usual, all the values are given in scaled points.
> > >
> > > I just wonder after this discussion, why even simple and solved things
> > > have to become more complex, when redesigning as in luatex.
> >
> > you mean more complex than
> >
> > parshape = n, i_0, l_0, ... , i_n, l_n ?
>
> I'm not sure either what Ingo meant. But the first parameter (n) in
> \parshape is needed by TeX's parser in order determine the number of
> arguments. In Lua it's not needed and should be avoided.
>
> I like Paul's proposal very much. It's exactly what Lua programmers
> expect.
I'm sorry for the confusion. This all came from a misunderstanding, in
which context of code such a statement p={ {}, {}, ..., {} } will be
used.
When you write a document it is still easier to have a \parshape
declaration, as TeX introduces, since TeX is a language to write
documents. TeX is more flexible in how the arguments are parsed as glue,
as you can say: \parshape=6 5mm 4.5cm 10mm 3cm 0mm 5cm.
On the other hand, when you write algorithms that somehow calculate the
parshape from some other parameters, the way lua does this is exactly
what you want, together with the parameter normalization to scaled
points.
regards
ingo
>
> Regards,
> Reinhard
>
> --
> ----------------------------------------------------------------------------
> Reinhard Kotucha Phone: +49-511-3373112
> Marschnerstr. 25
> D-30167 Hannover mailto:reinhard.kotucha at web.de
> ----------------------------------------------------------------------------
> Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
> ----------------------------------------------------------------------------
--
i don't do signatures
More information about the luatex
mailing list