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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to