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