[NTG-context] parbuilder in lua

2014-09-25 Thread Taco Hoekwater
Hi Hans,

Can you please try the code below? I found three issues with it:

1. node-ltp.lua is not completely ready for nuts mode, e.g. line 3148:

  elseif order == 0 and hlist.list and last_badness  tex.hbadness then

  where ‘hlist.list' should be 'getfield(hlist, list”)’

2. with tracing on, I always get: 

   Lua linebreak_filter failed, reverting to default on line 1

   which makes me nervous. Does that mean it works ok without tracing, or does 
it
  just not report that it does not work?

3. with tracing on, there is a double-free of a glyph node (this could be 
specific to tufte)

TIA,
Taco

Code:

\tracingparagraphs=1
\tracingonline=1
\starttext
\startparbuilder[basic]
\input tufte
\stopparbuilder
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] parbuilder in lua

2014-09-25 Thread Hans Hagen

On 9/25/2014 9:57 AM, Taco Hoekwater wrote:

Hi Hans,

Can you please try the code below? I found three issues with it:

1. node-ltp.lua is not completely ready for nuts mode, e.g. line 3148:

   elseif order == 0 and hlist.list and last_badness  tex.hbadness then

   where ‘hlist.list' should be 'getfield(hlist, list”)’


getlist(hlist)


2. with tracing on, I always get:

Lua linebreak_filter failed, reverting to default on line 1


I've seen that before so I need to check the luatex code too.


which makes me nervous. Does that mean it works ok without tracing, or does 
it
   just not report that it does not work?


cur_p - current

local save_link = getnext(current)
setfield(current,next,nil)
write_nl(log,)
par.font_in_short_display = 
short_display(log,getnext(printed_node),par.font_in_short_display)

setfield(current,next,save_link)


3. with tracing on, there is a double-free of a glyph node (this could be 
specific to tufte)


some day i'll make an overload of the tracing for context (this code is 
somewhat evolving and i want to add some plugins as well ... maybe even 
make it kind generic so that we can play in plain tex but as this is all 
playground it has a bit low priority)



TIA,
Taco

Code:

\tracingparagraphs=1
\tracingonline=1
\starttext
\startparbuilder[basic]
\input tufte
\stopparbuilder
\stoptext
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___




--

-
  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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] parbuilder in lua

2014-09-25 Thread Hans Hagen

On 9/25/2014 9:57 AM, Taco Hoekwater wrote:


\tracingparagraphs=1
\tracingonline=1


I must admit that i never use these ... i'm more into visualizing it -)

-
  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
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___