summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/math-twk.mkxl
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-07-27 18:24:08 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-07-27 18:24:08 +0200
commit659d787cc8a329d01ff920c7e1a4659dc66b7daa (patch)
treefd9345067a336be4c9a84dbb4a855b4d6fc87b0f /tex/context/base/mkxl/math-twk.mkxl
parent352517495e32813d30d0080f2a0c8dd1afea794a (diff)
downloadcontext-659d787cc8a329d01ff920c7e1a4659dc66b7daa.tar.gz
2022-07-27 17:53:00
Diffstat (limited to 'tex/context/base/mkxl/math-twk.mkxl')
-rw-r--r--tex/context/base/mkxl/math-twk.mkxl30
1 files changed, 22 insertions, 8 deletions
diff --git a/tex/context/base/mkxl/math-twk.mkxl b/tex/context/base/mkxl/math-twk.mkxl
index 1d48cb50e..995f48bcb 100644
--- a/tex/context/base/mkxl/math-twk.mkxl
+++ b/tex/context/base/mkxl/math-twk.mkxl
@@ -42,19 +42,33 @@
% \setupbodyfont[bonum] \getbuffer
% \setupbodyfont[pagella] \getbuffer
-\Umathchardef \unaryminus \mathunarycode \zerocount \privatecharactercode{unary minus}
-\Umathchardef \unaryplus \mathunarycode \zerocount \privatecharactercode{unary plus}
-\Umathchardef \unaryplusminus \mathunarycode \zerocount \privatecharactercode{unary plus minus}
-\Umathchardef \unaryminusplus \mathunarycode \zerocount \privatecharactercode{unary minus plus}
+\immutable\Umathchardef \unaryminus \mathunarycode \zerocount \privatecharactercode{unary minus}
+\immutable\Umathchardef \unaryplus \mathunarycode \zerocount \privatecharactercode{unary plus}
+\immutable\Umathchardef \unaryplusminus \mathunarycode \zerocount \privatecharactercode{unary plus minus}
+\immutable\Umathchardef \unaryminusplus \mathunarycode \zerocount \privatecharactercode{unary minus plus}
\permanent\protected\def\um {\mathortext\unaryminus \textminus}
\permanent\protected\def\up {\mathortext\unaryplus \textplus}
\permanent\protected\def\upm{\mathortext\unaryplusminus\textpm}
\permanent\protected\def\ump{\mathortext\unaryminusplus\textmp}
-\permanent\protected\def\una#1{\mathatom class \mathunarycode {#1}}
-\permanent\protected\def\bin#1{\mathatom class \mathbinarycode {#1}}
-\permanent\protected\def\rel#1{\mathatom class \mathrelationcode{#1}}
-\permanent\protected\def\ord#1{\mathatom class \mathordinarycode{#1}}
+\permanent\protected\def\una#1{\mathatom \s!class \mathunarycode {#1}}
+\permanent\protected\def\bin#1{\mathatom \s!class \mathbinarycode {#1}}
+\permanent\protected\def\rel#1{\mathatom \s!class \mathrelationcode{#1}}
+\permanent\protected\def\ord#1{\mathatom \s!class \mathordinarycode{#1}}
+
+% $x + \+1$\par
+% $x + \-1$\par
+
+\immutable\Umathchardef\mathunaryplus \mathunarycode\zerocount"002B % these will go to char-def.lua
+\immutable\Umathchardef\mathunaryminus \mathunarycode\zerocount"2212 % these will go to char-def.lua
+\immutable\Umathchardef\mathunaryplusminus\mathunarycode\zerocount"00B1 % these will go to char-def.lua
+\immutable\Umathchardef\mathunaryminusplus\mathunarycode\zerocount"2213 % these will go to char-def.lua
+
+\permanent\protected\def\+{\mathortext\mathunaryplus \textplus }
+%permanent\protected\def\-{\mathortext\mathunaryminus \textminus }
+\permanent\protected\def\-{\mathortext\mathunaryminus \explicitdiscretionary}
+\permanent\protected\def\±{\mathortext\mathunaryplusminus\textpm}
+\permanent\protected\def\∓{\mathortext\mathunaryminusplus\textmp}
\protect