%D \module 2%D [ file=math-ini, 3%D version=2022.07.24, 4%D title=\CONTEXT\ Math Macros, 5%D subtitle=Extensions aka Tweaks, 6%D author={Hans Hagen \& Mikael Sundqvist}, 7%D date=\currentdate, 8%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] 9%C 10%C This module is part of the \CONTEXT\ macro||package and is 11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for 12%C details. 13 14\writestatus{loading}{ConTeXt Math Macros / Tweaks} 15 16%D This file deals with some ommisions in \UNICODE\ (at least we flag them as such). 17%D Some of the definitione done elsewhere will be moved here. 18 19\unprotect 20 21% Mathematics - Hollie + Metropole Orkest (conducted by Jules Buckley) .. more than minusses 22 23% \startbuffer 24% \startTEXpage[offset=2dk]\showmakeup[mathglue]\mathspacingmode1 % \tracingmath3\tracingonline2 25% $ a + - 1 $ \quad 26% $ - 2 $ \quad 27% $ \um 3 $ \quad 28% $ a + \um 4 $ \par 29% $ \ump 3 $ \quad 30% $ a + \ump 4 $ \quad 31% $ \up 5 $ \par 32% $ a - \up 6 $ \quad 33% $ \upm 5 $ \quad 34% $ a - \upm 6 $ \quad 35% \par 36% $\textstyle - + \um \up \upm \ump $ \quad 37% $\scriptstyle - + \um \up \upm \ump $ \quad 38% $\scriptscriptstyle - + \um \up \upm \ump $ \quad 39% \stopTEXpage 40% \stopbuffer 41% 42% \setupbodyfont[bonum] \getbuffer 43% \setupbodyfont[pagella] \getbuffer 44 45\immutable\Umathchardef \unaryminus \mathunarycode \zerocount \privatecharactercode{unary minus} 46\immutable\Umathchardef \unaryplus \mathunarycode \zerocount \privatecharactercode{unary plus} 47\immutable\Umathchardef \unaryplusminus \mathunarycode \zerocount \privatecharactercode{unary plus minus} 48\immutable\Umathchardef \unaryminusplus \mathunarycode \zerocount \privatecharactercode{unary minus plus} 49 50\permanent\protected\def\um {\mathortext\unaryminus \textminus} 51\permanent\protected\def\up {\mathortext\unaryplus \textplus} 52\permanent\protected\def\upm{\mathortext\unaryplusminus\textpm} 53\permanent\protected\def\ump{\mathortext\unaryminusplus\textmp} 54 55\permanent\protected\def\una#1{\mathatom \s!class \mathunarycode {#1}} 56\permanent\protected\def\bin#1{\mathatom \s!class \mathbinarycode {#1}} 57\permanent\protected\def\rel#1{\mathatom \s!class \mathrelationcode{#1}} 58\permanent\protected\def\ord#1{\mathatom \s!class \mathordinarycode{#1}} 59 60% $x + \+1$\par 61% $x + \-1$\par 62 63\immutable\Umathchardef\mathunaryplus \mathunarycode\zerocount"002B % these will go to char-def.lua 64\immutable\Umathchardef\mathunaryminus \mathunarycode\zerocount"2212 % these will go to char-def.lua 65\immutable\Umathchardef\mathunaryplusminus\mathunarycode\zerocount"00B1 % these will go to char-def.lua 66\immutable\Umathchardef\mathunaryminusplus\mathunarycode\zerocount"2213 % these will go to char-def.lua 67 68\permanent\protected\def\+{\mathortext\mathunaryplus \textplus } 69%permanent\protected\def\-{\mathortext\mathunaryminus \textminus } 70\permanent\protected\def\-{\mathortext\mathunaryminus \explicitdiscretionary} 71\permanent\protected\def\±{\mathortext\mathunaryplusminus\textpm} 72\permanent\protected\def\∓{\mathortext\mathunaryminusplus\textmp} 73 74% \permanent\protected\def\minute{\hbox shift -.8ex{$\char"2032$}} 75% \permanent\protected\def\second{\hbox shift -.8ex{$\char"2033$}} 76% 77% \permanent\protected\def\minute{$\char\privatecharactercode{prime 0x2032 1}$} 78% \permanent\protected\def\second{$\char\privatecharactercode{prime 0x2033 1}$} 79% 80% \permanent\protected\def\minute{$\Umathchar\zerocount\zerocount\privatecharactercode{prime 0x2032 1}$} 81% \permanent\protected\def\second{$\Umathchar\zerocount\zerocount\privatecharactercode{prime 0x2033 1}$} 82% 83% \immutable\Umathchardef\minute\zerocount\zerocount\privatecharactercode{prime 0x2032 1} 84% \immutable\Umathchardef\second\zerocount\zerocount\privatecharactercode{prime 0x2033 1} 85 86\immutable\chardef\textminute"2032 87\immutable\chardef\textsecond"2033 88 89% \immutable\Umathchardef\mathminute\zerocount\zerocount\privatecharactercode{prime 0x2032 1} 90% \immutable\Umathchardef\mathsecond\zerocount\zerocount\privatecharactercode{prime 0x2033 1} 91 92\immutable\Umathchardef\mathminute\zerocount\zerocount\textminute 93\immutable\Umathchardef\mathsecond\zerocount\zerocount\textsecond 94 95\permanent\protected\def\minute{\iffontchar\font\textminute\textminute\else\mathminute\fi} 96\permanent\protected\def\second{\iffontchar\font\textsecond\textsecond\else\mathsecond\fi} 97 98% \startsetups[math:rules] 99% \letmathfractionparameter\c!rule\v!symbol 100% \setmathfractionparameter\c!middle{"203E}% 101% \letmathradicalparameter \c!rule\v!symbol 102% \setmathradicalparameter \c!top{\radicalbarextenderuc}% 103% \setmathfenceparameter \c!alternative{1}% 104% \stopsetups 105 106\protect 107 |