[NTG-context] Repeating binary operators with split multiline formulas

Hans Hagen j.hagen at freedom.nl
Sun Aug 21 10:01:01 CEST 2022

On 8/21/2022 1:04 AM, Adam Reviczky via ntg-context wrote:

> Since there has been a lot of work done on the math side of things, I
> wanted to ask if there is an automated way to have binary operators
> repeated when splitting a formula.
>  From the MKIV math manual there is an option to move the operators into the
> new line:
> \setupmathematics[setups=math:spacing:split]
> \setupformulas[split=yes,align=flushleft]
> \startformula
> x\dorecurse{30}{ + #1x^{#1x}} = 10
> \stopformula
> Would it be possible to achieve this via a custom setup like
> math:spacing:split to get an output like this?
> 𝑥 + 1𝑥1𝑥 + 2𝑥2𝑥 + 3𝑥3𝑥 + 4𝑥4𝑥 + 5𝑥5𝑥 + 6𝑥6𝑥 + 7𝑥7𝑥 + 8𝑥8𝑥 +
> 9𝑥9𝑥 + 10𝑥10𝑥 +
> + 11𝑥11𝑥 + 12𝑥12𝑥 + 13𝑥13𝑥 + 14𝑥14𝑥 + 15𝑥15𝑥 + 16𝑥16𝑥 + 17𝑥17𝑥 +
> 18𝑥18𝑥 + 19𝑥19𝑥 +
> + 20𝑥20𝑥 + 21𝑥21𝑥 + 22𝑥22𝑥 + 23𝑥23𝑥 + 24𝑥24𝑥 + 25𝑥25𝑥 + 26𝑥26𝑥 +
> 27𝑥27𝑥 + 28𝑥28𝑥 +
> + 29𝑥29𝑥 + 30𝑥30𝑥 = 10
What you are basically asking for is "math discretionaries that don't 
interfere with spacing and penalties as assigned in math processing" .

I attached what we have done so far. Regular discretionaries are already 
supported but recently - not yet in the upload - and last week I added 
support for specific math discretionaries to the engine (no need to 
switch to math in a dicretionary so no style guesswork needed) and then 
also a more native handling of characters directly (using \\hmcode's) so 
no need for some command that injects the discretionary.

We have no high level interface yes so if you have suggestions on how 
this is to be used (what binaries for instance, is it language 
dependent) let us know.

Mikael and I still need to look into more granular inter-atom penalties 
(there is quite some control possible but it is simply not yet used).

There will probably be an upload one of these days (all build engines 
need to be up and running) btu we're first wrapping up some other (cool) 


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ontarget-mathcharacters.pdf
Type: application/pdf
Size: 37152 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20220821/226f835e/attachment-0001.pdf>

More information about the ntg-context mailing list