[NTG-context] luatex feature question/request

Hans Hagen pragma at wxs.nl
Fri Apr 4 22:07:09 CEST 2008


Aditya Mahajan wrote:

>> Perhaps this one could be already useable for the OP:
>>
>> function add_ties(line)
>>     line = line:gsub('( %a) ', '%1~')
>>     line = line:gsub('^(%a) ', '%1~')
>>     line = line:gsub('( %a)$', '%1~%%')
>>     return line
>> end
>>
>> Not working: $a = b + c$.
> 
> How about substituting with a macro \nonbreakbablespace (instead of ~) 
> and redefining \nonbreakablespace to \relax using \everymathematics or 
> \mathortext?

and then ending up with the same mess as usual ... exceptions, 
exceptions, exceptions ... just think of boxed text inside math which 
then needs to have it enabled again

really, node lists is the way to go (although i admit that currently i 
do not handle math (also because it's a big todo in luatex)

Hans



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


More information about the ntg-context mailing list