Hi, Hans. :)
Is there an analogue for display math? Could discretionaries be applicable to math formulas when "split=yes" is enabled, for instance?

Thank you in advance.

Jairo :)

El lun., 31 de ago. de 2020 a la(s) 15:21, Hans Hagen (j.hagen@xs4all.nl) escribió:

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
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net