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