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

2022-08-21 Thread Hans Hagen via ntg-context

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


Hans

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

ontarget-mathcharacters.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


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

2022-08-20 Thread Adam Reviczky via ntg-context
Hi,

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

Adam
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___