4.19 color

  4.19.1 2: Binary Operations
  4.19.2 3: Relational Operations
  4.19.3 4/5: Delimiters
  4.19.4 6: Punctuation Marks
  4.19.5 Questions
  4.19.6 Type 4: Math Open

<..configure html32 color..>
 \Configure{HColor}{red}{\#FF0000}
 \Configure{HColor}{rgb 1 0 0}{\#FF0000}
 \Configure{HColor}{blue}{\#0000FF}
 \Configure{HColor}{rgb 0 0 1}{\#0000FF}
 \Configure{HColor}{green}{\#00FF00}
 \Configure{HColor}{rgb 0 1 0}{\#00FF00}
 \Configure{HColor}{white}{\#FFFFFF}
 \Configure{HColor}{gray 1}{\#FFFFFF}
 \Configure{HColor}{rgb 1 1 1}{\#FFFFFF}
 \Configure{HColor}{black}{\#000000}
 \Configure{HColor}{gray 0}{\#000000}
 \Configure{HColor}{rgb 0 0 0}{\#000000}
 \Configure{HColor}{cyan}{\#00FFFF}
 \Configure{HColor}{cmyk 1 0 0 0}{\#00FFFF}
 \Configure{HColor}{magenta}{\#FF00FF}
 \Configure{HColor}{cmyk 0 1 0 0}{\#FF00FF}
 \Configure{HColor}{yellow}{\#FFFF00}
 \Configure{HColor}{cmyk 0 0 1 0}{\#FFFF00}
 \Configure{color}{\:gobble}
-_-_-

<..configure html32 color..>+
 \Configure{HColor:gray}{%
    \int:of\:tempa{255}{#1}%
    \Configure{HColor}{}{rgb(\:tempa,\:tempa,\:tempa)}%
 }
 \Configure{HColor:rgb}{%
    \int:of\:tempa{255}{#1}%
    \int:of\:tempb{255}{#2}%
    \int:of\:tempc{255}{#3}%
    \Configure{HColor}{}{rgb(\:tempa,\:tempb,\:tempc)}%
 }
 \Configure{HColor:cmyk}{%
    \int:of\:Cyan{255}{#1}%
    \int:of\:Magenta{255}{#2}%
    \int:of\:Yellow{255}{#3}%
    \int:of\:Black{255}{#4}%
    \:cmyk\:tempa\:Cyan
    \:cmyk\:tempb\:Magenta
    \:cmyk\:tempc\:Yellow
    \Configure{HColor}{}{rgb(\:tempa,\:tempb,\:tempc)}%
 }
 <.HColor util.>
-_-_-

<..HColor util..>
 \def\int:of#1#2#3{%
    \tmp:dim=#3pt \tmp:dim=#2\tmp:dim
    \edef\:temp{\tmp:cnt\the\tmp:dim//}%
    \def#1##1//{}\afterassignment#1\:temp
    \edef#1{\the\tmp:cnt}%
 }
-_-_-

<..HColor util..>+
 \def\:cmyk#1#2{%
    \tmp:cnt=255 \advance\tmp:cnt by -\:Black
    \multiply\tmp:cnt by#2 \advance\tmp:cnt by \:Black
    \advance\tmp:cnt by -255 \tmp:cnt=-\tmp:cnt
    \ifnum \tmp:cnt<0 \tmp:cnt=0 \fi
    \edef#1{\the\tmp:cnt}%
 }
-_-_-

<..plain tex classes..>
 \Configure{MathClass}{1}{}{}{}{
    \mathchar"1360
    \mathchar"1357
    \mathchar"1356
    \mathchar"1355
    \mathchar"1354
    \mathchar"1353
    \mathchar"1352
    \mathchar"1351
    \mathchar"1350
    \mathchar"134E
    \mathchar"134C
    \mathchar"134A
    \mathchar"1348
    \mathchar"1346
    \mathchar"1273
 }
-_-_-

4.19.1 2: Binary Operations

\mathchardef\triangleleft="212F  
\mathchardef\triangleright="212E  
\mathchardef\bigtriangleup="2234  
\mathchardef\bigtriangledown="2235  
\mathchardef\wedge="225E \let\land=\wedge  
\mathchardef\vee="225F \let\lor=\vee  
\mathchardef\cap="225C  
\mathchardef\cup="225B  
\mathchardef\ddagger="227A  
\mathchardef\dagger="2279  
\mathchardef\sqcap="2275  
\mathchardef\sqcup="2274  
\mathchardef\uplus="225D  
\mathchardef\amalg="2271  
\mathchardef\diamond="2205  
\mathchardef\bullet="220F  
\mathchardef\wr="226F  
\mathchardef\div="2204  
\mathchardef\odot="220C  
\mathchardef\oslash="220B  
\mathchardef\otimes="220A  
\mathchardef\ominus="2209  
\mathchardef\oplus="2208  
\mathchardef\mp="2207  
\mathchardef\pm="2206  
\mathchardef\circ="220E  
\mathchardef\bigcirc="220D  
\mathchardef\setminus="226E % for set difference A\setminus B  
\mathchardef\cdot="2201  
\mathchardef\ast="2203  
\mathchardef\times="2202  
\mathchardef\star="213F  
\mathcode‘\*="2203 % \ast  
\mathcode‘\+="202B  
\mathcode‘\-="2200

<..plain tex classes..>+
 \Configure{MathClass}{2}{}{}{}{
 *-+/
 \mathchar"212F
 \mathchar"212E
 \mathchar"2234
 \mathchar"2235
 \mathchar"225E
 \mathchar"225F
 \mathchar"225C
 \mathchar"225B
 \mathchar"227A
 \mathchar"2279
 \mathchar"2275
 \mathchar"2274
 \mathchar"225D
 \mathchar"2271
 \mathchar"2205
 \mathchar"220F
 \mathchar"226F
 \mathchar"2204
 \mathchar"220C
 \mathchar"220B
 \mathchar"220A
 \mathchar"2209
 \mathchar"2208
 \mathchar"2207
 \mathchar"2206
 \mathchar"220E
 \mathchar"220D
 \mathchar"226E
 \mathchar"2201
 \mathchar"2203
 \mathchar"2202
 \mathchar"213F
 }
-_-_-

4.19.2 3: Relational Operations

The catcode is needed because 303A is :.

<..plain tex classes..>+
 \Configure{MathClass}{3}{}{}{}{
    \mathchar"3128
    \mathchar"3129
    \mathchar"312A
    \mathchar"312B
    \mathchar"315E
    \mathchar"315F
    \mathchar"3210
    \mathchar"3211
    \mathchar"3212
    \mathchar"3213
    \mathchar"3214
    \mathchar"3215
    \mathchar"3216
    \mathchar"3217
    \mathchar"3218
    \mathchar"3219
    \mathchar"321A
    \mathchar"321B
    \mathchar"321C
    \mathchar"321D
    \mathchar"321E
    \mathchar"321F
    \mathchar"3220
    \mathchar"3221
    \mathchar"3224
    \mathchar"3227
    \mathchar"3232
    \mathchar"3233
    \mathchar"3236
    \mathchar"3237
    \mathchar"323F
    :=><
    \mathchar"322F
    \mathchar"3276
    \mathchar"3277
    \mathchar"326B
    \mathchar"326A
    \mathchar"3261
    \mathchar"3260
    \mathchar"3225
    \mathchar"3226
    \mathchar"322D
    \mathchar"322E
    \mathchar"322C
    \mathchar"3228
    \mathchar"3229
 }
-_-_-
\mathcode‘\>="313E  
\mathcode‘\<="313C  
\mathcode‘\=="303D  
\mathcode‘\:="303A  
\mathchardef\leq="3214 \let\le=\leq  
\mathchardef\geq="3215 \let\ge=\geq  
\mathchardef\succ="321F  
\mathchardef\prec="321E  
\mathchardef\approx="3219  
\mathchardef\succeq="3217  
\mathchardef\preceq="3216  
\mathchardef\supset="321B  
\mathchardef\set="321A  
\mathchardef\supseteq="3213  
\mathchardef\seteq="3212  
\mathchardef\in="3232  
\mathchardef\ni="3233 \let\owns=\ni  
\mathchardef\gg="321D  
\mathchardef\ll="321C  
\mathchardef\not="3236  
\mathchardef\leftrightarrow="3224  
\mathchardef\leftarrow="3220 \let\gets=\leftarrow  
\mathchardef\rightarrow="3221 \let\to=\rightarrow  
\mathchardef\mapstochar="3237 \def\mapsto{\mapstochar\rightarrow}  
\mathchardef\sim="3218  
\mathchardef\simeq="3227  
\mathchardef\perp="323F  
\mathchardef\equiv="3211  
\mathchardef\asymp="3210  
\mathchardef\smile="315E  
\mathchardef\frown="315F  
\mathchardef\leftharpoonup="3128  
\mathchardef\leftharpoondown="3129  
\mathchardef\rightharpoonup="312A  
\mathchardef\rightharpoondown="312B  
\mathchardef\propto="322F  
\mathchardef\sqsubseteq="3276  
\mathchardef\sqsupseteq="3277  
\mathchardef\parallel="326B  
\mathchardef\mid="326A  
\mathchardef\dashv="3261  
\mathchardef\vdash="3260  
\mathchardef\nearrow="3225  
\mathchardef\searrow="3226  
\mathchardef\nwarrow="322D  
\mathchardef\swarrow="322E  
\mathchardef\Leftrightarrow="322C  
\mathchardef\Leftarrow="3228  
\mathchardef\Rightarrow="3229

4.19.3 4/5: Delimiters

\mathcode‘\(="4028  
\mathcode‘\)="5029  
\mathcode‘\[="405B  
\mathcode‘\]="505D  
\mathcode‘\{="4266  
\mathcode‘\}="5267  
\delcode‘\(="028300  
\delcode‘\)="029301  
\delcode‘\[="05B302  
\delcode‘\]="05D303  
\def\lmoustache{\delimiter"437A340 } % top from (, bottom from )  
\def\rmoustache{\delimiter"537B341 } % top from ), bottom from (  
\def\lgroup{\delimiter"462833A } % extensible ( with sharper tips  
\def\rgroup{\delimiter"562933B } % extensible ) with sharper tips  
\def\backslash{\delimiter"26E30F } % for double coset G\backslash H  
\def\rangle{\delimiter"526930B }  
\def\langle{\delimiter"426830A }  
\def\rbrace{\delimiter"5267309 } \let\}=\rbrace  
\def\lbrace{\delimiter"4266308 } \let\{=\lbrace  
\def\rceil{\delimiter"5265307 }  
\def\lceil{\delimiter"4264306 }  
\def\rfloor{\delimiter"5263305 }  
\def\lfloor{\delimiter"4262304 }  
\def\arrowvert{\delimiter"26A33C } % arrow without arrowheads  
\def\Arrowvert{\delimiter"26B33D } % double arrow without arrowheads  
\def\bracevert{\delimiter"77C33E } % the vertical bar that extends braces  
\def\Vert{\delimiter"26B30D } \let\|=\Vert         How should these be treated?  
\def\vert{\delimiter"26A30C }                       "   "       "    "   "  
\def\uparrow{\delimiter"3222378 }  
\def\downarrow{\delimiter"3223379 }  
\def\updownarrow{\delimiter"326C33F }  
\def\Uparrow{\delimiter"322A37E }  
\def\Downarrow{\delimiter"322B37F }  
\def\Updownarrow{\delimiter"326D377 }

The comamnds \Configure{MathClass}{4}... and \Configure{MathClass}{5}... are for unmatched delimiters, and the comamnd \Configure{MathDelimiters}{(}{)} is for matched ones.

<..plain tex classes..>+
 \Configure{MathClass}{4}{}{}{}{}
 \Configure{MathDelimiters}{(}{)}
 \Configure{MathDelimiters}{[}{]}
 \Configure{MathDelimiters}{\mathchar"4262}{\mathchar"5263}
 \Configure{MathDelimiters}{\mathchar"4264}{\mathchar"5265}
 \Configure{MathDelimiters}{\mathchar"4266}{\mathchar"5267}
 \Configure{MathDelimiters}{\mathchar"4268}{\mathchar"5269}
 \Configure{MathDelimiters}{\mathchar"4300}{\mathchar"5301}
 \Configure{MathDelimiters}{\mathchar"4302}{\mathchar"5303}
 \Configure{MathDelimiters}{\mathchar"4304}{\mathchar"5305}
 \Configure{MathDelimiters}{\mathchar"4306}{\mathchar"5307}
 \Configure{MathDelimiters}{\mathchar"4308}{\mathchar"5309}
 \Configure{MathDelimiters}{\mathchar"430A}{\mathchar"530B}
-_-_-
\mathcode‘\?="503F

4.19.4 6: Punctuation Marks

\mathchardef\ldotp="613A % ldot as a punctuation mark  
\mathchardef\cdotp="6201 % cdot as a punctuation mark  
\mathchardef\colon="603A % colon as a punctuation mark  
\mathcode‘\;="603B  
\mathcode‘\,="613B

<..plain tex classes..>+
 \Configure{MathClass}{6}{}{}{}{
 \mathchar"613A
 \mathchar"6201
 \mathchar"603A
 ?; ,
 }
-_-_-

4.19.5 Questions

 
 
\delcode‘\<="26830A  
\delcode‘\>="26930B  
\delcode‘\|="26A30C  
\delcode‘\\="26E30F  
 
% N.B. { and } should NOT get delcodes; otherwise parameter grouping fails!  
 
\def\mathhexbox#1#2#3{\leavevmode  
  \hbox{$\m@th \mathchar"#1#2#3$}}  
\def\dag{\mathhexbox279}  
\def\ddag{\mathhexbox27A}  
\def\S{\mathhexbox278}  
\def\P{\mathhexbox27B}

4.19.6 Type 4: Math Open

latex.ltx, fontmath.ltx, plain.tex