[NTG-context] "Trial typesetting" in ConTeXt / lua ?

Hans Hagen pragma at wxs.nl
Wed Nov 18 22:22:06 CET 2015

On 11/18/2015 9:49 PM, josephcanedo at gmail.com wrote:
> Hi Hans
> First of all, thanks a lot for replying.
> I tried your suggestion and it does not seem to work at least for fancy
> features in EB Garamond (historical liguratures and other features).
> I also tried to pass the hbox to tex.linebreak() and got assertion
> failure in luatex.

are you sure that you defined that font and that it's the current font?

> Is there any code snippet available to show the full process in lua code
> (I mean up to shipping the result nodes to the page) ?

no ... thousands of lines spread over many files

> To give some background, I’d like to compute a parshape for some
> paragraphs for which I’d like some special shape. I thought that one
> idea was to build up the lua nodes from text (which has some occasional
> words with  smaller or different font style), compute the width of text
> to figure out a first guess for parshape and then iterate on linebreak
> with different parshape settings to refine the first guess.

just put stuff in vboxes and loop over that; at the tex end with calls 
to lua


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl

More information about the ntg-context mailing list