[NTG-context] new upload

Hans Hagen j.hagen at xs4all.nl
Mon Aug 31 22:21:20 CEST 2020


In order to keep the 'context is good for toy math' reputation up to 
date, in lmtx we can now have proper discretionaries in math and math in 
discretionaries. The kind of things no one asks for but they might be 
useful in educational settings.

Here are some examples ():




\definemathtoysymbol[Plus] [bin][+]

$\dorecurse{199} {
     x_{#1} \ifodd#1\relax\Plus\else\Minus\fi
} x_{200} \Equal n$


\dorecurse{10} {
     test \discretionary
         {\darkred   hel  $\sqrt{y}$ lo}
         {\darkgreen good $\sqrt{z}$ bye}
         {\darkblue  wel  $\sqrt{x}$ come} test


\dorecurse{10} {test me #1
     $x + 2x \discretionary class 2
         {$+ \, \cdots $}
         {$     \cdots \, +$}
         {$+ \, \cdots \, +$} nx$ test


You might be able to guess from this code what is supposed to happen. 
I'll play a bit more with this later (assuming that it's somehow 
useful). We could predefine a bunch. As usual there might be issues but 
I'll sort them out when we run into them (it's a non critical feature 
with not much impact).


(who must not forget to document it somewhere)

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

More information about the ntg-context mailing list