0367fc5ef640b1af9d73d881971d88b0366f1e0f
[lhc/web/wiklou.git] / math / texutil.ml
1 open Parser
2 open Render_info
3 open Tex
4 open Util
5
6 let tex_part = function
7 HTMLABLE (_,t,_) -> t
8 | HTMLABLEM (_,t,_) -> t
9 | HTMLABLEC (_,t,_) -> t
10 | MHTMLABLEC (_,t,_,_,_) -> t
11 | HTMLABLE_BIG (t,_) -> t
12 | TEX_ONLY t -> t
13 let rec render_tex = function
14 TEX_FQ (a,b,c) -> (render_tex a) ^ "_{" ^ (render_tex b) ^ "}^{" ^ (render_tex c) ^ "}"
15 | TEX_DQ (a,b) -> (render_tex a) ^ "_{" ^ (render_tex b) ^ "}"
16 | TEX_UQ (a,b) -> (render_tex a) ^ "^{" ^ (render_tex b) ^ "}"
17 | TEX_LITERAL s -> tex_part s
18 | TEX_FUN1 (f,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}"
19 | TEX_FUN1hl (f,_,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}"
20 | TEX_FUN1hf (f,_,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}"
21 | TEX_DECLh (f,_,a) -> "{" ^ f ^ "{" ^ (mapjoin render_tex a) ^ "}}"
22 | TEX_FUN2 (f,a,b) -> "{" ^ f ^ " " ^ (render_tex a) ^ (render_tex b) ^ "}"
23 | TEX_FUN2h (f,_,a,b) -> "{" ^ f ^ " " ^ (render_tex a) ^ (render_tex b) ^ "}"
24 | TEX_FUN2sq (f,a,b) -> "{" ^ f ^ "[ " ^ (render_tex a) ^ "]" ^ (render_tex b) ^ "}"
25 | TEX_CURLY (tl) -> "{" ^ (mapjoin render_tex tl) ^ "}"
26 | TEX_INFIX (s,ll,rl) -> "{" ^ (mapjoin render_tex ll) ^ " " ^ s ^ "" ^ (mapjoin render_tex rl) ^ "}"
27 | TEX_INFIXh (s,_,ll,rl) -> "{" ^ (mapjoin render_tex ll) ^ " " ^ s ^ "" ^ (mapjoin render_tex rl) ^ "}"
28 | TEX_BOX (bt,s) -> "{"^bt^"{" ^ s ^ "}}"
29 | TEX_BIG (bt,d) -> "{"^bt^(tex_part d)^"}"
30 | TEX_MATRIX (t,rows) -> "{\\begin{"^t^"}"^(mapjoine "\\\\" (mapjoine "&" (mapjoin render_tex)) rows)^"\\end{"^t^"}}"
31 | TEX_LR (l,r,tl) -> "\\left "^(tex_part l)^(mapjoin render_tex tl)^"\\right "^(tex_part r)
32
33 (* Dynamic loading*)
34 type encoding_t = LATIN1 | LATIN2 | UTF8
35
36 let modules_ams = ref false
37 let modules_nonascii = ref false
38 let modules_encoding = ref UTF8
39 let modules_color = ref false
40
41 let tex_use_ams () = modules_ams := true
42 let tex_use_nonascii () = modules_nonascii := true
43 let tex_use_color () = modules_color := true
44 let tex_mod_reset () = (modules_ams := false; modules_nonascii := false; modules_encoding := UTF8; modules_color := false)
45
46 let get_encoding = function
47 UTF8 -> "\\usepackage{ucs}\n\\usepackage[utf8]{inputenc}\n"
48 | LATIN1 -> "\\usepackage[latin1]{inputenc}\n"
49 | LATIN2 -> "\\usepackage[latin2]{inputenc}\n"
50
51 let get_preface () = "\\nonstopmode\n\\documentclass[12pt]{article}\n" ^
52 (if !modules_nonascii then get_encoding !modules_encoding else "") ^
53 (if !modules_ams then "\\usepackage{amsmath}\n\\usepackage{amsfonts}\n\\usepackage{amssymb}\n" else "") ^
54 (if !modules_color then "\\usepackage[dvips,usenames]{color}\n" else "") ^
55 "\\pagestyle{empty}\n\\begin{document}\n$$\n"
56 let get_footer () = "\n$$\n\\end{document}\n"
57
58 let set_encoding = function
59 "ISO-8859-1" -> modules_encoding := LATIN1
60 | "iso-8859-1" -> modules_encoding := LATIN1
61 | "ISO-8859-2" -> modules_encoding := LATIN2
62 | _ -> modules_encoding := UTF8
63
64 (* Turn that into hash table lookup *)
65 exception Illegal_tex_function of string
66
67 let find = function
68 "\\alpha" -> LITERAL (HTMLABLEC (FONT_UF, "\\alpha ", "α"))
69 | "\\Alpha" -> LITERAL (HTMLABLEC (FONT_RTI, "A", "Α"))
70 | "\\beta" -> LITERAL (HTMLABLEC (FONT_UF, "\\beta ", "β"))
71 | "\\Beta" -> LITERAL (HTMLABLEC (FONT_RTI, "B", "Β"))
72 | "\\gamma" -> LITERAL (HTMLABLEC (FONT_UF, "\\gamma ", "γ"))
73 | "\\Gamma" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Gamma ", "Γ"))
74 | "\\delta" -> LITERAL (HTMLABLEC (FONT_UF, "\\delta ", "δ"))
75 | "\\Delta" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Delta ", "Δ"))
76 | "\\epsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\epsilon ", "ε"))
77 | "\\Epsilon" -> LITERAL (HTMLABLEC (FONT_RTI, "E", "Ε"))
78 | "\\varepsilon" -> LITERAL (TEX_ONLY "\\varepsilon ")
79 | "\\zeta" -> LITERAL (HTMLABLEC (FONT_UF, "\\zeta ", "ζ"))
80 | "\\Zeta" -> LITERAL (HTMLABLEC (FONT_RTI, "Z", "Ζ"))
81 | "\\eta" -> LITERAL (HTMLABLEC (FONT_UF, "\\eta ", "η"))
82 | "\\Eta" -> LITERAL (HTMLABLEC (FONT_RTI, "H", "Η"))
83 | "\\theta" -> LITERAL (HTMLABLEC (FONT_UF, "\\theta ", "θ"))
84 | "\\Theta" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Theta ", "Θ"))
85 | "\\vartheta" -> LITERAL (HTMLABLE (FONT_UF, "\\vartheta ", "ϑ"))
86 | "\\thetasym" -> LITERAL (HTMLABLE (FONT_UF, "\\vartheta ", "ϑ"))
87 | "\\iota" -> LITERAL (HTMLABLEC (FONT_UF, "\\iota ", "ι"))
88 | "\\Iota" -> LITERAL (HTMLABLEC (FONT_RTI, "I", "Ι"))
89 | "\\kappa" -> LITERAL (HTMLABLEC (FONT_UF, "\\kappa ", "κ"))
90 | "\\Kappa" -> LITERAL (HTMLABLEC (FONT_RTI, "K", "Κ"))
91 | "\\lambda" -> LITERAL (HTMLABLEC (FONT_UF, "\\lambda ", "λ"))
92 | "\\Lambda" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Lambda ", "Λ"))
93 | "\\mu" -> LITERAL (HTMLABLEC (FONT_UF, "\\mu ", "μ"))
94 | "\\Mu" -> LITERAL (HTMLABLEC (FONT_RTI, "M", "Μ"))
95 | "\\nu" -> LITERAL (HTMLABLEC (FONT_UF, "\\nu ", "ν"))
96 | "\\Nu" -> LITERAL (HTMLABLEC (FONT_RTI, "N", "Ν"))
97 | "\\pi" -> LITERAL (HTMLABLEC (FONT_UF, "\\pi ", "π"))
98 | "\\Pi" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Pi ", "Π"))
99 | "\\varpi" -> LITERAL (TEX_ONLY "\\varpi ")
100 | "\\rho" -> LITERAL (HTMLABLEC (FONT_UF, "\\rho ", "ρ"))
101 | "\\Rho" -> LITERAL (HTMLABLEC (FONT_RTI, "P", "Ρ"))
102 | "\\varrho" -> LITERAL (TEX_ONLY "\\varrho ")
103 | "\\sim" -> LITERAL (HTMLABLEC (FONT_UF, "\\sim ", "˜"))
104 | "\\sigma" -> LITERAL (HTMLABLEC (FONT_UF, "\\sigma ", "σ"))
105 | "\\Sigma" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Sigma ", "Σ"))
106 | "\\varsigma" -> LITERAL (TEX_ONLY "\\varsigma ")
107 | "\\tau" -> LITERAL (HTMLABLEC (FONT_UF, "\\tau ", "τ"))
108 | "\\Tau" -> LITERAL (HTMLABLEC (FONT_RTI, "T", "Τ"))
109 | "\\upsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\upsilon ", "υ"))
110 | "\\Upsilon" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Upsilon ", "Υ"))
111 | "\\phi" -> LITERAL (HTMLABLEC (FONT_UF, "\\phi ", "φ"))
112 | "\\Phi" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Phi ", "Φ"))
113 | "\\varphi" -> LITERAL (TEX_ONLY "\\varphi ")
114 | "\\chi" -> LITERAL (HTMLABLEC (FONT_UF, "\\chi ", "χ"))
115 | "\\Chi" -> LITERAL (HTMLABLEC (FONT_RTI, "X", "Χ"))
116 | "\\psi" -> LITERAL (HTMLABLEC (FONT_UF, "\\psi ", "ψ"))
117 | "\\Psi" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Psi ", "Ψ"))
118 | "\\omega" -> LITERAL (HTMLABLEC (FONT_UF, "\\omega ", "ω"))
119 | "\\Omega" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Omega ", "Ω"))
120 | "\\xi" -> LITERAL (HTMLABLEC (FONT_UF, "\\xi ", "ξ"))
121 | "\\Xi" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Xi ", "Ξ"))
122 | "\\aleph" -> LITERAL (HTMLABLE (FONT_UF, "\\aleph ", "ℵ"))
123 | "\\alef" -> LITERAL (HTMLABLE (FONT_UF, "\\aleph ", "ℵ"))
124 | "\\alefsym" -> LITERAL (HTMLABLE (FONT_UF, "\\aleph ", "ℵ"))
125 | "\\larr" -> LITERAL (HTMLABLEM (FONT_UF, "\\leftarrow ", "←"))
126 | "\\leftarrow" -> LITERAL (HTMLABLEM (FONT_UF, "\\leftarrow ", "←"))
127 | "\\rarr" -> LITERAL (HTMLABLEM (FONT_UF, "\\rightarrow ", "→"))
128 | "\\to" -> LITERAL (HTMLABLEM (FONT_UF, "\\to ", "→"))
129 | "\\gets" -> LITERAL (HTMLABLEM (FONT_UF, "\\gets ", "←"))
130 | "\\rightarrow" -> LITERAL (HTMLABLEM (FONT_UF, "\\rightarrow ", "→"))
131 | "\\longleftarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\longleftarrow ", "←"))
132 | "\\longrightarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\longrightarrow ", "→"))
133 | "\\Larr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftarrow ", "⇐"))
134 | "\\lArr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftarrow ", "⇐"))
135 | "\\Leftarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftarrow ", "⇐"))
136 | "\\Rarr" -> LITERAL (HTMLABLE (FONT_UF, "\\Rightarrow ", "⇒"))
137 | "\\rArr" -> LITERAL (HTMLABLE (FONT_UF, "\\Rightarrow ", "⇒"))
138 | "\\Rightarrow" -> LITERAL (HTMLABLEM (FONT_UF, "\\Rightarrow ", "⇒"))
139 | "\\mapsto" -> LITERAL (HTMLABLE (FONT_UF, "\\mapsto ", "→"))
140 | "\\longmapsto" -> LITERAL (HTMLABLE (FONT_UF, "\\longmapsto ", "→"))
141 | "\\Longleftarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\Longleftarrow ", "⇐"))
142 | "\\Longrightarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\Longrightarrow ", "⇒"))
143 | "\\uarr" -> DELIMITER (HTMLABLEM (FONT_UF, "\\uparrow ", "↑"))
144 | "\\uparrow" -> DELIMITER (HTMLABLEM (FONT_UF, "\\uparrow ", "↑"))
145 | "\\uArr" -> DELIMITER (HTMLABLE (FONT_UF, "\\Uparrow ", "⇑"))
146 | "\\Uarr" -> DELIMITER (HTMLABLE (FONT_UF, "\\Uparrow ", "⇑"))
147 | "\\Uparrow" -> DELIMITER (HTMLABLE (FONT_UF, "\\Uparrow ", "⇑"))
148 | "\\darr" -> DELIMITER (HTMLABLEM (FONT_UF, "\\downarrow ", "↓"))
149 | "\\downarrow" -> DELIMITER (HTMLABLEM (FONT_UF, "\\downarrow ", "↓"))
150 | "\\dArr" -> DELIMITER (HTMLABLE (FONT_UF, "\\Downarrow ", "⇓"))
151 | "\\Darr" -> DELIMITER (HTMLABLE (FONT_UF, "\\Downarrow ", "⇓"))
152 | "\\Downarrow" -> DELIMITER (HTMLABLE (FONT_UF, "\\Downarrow ", "⇓"))
153 | "\\updownarrow" -> DELIMITER (TEX_ONLY "\\updownarrow ")
154 | "\\Updownarrow" -> DELIMITER (TEX_ONLY "\\Updownarrow ")
155 | "\\ulcorner" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\ulcorner "))
156 | "\\urcorner" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\urcorner "))
157 | "\\llcorner" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\llcorner "))
158 | "\\lrcorner" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\lrcorner "))
159 | "\\twoheadleftarrow" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\twoheadleftarrow "))
160 | "\\twoheadrightarrow" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\twoheadrightarrow "))
161 | "\\rightleftharpoons" -> DELIMITER (TEX_ONLY "\\rightleftharpoons ")
162 | "\\leftrightarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\leftrightarrow ", "↔"))
163 | "\\lrarr" -> LITERAL (HTMLABLE (FONT_UF, "\\leftrightarrow ", "↔"))
164 | "\\harr" -> LITERAL (HTMLABLE (FONT_UF, "\\leftrightarrow ", "↔"))
165 | "\\Leftrightarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "⇔"))
166 | "\\Lrarr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "⇔"))
167 | "\\Harr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "⇔"))
168 | "\\lrArr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "⇔"))
169 | "\\hAar" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "⇔"))
170 | "\\longleftrightarrow"->LITERAL (HTMLABLE (FONT_UF, "\\longleftrightarrow ", "↔"))
171 | "\\Longleftrightarrow"->LITERAL (HTMLABLE (FONT_UF, "\\Longleftrightarrow ", "↔"))
172 | "\\iff" -> LITERAL (HTMLABLE (FONT_UF, "\\iff ", "↔"))
173 | "\\ll" -> LITERAL (TEX_ONLY "\\ll ")
174 | "\\gg" -> LITERAL (TEX_ONLY "\\gg ")
175 | "\\div" -> LITERAL (TEX_ONLY "\\div ")
176 | "\\searrow" -> LITERAL (TEX_ONLY "\\searrow ")
177 | "\\nearrow" -> LITERAL (TEX_ONLY "\\nearrow ")
178 | "\\swarrow" -> LITERAL (TEX_ONLY "\\swarrow ")
179 | "\\nwarrow" -> LITERAL (TEX_ONLY "\\nwarrow ")
180 | "\\simeq" -> LITERAL (TEX_ONLY "\\simeq ")
181 | "\\ast" -> LITERAL (TEX_ONLY "\\ast ")
182 | "\\star" -> LITERAL (TEX_ONLY "\\star ")
183 | "\\ell" -> LITERAL (TEX_ONLY "\\ell ")
184 | "\\P" -> LITERAL (TEX_ONLY "\\P ")
185 | "\\smile" -> LITERAL (TEX_ONLY "\\smile ")
186 | "\\frown" -> LITERAL (TEX_ONLY "\\frown ")
187 | "\\bigcap" -> LITERAL (TEX_ONLY "\\bigcap ")
188 | "\\bigodot" -> LITERAL (TEX_ONLY "\\bigodot ")
189 | "\\bigcup" -> LITERAL (TEX_ONLY "\\bigcup ")
190 | "\\bigotimes" -> LITERAL (TEX_ONLY "\\bigotimes ")
191 | "\\coprod" -> LITERAL (TEX_ONLY "\\coprod ")
192 | "\\bigsqcup" -> LITERAL (TEX_ONLY "\\bigsqcup ")
193 | "\\bigoplus" -> LITERAL (TEX_ONLY "\\bigoplus ")
194 | "\\bigvee" -> LITERAL (TEX_ONLY "\\bigvee ")
195 | "\\biguplus" -> LITERAL (TEX_ONLY "\\biguplus ")
196 | "\\oint" -> LITERAL (TEX_ONLY "\\oint ")
197 | "\\bigwedge" -> LITERAL (TEX_ONLY "\\bigwedge ")
198 | "\\models" -> LITERAL (TEX_ONLY "\\models ")
199 | "\\vdash" -> LITERAL (TEX_ONLY "\\vdash ")
200 | "\\triangle" -> LITERAL (TEX_ONLY "\\triangle ")
201 | "\\bowtie" -> LITERAL (TEX_ONLY "\\bowtie ")
202 | "\\wr" -> LITERAL (TEX_ONLY "\\wr ")
203 | "\\triangleleft" -> LITERAL (TEX_ONLY "\\triangleleft ")
204 | "\\triangleright" -> LITERAL (TEX_ONLY "\\triangleright ")
205 | "\\textvisiblespace" -> LITERAL (TEX_ONLY "\\textvisiblespace ")
206 | "\\ker" -> LITERAL (TEX_ONLY "\\ker ")
207 | "\\lim" -> LITERAL (TEX_ONLY "\\lim ")
208 | "\\limsup" -> LITERAL (TEX_ONLY "\\limsup ")
209 | "\\liminf" -> LITERAL (TEX_ONLY "\\liminf ")
210 | "\\sup" -> LITERAL (TEX_ONLY "\\sup ")
211 | "\\Pr" -> LITERAL (TEX_ONLY "\\Pr ")
212 | "\\hom" -> LITERAL (TEX_ONLY "\\hom ")
213 | "\\arg" -> LITERAL (TEX_ONLY "\\arg ")
214 | "\\dim" -> LITERAL (TEX_ONLY "\\dim ")
215 | "\\inf" -> LITERAL (TEX_ONLY "\\inf ")
216 | "\\circ" -> LITERAL (TEX_ONLY "\\circ ")
217 | "\\hbar" -> LITERAL (TEX_ONLY "\\hbar ")
218 | "\\imath" -> LITERAL (TEX_ONLY "\\imath ")
219 | "\\jmath" -> LITERAL (TEX_ONLY "\\jmath ")
220 | "\\lnot" -> LITERAL (TEX_ONLY "\\lnot ")
221 | "\\hookrightarrow" -> LITERAL (TEX_ONLY "\\hookrightarrow ")
222 | "\\hookleftarrow" -> LITERAL (TEX_ONLY "\\hookleftarrow ")
223 | "\\mp" -> LITERAL (TEX_ONLY "\\mp ")
224 | "\\approx" -> LITERAL (TEX_ONLY "\\approx ")
225 | "\\propto" -> LITERAL (TEX_ONLY "\\propto ")
226 | "\\flat" -> LITERAL (TEX_ONLY "\\flat ")
227 | "\\sharp" -> LITERAL (TEX_ONLY "\\sharp ")
228 | "\\natural" -> LITERAL (TEX_ONLY "\\natural ")
229 | "\\int" -> LITERAL (HTMLABLE_BIG ("\\int ", "∫"))
230 | "\\sum" -> LITERAL (HTMLABLE_BIG ("\\sum ", "∑"))
231 | "\\prod" -> LITERAL (HTMLABLE_BIG ("\\prod ", "∏"))
232 | "\\vdots" -> LITERAL (TEX_ONLY "\\vdots ")
233 | "\\limits" -> LITERAL (TEX_ONLY "\\limits ")
234 | "\\nolimits" -> LITERAL (TEX_ONLY "\\nolimits ")
235 | "\\top" -> LITERAL (TEX_ONLY "\\top ")
236 | "\\sin" -> LITERAL (HTMLABLEC(FONT_UFH,"\\sin ","sin"))
237 | "\\cos" -> LITERAL (HTMLABLEC(FONT_UFH,"\\cos ","cos"))
238 | "\\sinh" -> LITERAL (HTMLABLEC(FONT_UFH,"\\sinh ","sinh"))
239 | "\\cosh" -> LITERAL (HTMLABLEC(FONT_UFH,"\\cosh ","cosh"))
240 | "\\tan" -> LITERAL (HTMLABLEC(FONT_UFH,"\\tan ","tan"))
241 | "\\tanh" -> LITERAL (HTMLABLEC(FONT_UFH,"\\tanh ","tanh"))
242 | "\\sec" -> LITERAL (HTMLABLEC(FONT_UFH,"\\sec ","sec"))
243 | "\\csc" -> LITERAL (HTMLABLEC(FONT_UFH,"\\csc ","csc"))
244 | "\\arcsin" -> LITERAL (HTMLABLEC(FONT_UFH,"\\arcsin ","arcsin"))
245 | "\\arctan" -> LITERAL (HTMLABLEC(FONT_UFH,"\\arctan ","arctan"))
246 | "\\arccos" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccos}}","arccos")))
247 | "\\arccot" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccot}}","arccot")))
248 | "\\arcsec" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arcsec}}","arcsec")))
249 | "\\arccsc" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccsc}}","arccsc")))
250 | "\\sgn" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{sgn}}","sgn")))
251 | "\\cot" -> LITERAL (HTMLABLEC(FONT_UFH,"\\cot ","cot"))
252 | "\\coth" -> LITERAL (HTMLABLEC(FONT_UFH,"\\coth ","coth"))
253 | "\\log" -> LITERAL (HTMLABLEC(FONT_UFH,"\\log ", "log"))
254 | "\\lg" -> LITERAL (HTMLABLEC(FONT_UFH,"\\lg ", "lg"))
255 | "\\ln" -> LITERAL (HTMLABLEC(FONT_UFH,"\\ln ", "ln"))
256 | "\\exp" -> LITERAL (HTMLABLEC(FONT_UFH,"\\exp ", "exp"))
257 | "\\min" -> LITERAL (HTMLABLEC(FONT_UFH,"\\min ", "min"))
258 | "\\max" -> LITERAL (HTMLABLEC(FONT_UFH,"\\max ", "max"))
259 | "\\gcd" -> LITERAL (HTMLABLEC(FONT_UFH,"\\gcd ", "gcd"))
260 | "\\deg" -> LITERAL (HTMLABLEC(FONT_UFH,"\\deg ", "deg"))
261 | "\\det" -> LITERAL (HTMLABLEC(FONT_UFH,"\\det ", "det"))
262 | "\\bullet" -> LITERAL (HTMLABLE (FONT_UFH, "\\bullet ", "•"))
263 | "\\bull" -> LITERAL (HTMLABLE (FONT_UFH, "\\bullet ", "•"))
264 | "\\angle" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\angle ", "∠")))
265 | "\\dagger" -> LITERAL (HTMLABLEM(FONT_UFH, "\\dagger ", "†"))
266 | "\\ddagger" -> LITERAL (HTMLABLEM(FONT_UFH, "\\ddagger ", "‡"))
267 | "\\Dagger" -> LITERAL (HTMLABLEM(FONT_UFH, "\\ddagger ", "‡"))
268 | "\\colon" -> LITERAL (HTMLABLEC(FONT_UFH, "\\colon ", ":"))
269 | "\\Vert" -> DELIMITER (HTMLABLEM(FONT_UFH, "\\Vert ", "||"))
270 | "\\vert" -> DELIMITER (HTMLABLEM(FONT_UFH, "\\vert ", "|"))
271 | "\\wp" -> LITERAL (HTMLABLE (FONT_UF, "\\wp ", "℘"))
272 | "\\weierp" -> LITERAL (HTMLABLE (FONT_UF, "\\wp ", "℘"))
273 | "\\wedge" -> LITERAL (HTMLABLE (FONT_UF, "\\wedge ", "∧"))
274 | "\\and" -> LITERAL (HTMLABLE (FONT_UF, "\\land ", "∧"))
275 | "\\land" -> LITERAL (HTMLABLE (FONT_UF, "\\land ", "∧"))
276 | "\\vee" -> LITERAL (HTMLABLE (FONT_UF, "\\vee ", "∨"))
277 | "\\or" -> LITERAL (HTMLABLE (FONT_UF, "\\lor ", "∨"))
278 | "\\lor" -> LITERAL (HTMLABLE (FONT_UF, "\\lor ", "∨"))
279 | "\\sub" -> LITERAL (HTMLABLE (FONT_UF, "\\subset ", "⊂"))
280 | "\\supe" -> LITERAL (HTMLABLE (FONT_UF, "\\supseteq ", "⊇"))
281 | "\\sube" -> LITERAL (HTMLABLE (FONT_UF, "\\subseteq ", "⊆"))
282 | "\\supset" -> LITERAL (HTMLABLE (FONT_UF, "\\supset ", "⊃"))
283 | "\\subset" -> LITERAL (HTMLABLE (FONT_UF, "\\subset ", "⊂"))
284 | "\\supseteq" -> LITERAL (HTMLABLE (FONT_UF, "\\supseteq ", "⊇"))
285 | "\\subseteq" -> LITERAL (HTMLABLE (FONT_UF, "\\subseteq ", "⊆"))
286 | "\\sqsupset" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqsupset "))
287 | "\\sqsubset" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqsubset "))
288 | "\\sqsupseteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqsupseteq "))
289 | "\\sqsubseteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqsubseteq "))
290 | "\\perp" -> LITERAL (HTMLABLE (FONT_UF, "\\perp ", "⊥"))
291 | "\\bot" -> LITERAL (HTMLABLE (FONT_UF, "\\bot ", "⊥"))
292 | "\\lfloor" -> DELIMITER (HTMLABLE (FONT_UF, "\\lfloor ", "⌊"))
293 | "\\rfloor" -> DELIMITER (HTMLABLE (FONT_UF, "\\rfloor ", "⌋"))
294 | "\\lceil" -> DELIMITER (HTMLABLE (FONT_UF, "\\lceil ", "⌈"))
295 | "\\rceil" -> DELIMITER (HTMLABLE (FONT_UF, "\\rceil ", "⌉"))
296 | "\\lbrace" -> DELIMITER (HTMLABLEC(FONT_UFH, "\\lbrace ", "{"))
297 | "\\rbrace" -> DELIMITER (HTMLABLEC(FONT_UFH, "\\rbrace ", "}"))
298 | "\\infty" -> LITERAL (HTMLABLEM(FONT_UF, "\\infty ", "∞"))
299 | "\\infin" -> LITERAL (HTMLABLEM(FONT_UF, "\\infty ", "∞"))
300 | "\\isin" -> LITERAL (HTMLABLE (FONT_UF, "\\in ", "∈"))
301 | "\\in" -> LITERAL (HTMLABLE (FONT_UF, "\\in ", "∈"))
302 | "\\ni" -> LITERAL (HTMLABLE (FONT_UF, "\\ni ", "∋"))
303 | "\\notin" -> LITERAL (HTMLABLE (FONT_UF, "\\notin ", "∉"))
304 | "\\smallsetminus" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\smallsetminus "))
305 | "\\And" -> (tex_use_ams (); LITERAL (HTMLABLEM(FONT_UFH, "\\And ", " & ")))
306 | "\\forall" -> LITERAL (HTMLABLE (FONT_UFH, "\\forall ", "∀"))
307 | "\\exists" -> LITERAL (HTMLABLE (FONT_UFH, "\\exists ", "∃"))
308 | "\\exist" -> LITERAL (HTMLABLE (FONT_UFH, "\\exists ", "∃"))
309 | "\\equiv" -> LITERAL (HTMLABLEM(FONT_UFH, "\\equiv ", "≡"))
310 | "\\ne" -> LITERAL (HTMLABLEM(FONT_UFH, "\\neq ", "≠"))
311 | "\\neq" -> LITERAL (HTMLABLEM(FONT_UFH, "\\neq ", "≠"))
312 | "\\Re" -> LITERAL (HTMLABLE (FONT_UF, "\\Re ", "ℜ"))
313 | "\\real" -> LITERAL (HTMLABLE (FONT_UF, "\\Re ", "ℜ"))
314 | "\\Im" -> LITERAL (HTMLABLE (FONT_UF, "\\Im ", "ℑ"))
315 | "\\image" -> LITERAL (HTMLABLE (FONT_UF, "\\Im ", "ℑ"))
316 | "\\prime" -> LITERAL (HTMLABLE (FONT_UFH,"\\prime ", "′"))
317 | "\\backslash" -> DELIMITER (HTMLABLEM(FONT_UFH,"\\backslash ", "\\"))
318 | "\\setminus" -> LITERAL (HTMLABLEM(FONT_UFH,"\\setminus ", "\\"))
319 | "\\times" -> LITERAL (HTMLABLEM(FONT_UFH,"\\times ", "×"))
320 | "\\pm" -> LITERAL (HTMLABLEM(FONT_UFH,"\\pm ", "±"))
321 | "\\plusmn" -> LITERAL (HTMLABLEM(FONT_UFH,"\\pm ", "±"))
322 | "\\cdot" -> LITERAL (HTMLABLE (FONT_UFH,"\\cdot ", "⋅"))
323 | "\\AA" -> LITERAL (HTMLABLE (FONT_UFH,"\\AA ", "Å"))
324 | "\\cdots" -> LITERAL (HTMLABLE (FONT_UFH,"\\cdots ", "⋅⋅⋅"))
325 | "\\sdot" -> LITERAL (HTMLABLE (FONT_UFH,"\\cdot ", "⋅"))
326 | "\\oplus" -> LITERAL (HTMLABLE (FONT_UF, "\\oplus ", "⊕"))
327 | "\\otimes" -> LITERAL (HTMLABLE (FONT_UF, "\\otimes ", "⊗"))
328 | "\\cap" -> LITERAL (HTMLABLEM(FONT_UF, "\\cap ", "∩"))
329 | "\\cup" -> LITERAL (HTMLABLE (FONT_UF, "\\cup ", "∪"))
330 | "\\uplus" -> LITERAL (TEX_ONLY "\\uplus ")
331 | "\\sqcap" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqcap "))
332 | "\\sqcup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqcup "))
333 | "\\empty" -> LITERAL (HTMLABLE (FONT_UF, "\\emptyset ", "∅"))
334 | "\\emptyset" -> LITERAL (HTMLABLE (FONT_UF, "\\emptyset ", "∅"))
335 | "\\O" -> LITERAL (HTMLABLE (FONT_UF, "\\emptyset ", "∅"))
336 | "\\S" -> LITERAL (HTMLABLEM(FONT_UFH,"\\S ", "§"))
337 | "\\sect" -> LITERAL (HTMLABLEM(FONT_UFH,"\\S ", "§"))
338 | "\\nabla" -> LITERAL (HTMLABLE (FONT_UF, "\\nabla ", "∇"))
339 | "\\geq" -> LITERAL (HTMLABLE (FONT_UFH,"\\geq ", "≥"))
340 | "\\ge" -> LITERAL (HTMLABLE (FONT_UFH,"\\geq ", "≥"))
341 | "\\leq" -> LITERAL (HTMLABLE (FONT_UFH,"\\leq ", "≤"))
342 | "\\le" -> LITERAL (HTMLABLE (FONT_UFH,"\\leq ", "≤"))
343 | "\\cong" -> LITERAL (HTMLABLE (FONT_UF, "\\cong ", "≅"))
344 | "\\ang" -> LITERAL (HTMLABLE (FONT_UF, "\\angle ", "∠"))
345 | "\\part" -> LITERAL (HTMLABLEM(FONT_UF, "\\partial ", "∂"))
346 | "\\partial" -> LITERAL (HTMLABLEM(FONT_UF, "\\partial ", "∂"))
347 | "\\ldots" -> LITERAL (HTMLABLEM(FONT_UFH,"\\ldots ", "..."))
348 | "\\dots" -> LITERAL (HTMLABLEM(FONT_UFH,"\\dots ", "..."))
349 | "\\quad" -> LITERAL (HTMLABLE (FONT_UF, "\\quad ","  "))
350 | "\\qquad" -> LITERAL (HTMLABLE (FONT_UF, "\\qquad ","    "))
351 | "\\mid" -> LITERAL (HTMLABLEM(FONT_UFH,"\\mid ", " | "))
352 | "\\neg" -> LITERAL (HTMLABLEM(FONT_UFH,"\\neg ", "¬"))
353 | "\\langle" -> DELIMITER (HTMLABLE (FONT_UFH,"\\langle ","⟨"))
354 | "\\rangle" -> DELIMITER (HTMLABLE (FONT_UFH,"\\rangle ","⟩"))
355 | "\\lang" -> DELIMITER (HTMLABLE (FONT_UFH,"\\langle ","⟨"))
356 | "\\rang" -> DELIMITER (HTMLABLE (FONT_UFH,"\\rangle ","⟩"))
357 | "\\lbrack" -> DELIMITER (HTMLABLEC(FONT_UFH,"[","["))
358 | "\\rbrack" -> DELIMITER (HTMLABLEC(FONT_UFH,"]","]"))
359 | "\\surd" -> LITERAL (TEX_ONLY "\\surd ")
360 | "\\ddots" -> LITERAL (TEX_ONLY "\\ddots ")
361 | "\\clubs" -> LITERAL (TEX_ONLY "\\clubsuit ")
362 | "\\clubsuit" -> LITERAL (TEX_ONLY "\\clubsuit ")
363 | "\\spades" -> LITERAL (TEX_ONLY "\\spadesuit ")
364 | "\\spadesuit" -> LITERAL (TEX_ONLY "\\spadesuit ")
365 | "\\hearts" -> LITERAL (TEX_ONLY "\\heartsuit ")
366 | "\\heartsuit" -> LITERAL (TEX_ONLY "\\heartsuit ")
367 | "\\diamonds" -> LITERAL (TEX_ONLY "\\diamondsuit ")
368 | "\\diamond" -> LITERAL (TEX_ONLY "\\diamond ")
369 | "\\bigtriangleup" -> LITERAL (TEX_ONLY "\\bigtriangleup ")
370 | "\\bigtriangledown" -> LITERAL (TEX_ONLY "\\bigtriangledown ")
371 | "\\diamondsuit" -> LITERAL (TEX_ONLY "\\diamondsuit ")
372 | "\\ominus" -> LITERAL (TEX_ONLY "\\ominus ")
373 | "\\oslash" -> LITERAL (TEX_ONLY "\\oslash ")
374 | "\\odot" -> LITERAL (TEX_ONLY "\\odot ")
375 | "\\bigcirc" -> LITERAL (TEX_ONLY "\\bigcirc ")
376 | "\\amalg" -> LITERAL (TEX_ONLY "\\amalg ")
377 | "\\prec" -> LITERAL (TEX_ONLY "\\prec ")
378 | "\\succ" -> LITERAL (TEX_ONLY "\\succ ")
379 | "\\preceq" -> LITERAL (TEX_ONLY "\\preceq ")
380 | "\\succeq" -> LITERAL (TEX_ONLY "\\succeq ")
381 | "\\dashv" -> LITERAL (TEX_ONLY "\\dashv ")
382 | "\\asymp" -> LITERAL (TEX_ONLY "\\asymp ")
383 | "\\doteq" -> LITERAL (TEX_ONLY "\\doteq ")
384 | "\\parallel" -> LITERAL (TEX_ONLY "\\parallel ")
385 | "\\implies" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\implies ", "⇒")))
386 | "\\mod" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mod ", "mod")))
387 | "\\Diamond" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\Diamond ", "◊")))
388 | "\\dotsb" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\dotsb ", "⋅⋅⋅")))
389 | "\\reals" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "<b>R</b>")))
390 | "\\Reals" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "<b>R</b>")))
391 | "\\R" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "<b>R</b>")))
392 | "\\cnums" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "<b>C</b>")))
393 | "\\Complex" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "<b>C</b>")))
394 | "\\Z" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{Z}", "<b>Z</b>")))
395 | "\\natnums" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{N}", "<b>N</b>")))
396 | "\\N" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{N}", "<b>N</b>")))
397 | "\\lVert" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\lVert ", "||")))
398 | "\\rVert" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\rVert ", "||")))
399 | "\\nmid" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nmid "))
400 | "\\lesssim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lesssim "))
401 | "\\ngeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ngeq "))
402 | "\\smallsmile" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\smallsmile "))
403 | "\\smallfrown" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\smallfrown "))
404 | "\\nleftarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleftarrow "))
405 | "\\nrightarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nrightarrow "))
406 | "\\trianglelefteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\trianglelefteq "))
407 | "\\trianglerighteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\trianglerighteq "))
408 | "\\square" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\square "))
409 | "\\checkmark" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\checkmark "))
410 | "\\supsetneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\supsetneq "))
411 | "\\subsetneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\subsetneq "))
412 | "\\Box" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Box "))
413 | "\\nleq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleq "))
414 | "\\upharpoonright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\upharpoonright "))
415 | "\\upharpoonleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\upharpoonleft "))
416 | "\\downharpoonright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\downharpoonright "))
417 | "\\downharpoonleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\downharpoonleft "))
418 | "\\rightharpoonup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightharpoonup "))
419 | "\\rightharpoondown" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightharpoondown "))
420 | "\\leftharpoonup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftharpoonup "))
421 | "\\leftharpoondown" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftharpoondown "))
422 | "\\nless" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nless "))
423 | "\\Vdash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Vdash "))
424 | "\\vDash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\vDash "))
425 | "\\varkappa" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varkappa "))
426 | "\\digamma" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\digamma "))
427 | "\\beth" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\beth "))
428 | "\\daleth" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\daleth "))
429 | "\\gimel" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gimel "))
430 | "\\complement" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\complement "))
431 | "\\eth" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\eth "))
432 | "\\hslash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\hslash "))
433 | "\\mho" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\mho "))
434 | "\\Finv" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Finv "))
435 | "\\Game" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Game "))
436 | "\\varlimsup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varlimsup "))
437 | "\\varliminf" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varliminf "))
438 | "\\varinjlim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varinjlim "))
439 | "\\varprojlim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varprojlim "))
440 | "\\injlim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\injlim "))
441 | "\\projlim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\projlim "))
442 | "\\iint" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\iint "))
443 | "\\iiint" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\iiint "))
444 | "\\iiiint" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\iiiint "))
445 | "\\varnothing" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varnothing "))
446 | "\\left" -> LEFT
447 | "\\right" -> RIGHT
448 | "\\hat" -> FUN_AR1 "\\hat "
449 | "\\widehat" -> LITERAL (TEX_ONLY "\\widehat ")
450 | "\\overline" -> LITERAL (TEX_ONLY "\\overline ")
451 | "\\overbrace" -> LITERAL (TEX_ONLY "\\overbrace ")
452 | "\\underline" -> LITERAL (TEX_ONLY "\\underline ")
453 | "\\underbrace" -> LITERAL (TEX_ONLY "\\underbrace ")
454 | "\\overleftarrow" -> LITERAL (TEX_ONLY "\\overleftarrow ")
455 | "\\overrightarrow" -> LITERAL (TEX_ONLY "\\overrightarrow ")
456 | "\\overleftrightarrow"->LITERAL (TEX_ONLY "\\overleftrightarrow ")
457 | "\\check" -> FUN_AR1 "\\check "
458 | "\\acute" -> FUN_AR1 "\\acute "
459 | "\\grave" -> FUN_AR1 "\\grave "
460 | "\\bar" -> FUN_AR1 "\\bar "
461 | "\\vec" -> FUN_AR1 "\\vec "
462 | "\\dot" -> FUN_AR1 "\\dot "
463 | "\\ddot" -> FUN_AR1 "\\ddot "
464 | "\\breve" -> FUN_AR1 "\\breve "
465 | "\\tilde" -> FUN_AR1 "\\tilde "
466 | "\\not" -> LITERAL (TEX_ONLY "\\not ")
467 | "\\choose" -> FUN_INFIX "\\choose "
468 | "\\atop" -> FUN_INFIX "\\atop "
469 | "\\binom" -> FUN_AR2 "\\binom "
470 | "\\stackrel" -> FUN_AR2 "\\stackrel "
471 | "\\frac" -> FUN_AR2h ("\\frac ", fun num den -> Html.html_render [num], "<hr style=\"{background: black}\"/>", Html.html_render [den])
472 | "\\cfrac" -> (tex_use_ams (); FUN_AR2h ("\\cfrac ", fun num den -> Html.html_render [num], "<hr style=\"{background: black}\">", Html.html_render [den]))
473 | "\\over" -> FUN_INFIXh ("\\over ", fun num den -> Html.html_render num, "<hr style=\"{background: black}\"/>", Html.html_render den)
474 | "\\sqrt" -> FUN_AR1 "\\sqrt "
475 | "\\pmod" -> FUN_AR1hl ("\\pmod ", ("(mod ", ")"))
476 | "\\bmod" -> FUN_AR1hl ("\\bmod ", ("mod ", ""))
477 | "\\emph" -> FUN_AR1 "\\emph "
478 | "\\texttt" -> FUN_AR1 "\\texttt "
479 | "\\textbf" -> FUN_AR1 "\\textbf "
480 | "\\textit" -> FUN_AR1hf ("\\textit ", FONTFORCE_IT)
481 | "\\textrm" -> FUN_AR1hf ("\\textrm ", FONTFORCE_RM)
482 | "\\rm" -> DECLh ("\\rm ", FONTFORCE_RM)
483 | "\\it" -> DECLh ("\\it ", FONTFORCE_IT)
484 | "\\cal" -> DECL "\\cal "
485 | "\\displaystyle" -> LITERAL (TEX_ONLY "\\displaystyle ")
486 | "\\scriptstyle" -> LITERAL (TEX_ONLY "\\scriptstyle ")
487 | "\\textstyle" -> LITERAL (TEX_ONLY "\\textstyle ")
488 | "\\scriptscriptstyle"-> LITERAL (TEX_ONLY "\\scriptscriptstyle ")
489 | "\\bf" -> DECL "\\bf "
490 | "\\big" -> BIG "\\big "
491 | "\\Big" -> BIG "\\Big "
492 | "\\bigg" -> BIG "\\bigg "
493 | "\\Bigg" -> BIG "\\Bigg "
494 | "\\mathit" -> (tex_use_ams (); FUN_AR1hf ("\\mathit ", FONTFORCE_IT))
495 | "\\mathrm" -> (tex_use_ams (); FUN_AR1hf ("\\mathrm ", FONTFORCE_RM))
496 | "\\mathop" -> (tex_use_ams (); FUN_AR1 "\\mathop ")
497 | "\\boldsymbol" -> (tex_use_ams (); FUN_AR1 "\\boldsymbol ")
498 | "\\bold" -> (tex_use_ams (); FUN_AR1 "\\mathbf ")
499 | "\\Bbb" -> (tex_use_ams (); FUN_AR1 "\\mathbb ")
500 | "\\mathbf" -> (tex_use_ams (); FUN_AR1 "\\mathbf ")
501 | "\\mathsf" -> (tex_use_ams (); FUN_AR1 "\\mathsf ")
502 | "\\mathcal" -> (tex_use_ams (); FUN_AR1 "\\mathcal ")
503 | "\\mathbb" -> (tex_use_ams (); FUN_AR1 "\\mathbb ")
504 | "\\mathfrak" -> (tex_use_ams (); FUN_AR1 "\\mathfrak ")
505 | "\\operatorname" -> (tex_use_ams (); FUN_AR1 "\\operatorname ")
506 | "\\mbox" -> raise (Failure "malformatted \\mbox")
507 | "\\vbox" -> raise (Failure "malformatted \\vbox")
508 | "\\hbox" -> raise (Failure "malformatted \\hbox")
509 | "\\color" -> (tex_use_color (); LITERAL (TEX_ONLY "\\color"))
510 | s -> raise (Illegal_tex_function s)