[NTG-context] new upload

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


Hi,

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 ():

\starttext

\showframe

\enabletrackers[math.toysymbol]

\definemathtoysymbol[Plus] [bin][+]
\definemathtoysymbol[Minus][bin][-]
\definemathtoysymbol[Equal][rel][=]

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

\blank

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

\blank

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

\stoptext

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).

Hans

(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