summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/math/math-spacing.tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-06-19 15:50:29 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-06-19 15:50:29 +0200
commitd11a1200ed28c6e0058990a621d7404f821ac7fd (patch)
treea433002a97225266abf1f925beb0ed699dbee41c /doc/context/sources/general/manuals/math/math-spacing.tex
parent008292817580eba8a0f0cf83d8e2d08df8fc8c3f (diff)
downloadcontext-d11a1200ed28c6e0058990a621d7404f821ac7fd.tar.gz
2017-06-19 15:35:00
Diffstat (limited to 'doc/context/sources/general/manuals/math/math-spacing.tex')
-rw-r--r--doc/context/sources/general/manuals/math/math-spacing.tex37
1 files changed, 32 insertions, 5 deletions
diff --git a/doc/context/sources/general/manuals/math/math-spacing.tex b/doc/context/sources/general/manuals/math/math-spacing.tex
index 02f2c71a8..3a665a7d8 100644
--- a/doc/context/sources/general/manuals/math/math-spacing.tex
+++ b/doc/context/sources/general/manuals/math/math-spacing.tex
@@ -397,24 +397,51 @@ Of course better is to fix the font.
Inline formulas can span lines but display math normally sits on one line unless
one uses alignment mechanisms. Take this:
-\startbuffer
+\startbuffer[demo]
\startformula
x\dorecurse{30}{ + #1x^{#1x}} = 10
\stopformula
\stopbuffer
-\typebuffer
+\typebuffer[demo]
-\par \start \setupformula[split=no] \getbuffer \stop \par
+\par \start \setupformula[split=no] \getbuffer[demo] \stop \par
You can set \type {split} to \type {yes} using \type {\setupformula} and get the
following:
-\par \start \setupformula[split=yes] \getbuffer \stop \par
+\par \start \setupformula[split=yes] \getbuffer[demo] \stop \par
Maybe nicer is to also set \type {align} to \type {flushleft}:
-\par \start \setupformula[split=yes,align=flushleft] \getbuffer \stop \par
+\par \start \setupformula[split=yes,align=flushleft] \getbuffer[demo] \stop \par
+
+If you want the binary operators to start the lines you can set this:
+
+\startbuffer[setup]
+\setupmathematics[setups=math:spacing:split]
+\setupformulas[split=yes,align=flushleft]
+\stopbuffer
+
+\typebuffer[setup]
+
+\par \start \getbuffer[setup,demo] \stop \par
+
+You can prevent a split with a large penalty. Here is a test that yuou can run
+to play with this feature:
+
+\starttyping
+\dostepwiserecurse {30} {100} {1} {
+ \hsize \dimexpr 40pt + #1pt \relax
+ \startformula
+ y = a \dorecurse {50} {
+ \penalty 10000 {\bf + ##1b}
+ + ##1c^2
+ }
+ \stopformula
+ \page
+}
+\stoptyping
There is an experimental alignment mechanism available. Watch the following
examples: