r3tex

custom LuaTeX format
git clone git://git.rr3.xyz/r3tex
Log | Files | Refs | README | LICENSE

mathenc.tex (7804B)


      1 % INITEX sets up \mathcode x=x, for x=0..255, except that
      2 % \mathcode x=x+"7100, for x = `A to `Z and `a to `z;
      3 % \mathcode x=x+"7000, for x = `0 to `9.
      4 \mathcode`\ ="8000 % \space
      5 \mathcode`\!="5021
      6 \mathcode`\'="8000 % ^\prime
      7 \mathcode`\(="4028
      8 \mathcode`\)="5029
      9 \mathcode`\*="2203 % \ast
     10 \mathcode`\+="202B
     11 \mathcode`\,="613B
     12 \mathcode`\-="2200
     13 \mathcode`\.="013A
     14 \mathcode`\/="013D
     15 \mathcode`\:="303A
     16 \mathcode`\;="603B
     17 \mathcode`\<="313C
     18 \mathcode`\=="303D
     19 \mathcode`\>="313E
     20 \mathcode`\?="503F
     21 \mathcode`\[="405B
     22 \mathcode`\\="026E % \backslash
     23 \mathcode`\]="505D
     24 \mathcode`\_="8000
     25 \mathcode`\{="4266
     26 \mathcode`\|="026A
     27 \mathcode`\}="5267
     28 
     29 % INITEX sets all \delcode values to -1, except \delcode`.=0
     30 \delcode`\(="028300
     31 \delcode`\)="029301
     32 \delcode`\[="05B302
     33 \delcode`\]="05D303
     34 \delcode`\<="26830A
     35 \delcode`\>="26930B
     36 \delcode`\/="02F30E
     37 \delcode`\|="26A30C
     38 \delcode`\\="26E30F
     39 % N.B. { and } should NOT get delcodes; otherwise parameter grouping fails!
     40 
     41 % Lowercase Greek letters
     42 \mathchardef\alpha="010B
     43 \mathchardef\beta="010C
     44 \mathchardef\gamma="010D
     45 \mathchardef\delta="010E
     46 \mathchardef\epsilon="010F \mathchardef\varepsilon="0122
     47 \mathchardef\zeta="0110
     48 \mathchardef\eta="0111
     49 \mathchardef\theta="0112 \mathchardef\vartheta="0123
     50 \mathchardef\iota="0113
     51 \mathchardef\kappa="0114
     52 \mathchardef\lambda="0115
     53 \mathchardef\mu="0116
     54 \mathchardef\nu="0117
     55 \mathchardef\xi="0118
     56 \mathchardef\omicron="016F
     57 \mathchardef\pi="0119 \mathchardef\varpi="0124
     58 \mathchardef\rho="011A \mathchardef\varrho="0125
     59 \mathchardef\sigma="011B \mathchardef\varsigma="0126
     60 \mathchardef\tau="011C
     61 \mathchardef\upsilon="011D
     62 \mathchardef\phi="011E \mathchardef\varphi="0127
     63 \mathchardef\chi="011F
     64 \mathchardef\psi="0120
     65 \mathchardef\omega="0121
     66 
     67 % Uppercase Greek letters
     68 \mathchardef\Alpha="0041
     69 \mathchardef\Beta="0042
     70 \mathchardef\Gamma="0000
     71 \mathchardef\Delta="0001
     72 \mathchardef\Epsilon="0045
     73 \mathchardef\Zeta="005A
     74 \mathchardef\Eta="0048
     75 \mathchardef\Theta="0002
     76 \mathchardef\Iota="0049
     77 \mathchardef\Kappa="004B
     78 \mathchardef\Lambda="0003
     79 \mathchardef\Mu="004D
     80 \mathchardef\Nu="004E
     81 \mathchardef\Xi="0004
     82 \mathchardef\Omicron="004F
     83 \mathchardef\Pi="0005
     84 \mathchardef\Rho="0050
     85 \mathchardef\Sigma="0006
     86 \mathchardef\Tau="0054
     87 \mathchardef\Upsilon="0007
     88 \mathchardef\Phi="0008
     89 \mathchardef\Chi="0058
     90 \mathchardef\Psi="0009
     91 \mathchardef\Omega="000A
     92 
     93 % TODO we probably should not provide names for everything below. It's better
     94 % to just provide names for the things very likely to be used and without
     95 % aliasing (e.g., \forall). Things like \bigtriangleup are likely to be given
     96 % a more semantic name if used at all, and so we should probably leave it
     97 % undefined. If somebody wants it, they can look at the font tables and make
     98 % the appropriate definition.
     99 % Actually, but then there is the issue of different math fonts having
    100 % different encodings. We really do need an extra layer of naming on top.
    101 % Maybe we can invent a very mechanical naming scheme (cf. Adobe's naming
    102 % scheme) that, e.g., provisions for unfilled/filled shapes, single vs double
    103 % vs triple vs etc. stroke arrows, etc.
    104 
    105 \mathchardef\aleph="0640
    106 \def\hbar{{\mathchar'26 \mkern-9mu h}}
    107 \mathchardef\imath="017B
    108 \mathchardef\jmath="017C
    109 \mathchardef\ell="0160
    110 \mathchardef\wp="017D
    111 \mathchardef\Re="023C
    112 \mathchardef\Im="023D
    113 \mathchardef\partial="0140
    114 \mathchardef\infty="0231
    115 \mathchardef\prime="0230
    116 \mathchardef\emptyset="023B
    117 \mathchardef\nabla="0272
    118 \def\surd{{\mathchar"1270}}
    119 \mathchardef\top="023E
    120 \mathchardef\bot="023F
    121 \mathchardef\triangle="0234
    122 \mathchardef\forall="0238
    123 \mathchardef\exists="0239
    124 \mathchardef\neg="023A
    125 \mathchardef\flat="015B
    126 \mathchardef\natural="015C
    127 \mathchardef\sharp="015D
    128 \mathchardef\clubsuit="027C
    129 \mathchardef\diamondsuit="027D
    130 \mathchardef\heartsuit="027E
    131 \mathchardef\spadesuit="027F
    132 
    133 \mathchardef\coprod="1360
    134 \mathchardef\bigvee="1357
    135 \mathchardef\bigwedge="1356
    136 \mathchardef\biguplus="1355
    137 \mathchardef\bigcap="1354
    138 \mathchardef\bigcup="1353
    139 \mathchardef\intop="1352
    140 \mathchardef\prod="1351
    141 \mathchardef\sum="1350
    142 \mathchardef\bigotimes="134E
    143 \mathchardef\bigoplus="134C
    144 \mathchardef\bigodot="134A
    145 \mathchardef\ointop="1348
    146 \mathchardef\bigsqcup="1346
    147 \mathchardef\smallint="1273
    148 
    149 \mathchardef\triangleleft="212F
    150 \mathchardef\triangleright="212E
    151 \mathchardef\bigtriangleup="2234
    152 \mathchardef\bigtriangledown="2235
    153 \mathchardef\wedge="225E
    154 \mathchardef\vee="225F
    155 \mathchardef\cap="225C
    156 \mathchardef\cup="225B
    157 \mathchardef\ddagger="227A
    158 \mathchardef\dagger="2279
    159 \mathchardef\sqcap="2275
    160 \mathchardef\sqcup="2274
    161 \mathchardef\uplus="225D
    162 \mathchardef\amalg="2271
    163 \mathchardef\diamond="2205
    164 \mathchardef\bullet="220F
    165 \mathchardef\wr="226F
    166 \mathchardef\div="2204
    167 \mathchardef\odot="220C
    168 \mathchardef\oslash="220B
    169 \mathchardef\otimes="220A
    170 \mathchardef\ominus="2209
    171 \mathchardef\oplus="2208
    172 \mathchardef\mp="2207
    173 \mathchardef\pm="2206
    174 \mathchardef\circ="220E
    175 \mathchardef\bigcirc="220D
    176 \mathchardef\setminus="226E
    177 \mathchardef\cdot="2201
    178 \mathchardef\ast="2203
    179 \mathchardef\times="2202
    180 \mathchardef\star="213F
    181 
    182 \mathchardef\propto="322F
    183 \mathchardef\sqsubseteq="3276
    184 \mathchardef\sqsupseteq="3277
    185 \mathchardef\parallel="326B
    186 \mathchardef\mid="326A
    187 \mathchardef\dashv="3261
    188 \mathchardef\vdash="3260
    189 \mathchardef\nearrow="3225
    190 \mathchardef\searrow="3226
    191 \mathchardef\nwarrow="322D
    192 \mathchardef\swarrow="322E
    193 \mathchardef\Leftrightarrow="322C
    194 \mathchardef\Leftarrow="3228
    195 \mathchardef\Rightarrow="3229
    196 \mathchardef\leq="3214
    197 \mathchardef\geq="3215
    198 \mathchardef\succ="321F
    199 \mathchardef\prec="321E
    200 \mathchardef\approx="3219
    201 \mathchardef\succeq="3217
    202 \mathchardef\preceq="3216
    203 \mathchardef\supset="321B
    204 \mathchardef\subset="321A
    205 \mathchardef\supseteq="3213
    206 \mathchardef\subseteq="3212
    207 \mathchardef\in="3232
    208 \mathchardef\ni="3233
    209 \mathchardef\gg="321D
    210 \mathchardef\ll="321C
    211 \mathchardef\not="3236
    212 \mathchardef\leftrightarrow="3224
    213 \mathchardef\leftarrow="3220
    214 \mathchardef\rightarrow="3221
    215 \mathchardef\mapstochar="3237
    216 \mathchardef\sim="3218
    217 \mathchardef\simeq="3227
    218 \mathchardef\perp="323F
    219 \mathchardef\equiv="3211
    220 \mathchardef\asymp="3210
    221 \mathchardef\smile="315E
    222 \mathchardef\frown="315F
    223 \mathchardef\leftharpoonup="3128
    224 \mathchardef\leftharpoondown="3129
    225 \mathchardef\rightharpoonup="312A
    226 \mathchardef\rightharpoondown="312B
    227 
    228 \mathchardef\lhook="312C
    229 \mathchardef\rhook="312D
    230 
    231 \mathchardef\ldotp="613A
    232 \mathchardef\cdotp="6201
    233 \mathchardef\colon="603A
    234 
    235 \def\acute{\mathaccent"7013 }
    236 \def\grave{\mathaccent"7012 }
    237 \def\ddot{\mathaccent"707F }
    238 \def\tilde{\mathaccent"7003 }
    239 \def\bar{\mathaccent"7016 }
    240 \def\breve{\mathaccent"7015 }
    241 \def\check{\mathaccent"7014 }
    242 \def\hat{\mathaccent"705E }
    243 \def\vec{\Umathaccent"0"02"AE }
    244 \def\dot{\mathaccent"705F }
    245 \def\widetilde{\mathaccent"0365 }
    246 \def\widehat{\mathaccent"0362 }
    247 
    248 \def\lmoustache{\delimiter"437A340 } % top from (, bottom from )
    249 \def\rmoustache{\delimiter"537B341 } % top from ), bottom from (
    250 \def\lgroup{\delimiter"462833A } % extensible ( with sharper tips
    251 \def\rgroup{\delimiter"562933B } % extensible ) with sharper tips
    252 \def\arrowvert{\delimiter"26A33C } % arrow without arrowheads
    253 \def\Arrowvert{\delimiter"26B33D } % double arrow without arrowheads
    254 \def\bracevert{\delimiter"77C33E } % the vertical bar that extends braces
    255 \def\Vert{\delimiter"26B30D }
    256 \def\vert{\delimiter"26A30C }
    257 \def\uparrow{\delimiter"3222378 }
    258 \def\downarrow{\delimiter"3223379 }
    259 \def\updownarrow{\delimiter"326C33F }
    260 \def\Uparrow{\delimiter"322A37E }
    261 \def\Downarrow{\delimiter"322B37F }
    262 \def\Updownarrow{\delimiter"326D377 }
    263 \def\backslash{\delimiter"26E30F }
    264 \def\langle{\delimiter"426830A }
    265 \def\rangle{\delimiter"526930B }
    266 \def\lbrace{\delimiter"4266308 }
    267 \def\rbrace{\delimiter"5267309 }
    268 \def\lceil{\delimiter"4264306 }
    269 \def\rceil{\delimiter"5265307 }
    270 \def\lfloor{\delimiter"4262304 }
    271 \def\rfloor{\delimiter"5263305 }
    272 
    273 \def\sqrt{\radical"270370 }
    274 
    275 \endinput