texutil.ml 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  1. open Parser
  2. open Render_info
  3. open Tex
  4. open Util
  5. let tex_part = function
  6. HTMLABLE (_,t,_) -> t
  7. | HTMLABLEM (_,t,_) -> t
  8. | HTMLABLEC (_,t,_) -> t
  9. | MHTMLABLEC (_,t,_,_,_) -> t
  10. | HTMLABLE_BIG (t,_) -> t
  11. | TEX_ONLY t -> t
  12. let rec render_tex = function
  13. TEX_FQ (a,b,c) -> (render_tex a) ^ "_{" ^ (render_tex b) ^ "}^{" ^ (render_tex c) ^ "}"
  14. | TEX_DQ (a,b) -> (render_tex a) ^ "_{" ^ (render_tex b) ^ "}"
  15. | TEX_UQ (a,b) -> (render_tex a) ^ "^{" ^ (render_tex b) ^ "}"
  16. | TEX_FQN (a,b) -> "_{" ^ (render_tex a) ^ "}^{" ^ (render_tex b) ^ "}"
  17. | TEX_DQN (a) -> "_{" ^ (render_tex a) ^ "}"
  18. | TEX_UQN (a) -> "^{" ^ (render_tex a) ^ "}"
  19. | TEX_LITERAL s -> tex_part s
  20. | TEX_FUN1 (f,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}"
  21. | TEX_FUN1hl (f,_,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}"
  22. | TEX_FUN1hf (f,_,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}"
  23. | TEX_DECLh (f,_,a) -> "{" ^ f ^ "{" ^ (mapjoin render_tex a) ^ "}}"
  24. | TEX_FUN2 (f,a,b) -> "{" ^ f ^ " " ^ (render_tex a) ^ (render_tex b) ^ "}"
  25. | TEX_FUN2nb (f,a,b) -> f ^ (render_tex a) ^ (render_tex b)
  26. | TEX_FUN2h (f,_,a,b) -> "{" ^ f ^ " " ^ (render_tex a) ^ (render_tex b) ^ "}"
  27. | TEX_FUN2sq (f,a,b) -> "{" ^ f ^ "[ " ^ (render_tex a) ^ "]" ^ (render_tex b) ^ "}"
  28. | TEX_CURLY (tl) -> "{" ^ (mapjoin render_tex tl) ^ "}"
  29. | TEX_INFIX (s,ll,rl) -> "{" ^ (mapjoin render_tex ll) ^ " " ^ s ^ "" ^ (mapjoin render_tex rl) ^ "}"
  30. | TEX_INFIXh (s,_,ll,rl) -> "{" ^ (mapjoin render_tex ll) ^ " " ^ s ^ "" ^ (mapjoin render_tex rl) ^ "}"
  31. | TEX_BOX (bt,s) -> "{"^bt^"{" ^ s ^ "}}"
  32. | TEX_BIG (bt,d) -> "{"^bt^(tex_part d)^"}"
  33. | TEX_MATRIX (t,rows) -> "{\\begin{"^t^"}"^(mapjoine "\\\\" (mapjoine "&" (mapjoin render_tex)) rows)^"\\end{"^t^"}}"
  34. | TEX_LR (l,r,tl) -> "\\left "^(tex_part l)^(mapjoin render_tex tl)^"\\right "^(tex_part r)
  35. (* Dynamic loading*)
  36. type encoding_t = LATIN1 | LATIN2 | UTF8
  37. let modules_ams = ref false
  38. let modules_nonascii = ref false
  39. let modules_encoding = ref UTF8
  40. let modules_color = ref false
  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. let get_encoding = function
  46. UTF8 -> "\\usepackage{ucs}\n\\usepackage[utf8]{inputenc}\n"
  47. | LATIN1 -> "\\usepackage[latin1]{inputenc}\n"
  48. | 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. (if !modules_color then "\\usepackage[dvips,usenames]{color}\n" else "") ^
  53. "\\usepackage{cancel}\n\\pagestyle{empty}\n\\begin{document}\n$$\n"
  54. 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
  60. (* Turn that into hash table lookup *)
  61. exception Illegal_tex_function of string
  62. let find = function
  63. "\\alpha" -> LITERAL (HTMLABLEC (FONT_UF, "\\alpha ", "α"))
  64. | "\\Alpha" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  65. "\\mathrm{A}", "Α")))
  66. | "\\beta" -> LITERAL (HTMLABLEC (FONT_UF, "\\beta ", "β"))
  67. | "\\Beta" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  68. "\\mathrm{B}", "Β")))
  69. | "\\gamma" -> LITERAL (HTMLABLEC (FONT_UF, "\\gamma ", "γ"))
  70. | "\\Gamma" -> LITERAL (HTMLABLEC (FONT_UF, "\\Gamma ", "Γ"))
  71. | "\\delta" -> LITERAL (HTMLABLEC (FONT_UF, "\\delta ", "δ"))
  72. | "\\Delta" -> LITERAL (HTMLABLEC (FONT_UF, "\\Delta ", "Δ"))
  73. | "\\epsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\epsilon ", "ε"))
  74. | "\\Epsilon" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  75. "\\mathrm{E}", "Ε")))
  76. | "\\varepsilon" -> LITERAL (TEX_ONLY "\\varepsilon ")
  77. | "\\zeta" -> LITERAL (HTMLABLEC (FONT_UF, "\\zeta ", "ζ"))
  78. | "\\Zeta" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  79. "\\mathrm{Z}", "Ζ")))
  80. | "\\eta" -> LITERAL (HTMLABLEC (FONT_UF, "\\eta ", "η"))
  81. | "\\Eta" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  82. "\\mathrm{H}", "Η")))
  83. | "\\theta" -> LITERAL (HTMLABLEC (FONT_UF, "\\theta ", "θ"))
  84. | "\\Theta" -> LITERAL (HTMLABLEC (FONT_UF, "\\Theta ", "Θ"))
  85. | "\\vartheta" -> LITERAL (HTMLABLE (FONT_UF, "\\vartheta ", "ϑ"))
  86. | "\\thetasym" -> LITERAL (HTMLABLE (FONT_UF, "\\vartheta ", "ϑ"))
  87. | "\\iota" -> LITERAL (HTMLABLEC (FONT_UF, "\\iota ", "ι"))
  88. | "\\Iota" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  89. "\\mathrm{I}", "Ι")))
  90. | "\\kappa" -> LITERAL (HTMLABLEC (FONT_UF, "\\kappa ", "κ"))
  91. | "\\Kappa" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  92. "\\mathrm{K}", "Κ")))
  93. | "\\lambda" -> LITERAL (HTMLABLEC (FONT_UF, "\\lambda ", "λ"))
  94. | "\\Lambda" -> LITERAL (HTMLABLEC (FONT_UF, "\\Lambda ", "Λ"))
  95. | "\\mu" -> LITERAL (HTMLABLEC (FONT_UF, "\\mu ", "μ"))
  96. | "\\Mu" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  97. "\\mathrm{M}", "Μ")))
  98. | "\\nu" -> LITERAL (HTMLABLEC (FONT_UF, "\\nu ", "ν"))
  99. | "\\Nu" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  100. "\\mathrm{N}", "Ν")))
  101. | "\\omicron" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  102. "\\mathrm{o}", "ο")))
  103. | "\\Omicron" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  104. "\\mathrm{O}", "Ο")))
  105. | "\\pi" -> LITERAL (HTMLABLEC (FONT_UF, "\\pi ", "π"))
  106. | "\\Pi" -> LITERAL (HTMLABLEC (FONT_UF, "\\Pi ", "Π"))
  107. | "\\varpi" -> LITERAL (TEX_ONLY "\\varpi ")
  108. | "\\rho" -> LITERAL (HTMLABLEC (FONT_UF, "\\rho ", "ρ"))
  109. | "\\Rho" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  110. "\\mathrm{P}", "Ρ")))
  111. | "\\varrho" -> LITERAL (TEX_ONLY "\\varrho ")
  112. | "\\sim" -> LITERAL (HTMLABLEC (FONT_UF, "\\sim ", "˜"))
  113. | "\\sigma" -> LITERAL (HTMLABLEC (FONT_UF, "\\sigma ", "σ"))
  114. | "\\Sigma" -> LITERAL (HTMLABLEC (FONT_UF, "\\Sigma ", "Σ"))
  115. | "\\varsigma" -> LITERAL (TEX_ONLY "\\varsigma ")
  116. | "\\tau" -> LITERAL (HTMLABLEC (FONT_UF, "\\tau ", "τ"))
  117. | "\\Tau" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  118. "\\mathrm{T}", "Τ")))
  119. | "\\upsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\upsilon ", "υ"))
  120. | "\\Upsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\Upsilon ", "Υ"))
  121. | "\\phi" -> LITERAL (HTMLABLEC (FONT_UF, "\\phi ", "φ"))
  122. | "\\Phi" -> LITERAL (HTMLABLEC (FONT_UF, "\\Phi ", "Φ"))
  123. | "\\varphi" -> LITERAL (TEX_ONLY "\\varphi ")
  124. | "\\chi" -> LITERAL (HTMLABLEC (FONT_UF, "\\chi ", "χ"))
  125. | "\\Chi" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
  126. "\\mathrm{X}", "Χ")))
  127. | "\\psi" -> LITERAL (HTMLABLEC (FONT_UF, "\\psi ", "ψ"))
  128. | "\\Psi" -> LITERAL (HTMLABLEC (FONT_UF, "\\Psi ", "Ψ"))
  129. | "\\omega" -> LITERAL (HTMLABLEC (FONT_UF, "\\omega ", "ω"))
  130. | "\\Omega" -> LITERAL (HTMLABLEC (FONT_UF, "\\Omega ", "Ω"))
  131. | "\\xi" -> LITERAL (HTMLABLEC (FONT_UF, "\\xi ", "ξ"))
  132. | "\\Xi" -> LITERAL (HTMLABLEC (FONT_UF, "\\Xi ", "Ξ"))
  133. | "\\aleph" -> LITERAL (HTMLABLE (FONT_UF, "\\aleph ", "ℵ"))
  134. | "\\alef" -> LITERAL (HTMLABLE (FONT_UF, "\\aleph ", "ℵ"))
  135. | "\\alefsym" -> LITERAL (HTMLABLE (FONT_UF, "\\aleph ", "ℵ"))
  136. | "\\larr" -> LITERAL (HTMLABLEM (FONT_UF, "\\leftarrow ", "←"))
  137. | "\\leftarrow" -> LITERAL (HTMLABLEM (FONT_UF, "\\leftarrow ", "←"))
  138. | "\\rarr" -> LITERAL (HTMLABLEM (FONT_UF, "\\rightarrow ", "→"))
  139. | "\\to" -> LITERAL (HTMLABLEM (FONT_UF, "\\to ", "→"))
  140. | "\\gets" -> LITERAL (HTMLABLEM (FONT_UF, "\\gets ", "←"))
  141. | "\\rightarrow" -> LITERAL (HTMLABLEM (FONT_UF, "\\rightarrow ", "→"))
  142. | "\\longleftarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\longleftarrow ", "←"))
  143. | "\\longrightarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\longrightarrow ", "→"))
  144. | "\\Larr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftarrow ", "⇐"))
  145. | "\\lArr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftarrow ", "⇐"))
  146. | "\\Leftarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftarrow ", "⇐"))
  147. | "\\Rarr" -> LITERAL (HTMLABLE (FONT_UF, "\\Rightarrow ", "⇒"))
  148. | "\\rArr" -> LITERAL (HTMLABLE (FONT_UF, "\\Rightarrow ", "⇒"))
  149. | "\\Rightarrow" -> LITERAL (HTMLABLEM (FONT_UF, "\\Rightarrow ", "⇒"))
  150. | "\\mapsto" -> LITERAL (HTMLABLE (FONT_UF, "\\mapsto ", "→"))
  151. | "\\longmapsto" -> LITERAL (HTMLABLE (FONT_UF, "\\longmapsto ", "→"))
  152. | "\\Longleftarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\Longleftarrow ", "⇐"))
  153. | "\\Longrightarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\Longrightarrow ", "⇒"))
  154. | "\\uarr" -> DELIMITER (HTMLABLEM (FONT_UF, "\\uparrow ", "↑"))
  155. | "\\uparrow" -> DELIMITER (HTMLABLEM (FONT_UF, "\\uparrow ", "↑"))
  156. | "\\uArr" -> DELIMITER (HTMLABLE (FONT_UF, "\\Uparrow ", "⇑"))
  157. | "\\Uarr" -> DELIMITER (HTMLABLE (FONT_UF, "\\Uparrow ", "⇑"))
  158. | "\\Uparrow" -> DELIMITER (HTMLABLE (FONT_UF, "\\Uparrow ", "⇑"))
  159. | "\\darr" -> DELIMITER (HTMLABLEM (FONT_UF, "\\downarrow ", "↓"))
  160. | "\\downarrow" -> DELIMITER (HTMLABLEM (FONT_UF, "\\downarrow ", "↓"))
  161. | "\\dArr" -> DELIMITER (HTMLABLE (FONT_UF, "\\Downarrow ", "⇓"))
  162. | "\\Darr" -> DELIMITER (HTMLABLE (FONT_UF, "\\Downarrow ", "⇓"))
  163. | "\\Downarrow" -> DELIMITER (HTMLABLE (FONT_UF, "\\Downarrow ", "⇓"))
  164. | "\\updownarrow" -> DELIMITER (TEX_ONLY "\\updownarrow ")
  165. | "\\Updownarrow" -> DELIMITER (TEX_ONLY "\\Updownarrow ")
  166. | "\\ulcorner" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\ulcorner "))
  167. | "\\urcorner" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\urcorner "))
  168. | "\\llcorner" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\llcorner "))
  169. | "\\lrcorner" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\lrcorner "))
  170. | "\\twoheadleftarrow" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\twoheadleftarrow "))
  171. | "\\twoheadrightarrow" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\twoheadrightarrow "))
  172. | "\\xleftarrow" -> (tex_use_ams (); FUN_AR1 "\\xleftarrow ")
  173. | "\\xrightarrow" -> (tex_use_ams (); FUN_AR1 "\\xrightarrow ")
  174. | "\\rightleftharpoons" -> DELIMITER (TEX_ONLY "\\rightleftharpoons ")
  175. | "\\leftrightarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\leftrightarrow ", "↔"))
  176. | "\\lrarr" -> LITERAL (HTMLABLE (FONT_UF, "\\leftrightarrow ", "↔"))
  177. | "\\harr" -> LITERAL (HTMLABLE (FONT_UF, "\\leftrightarrow ", "↔"))
  178. | "\\Leftrightarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "⇔"))
  179. | "\\Lrarr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "⇔"))
  180. | "\\Harr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "⇔"))
  181. | "\\lrArr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "⇔"))
  182. | "\\hAar" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "⇔"))
  183. | "\\longleftrightarrow"->LITERAL (HTMLABLE (FONT_UF, "\\longleftrightarrow ", "↔"))
  184. | "\\Longleftrightarrow"->LITERAL (HTMLABLE (FONT_UF, "\\Longleftrightarrow ", "↔"))
  185. | "\\iff" -> LITERAL (HTMLABLE (FONT_UF, "\\iff ", "↔"))
  186. | "\\ll" -> LITERAL (TEX_ONLY "\\ll ")
  187. | "\\gg" -> LITERAL (TEX_ONLY "\\gg ")
  188. | "\\div" -> LITERAL (TEX_ONLY "\\div ")
  189. | "\\searrow" -> LITERAL (TEX_ONLY "\\searrow ")
  190. | "\\nearrow" -> LITERAL (TEX_ONLY "\\nearrow ")
  191. | "\\swarrow" -> LITERAL (TEX_ONLY "\\swarrow ")
  192. | "\\nwarrow" -> LITERAL (TEX_ONLY "\\nwarrow ")
  193. | "\\simeq" -> LITERAL (TEX_ONLY "\\simeq ")
  194. | "\\ast" -> LITERAL (TEX_ONLY "\\ast ")
  195. | "\\star" -> LITERAL (TEX_ONLY "\\star ")
  196. | "\\ell" -> LITERAL (TEX_ONLY "\\ell ")
  197. | "\\P" -> LITERAL (TEX_ONLY "\\P ")
  198. | "\\smile" -> LITERAL (TEX_ONLY "\\smile ")
  199. | "\\frown" -> LITERAL (TEX_ONLY "\\frown ")
  200. | "\\bigcap" -> LITERAL (TEX_ONLY "\\bigcap ")
  201. | "\\bigodot" -> LITERAL (TEX_ONLY "\\bigodot ")
  202. | "\\bigcup" -> LITERAL (TEX_ONLY "\\bigcup ")
  203. | "\\bigotimes" -> LITERAL (TEX_ONLY "\\bigotimes ")
  204. | "\\coprod" -> LITERAL (TEX_ONLY "\\coprod ")
  205. | "\\bigsqcup" -> LITERAL (TEX_ONLY "\\bigsqcup ")
  206. | "\\bigoplus" -> LITERAL (TEX_ONLY "\\bigoplus ")
  207. | "\\bigvee" -> LITERAL (TEX_ONLY "\\bigvee ")
  208. | "\\biguplus" -> LITERAL (TEX_ONLY "\\biguplus ")
  209. | "\\oint" -> LITERAL (TEX_ONLY "\\oint ")
  210. | "\\bigwedge" -> LITERAL (TEX_ONLY "\\bigwedge ")
  211. | "\\models" -> LITERAL (TEX_ONLY "\\models ")
  212. | "\\vdash" -> LITERAL (TEX_ONLY "\\vdash ")
  213. | "\\triangle" -> LITERAL (TEX_ONLY "\\triangle ")
  214. | "\\bowtie" -> LITERAL (TEX_ONLY "\\bowtie ")
  215. | "\\wr" -> LITERAL (TEX_ONLY "\\wr ")
  216. | "\\triangleleft" -> LITERAL (TEX_ONLY "\\triangleleft ")
  217. | "\\triangleright" -> LITERAL (TEX_ONLY "\\triangleright ")
  218. | "\\textvisiblespace" -> LITERAL (TEX_ONLY "\\textvisiblespace ")
  219. | "\\ker" -> LITERAL (HTMLABLEC(FONT_UFH,"\\ker ","ker"))
  220. | "\\lim" -> LITERAL (TEX_ONLY "\\lim ")
  221. | "\\limsup" -> LITERAL (TEX_ONLY "\\limsup ")
  222. | "\\liminf" -> LITERAL (TEX_ONLY "\\liminf ")
  223. | "\\sup" -> LITERAL (TEX_ONLY "\\sup ")
  224. | "\\Pr" -> LITERAL (TEX_ONLY "\\Pr ")
  225. | "\\hom" -> LITERAL (HTMLABLEC(FONT_UFH,"\\hom ","hom"))
  226. | "\\arg" -> LITERAL (HTMLABLEC(FONT_UFH,"\\arg ","arg"))
  227. | "\\dim" -> LITERAL (HTMLABLEC(FONT_UFH,"\\dim ","dim"))
  228. | "\\inf" -> LITERAL (TEX_ONLY "\\inf ")
  229. | "\\circ" -> LITERAL (TEX_ONLY "\\circ ")
  230. | "\\hbar" -> LITERAL (TEX_ONLY "\\hbar ")
  231. | "\\imath" -> LITERAL (TEX_ONLY "\\imath ")
  232. | "\\jmath" -> LITERAL (TEX_ONLY "\\jmath ")
  233. | "\\lnot" -> LITERAL (TEX_ONLY "\\lnot ")
  234. | "\\hookrightarrow" -> LITERAL (TEX_ONLY "\\hookrightarrow ")
  235. | "\\hookleftarrow" -> LITERAL (TEX_ONLY "\\hookleftarrow ")
  236. | "\\mp" -> LITERAL (TEX_ONLY "\\mp ")
  237. | "\\approx" -> LITERAL (HTMLABLE (FONT_UF, "\\approx ", "≈"))
  238. | "\\propto" -> LITERAL (TEX_ONLY "\\propto ")
  239. | "\\flat" -> LITERAL (TEX_ONLY "\\flat ")
  240. | "\\sharp" -> LITERAL (TEX_ONLY "\\sharp ")
  241. | "\\natural" -> LITERAL (TEX_ONLY "\\natural ")
  242. | "\\int" -> LITERAL (HTMLABLE_BIG ("\\int ", "∫"))
  243. | "\\sum" -> LITERAL (HTMLABLE_BIG ("\\sum ", "∑"))
  244. | "\\prod" -> LITERAL (HTMLABLE_BIG ("\\prod ", "∏"))
  245. | "\\vdots" -> LITERAL (TEX_ONLY "\\vdots ")
  246. | "\\limits" -> LITERAL (TEX_ONLY "\\limits ")
  247. | "\\nolimits" -> LITERAL (TEX_ONLY "\\nolimits ")
  248. | "\\top" -> LITERAL (TEX_ONLY "\\top ")
  249. | "\\sin" -> LITERAL (HTMLABLEC(FONT_UFH,"\\sin ","sin"))
  250. | "\\cos" -> LITERAL (HTMLABLEC(FONT_UFH,"\\cos ","cos"))
  251. | "\\sinh" -> LITERAL (HTMLABLEC(FONT_UFH,"\\sinh ","sinh"))
  252. | "\\cosh" -> LITERAL (HTMLABLEC(FONT_UFH,"\\cosh ","cosh"))
  253. | "\\tan" -> LITERAL (HTMLABLEC(FONT_UFH,"\\tan ","tan"))
  254. | "\\tanh" -> LITERAL (HTMLABLEC(FONT_UFH,"\\tanh ","tanh"))
  255. | "\\sec" -> LITERAL (HTMLABLEC(FONT_UFH,"\\sec ","sec"))
  256. | "\\csc" -> LITERAL (HTMLABLEC(FONT_UFH,"\\csc ","csc"))
  257. | "\\arcsin" -> LITERAL (HTMLABLEC(FONT_UFH,"\\arcsin ","arcsin"))
  258. | "\\arctan" -> LITERAL (HTMLABLEC(FONT_UFH,"\\arctan ","arctan"))
  259. | "\\arccos" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccos}}","arccos")))
  260. | "\\arccot" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccot}}","arccot")))
  261. | "\\arcsec" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arcsec}}","arcsec")))
  262. | "\\arccsc" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccsc}}","arccsc")))
  263. | "\\sgn" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{sgn}}","sgn")))
  264. | "\\cot" -> LITERAL (HTMLABLEC(FONT_UFH,"\\cot ","cot"))
  265. | "\\coth" -> LITERAL (HTMLABLEC(FONT_UFH,"\\coth ","coth"))
  266. | "\\log" -> LITERAL (HTMLABLEC(FONT_UFH,"\\log ", "log"))
  267. | "\\lg" -> LITERAL (HTMLABLEC(FONT_UFH,"\\lg ", "lg"))
  268. | "\\ln" -> LITERAL (HTMLABLEC(FONT_UFH,"\\ln ", "ln"))
  269. | "\\exp" -> LITERAL (HTMLABLEC(FONT_UFH,"\\exp ", "exp"))
  270. | "\\min" -> LITERAL (HTMLABLEC(FONT_UFH,"\\min ", "min"))
  271. | "\\max" -> LITERAL (HTMLABLEC(FONT_UFH,"\\max ", "max"))
  272. | "\\gcd" -> LITERAL (HTMLABLEC(FONT_UFH,"\\gcd ", "gcd"))
  273. | "\\deg" -> LITERAL (HTMLABLEC(FONT_UFH,"\\deg ", "deg"))
  274. | "\\det" -> LITERAL (HTMLABLEC(FONT_UFH,"\\det ", "det"))
  275. | "\\bullet" -> LITERAL (HTMLABLE (FONT_UFH, "\\bullet ", "•"))
  276. | "\\bull" -> LITERAL (HTMLABLE (FONT_UFH, "\\bullet ", "•"))
  277. | "\\angle" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\angle ", "∠")))
  278. | "\\dagger" -> LITERAL (HTMLABLEM(FONT_UFH, "\\dagger ", "†"))
  279. | "\\ddagger" -> LITERAL (HTMLABLEM(FONT_UFH, "\\ddagger ", "‡"))
  280. | "\\Dagger" -> LITERAL (HTMLABLEM(FONT_UFH, "\\ddagger ", "‡"))
  281. | "\\colon" -> LITERAL (HTMLABLEC(FONT_UFH, "\\colon ", ":"))
  282. | "\\Vert" -> DELIMITER (HTMLABLEM(FONT_UFH, "\\Vert ", "||"))
  283. | "\\vert" -> DELIMITER (HTMLABLEM(FONT_UFH, "\\vert ", "|"))
  284. | "\\wp" -> LITERAL (HTMLABLE (FONT_UF, "\\wp ", "℘"))
  285. | "\\weierp" -> LITERAL (HTMLABLE (FONT_UF, "\\wp ", "℘"))
  286. | "\\wedge" -> LITERAL (HTMLABLE (FONT_UF, "\\wedge ", "∧"))
  287. | "\\and" -> LITERAL (HTMLABLE (FONT_UF, "\\land ", "∧"))
  288. | "\\land" -> LITERAL (HTMLABLE (FONT_UF, "\\land ", "∧"))
  289. | "\\vee" -> LITERAL (HTMLABLE (FONT_UF, "\\vee ", "∨"))
  290. | "\\or" -> LITERAL (HTMLABLE (FONT_UF, "\\lor ", "∨"))
  291. | "\\lor" -> LITERAL (HTMLABLE (FONT_UF, "\\lor ", "∨"))
  292. | "\\sub" -> LITERAL (HTMLABLE (FONT_UF, "\\subset ", "⊂"))
  293. | "\\supe" -> LITERAL (HTMLABLE (FONT_UF, "\\supseteq ", "⊇"))
  294. | "\\sube" -> LITERAL (HTMLABLE (FONT_UF, "\\subseteq ", "⊆"))
  295. | "\\supset" -> LITERAL (HTMLABLE (FONT_UF, "\\supset ", "⊃"))
  296. | "\\subset" -> LITERAL (HTMLABLE (FONT_UF, "\\subset ", "⊂"))
  297. | "\\supseteq" -> LITERAL (HTMLABLE (FONT_UF, "\\supseteq ", "⊇"))
  298. | "\\subseteq" -> LITERAL (HTMLABLE (FONT_UF, "\\subseteq ", "⊆"))
  299. | "\\sqsupset" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqsupset "))
  300. | "\\sqsubset" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqsubset "))
  301. | "\\sqsupseteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqsupseteq "))
  302. | "\\sqsubseteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqsubseteq "))
  303. | "\\perp" -> LITERAL (HTMLABLE (FONT_UF, "\\perp ", "⊥"))
  304. | "\\bot" -> LITERAL (HTMLABLE (FONT_UF, "\\bot ", "⊥"))
  305. | "\\lfloor" -> DELIMITER (HTMLABLE (FONT_UF, "\\lfloor ", "⌊"))
  306. | "\\rfloor" -> DELIMITER (HTMLABLE (FONT_UF, "\\rfloor ", "⌋"))
  307. | "\\lceil" -> DELIMITER (HTMLABLE (FONT_UF, "\\lceil ", "⌈"))
  308. | "\\rceil" -> DELIMITER (HTMLABLE (FONT_UF, "\\rceil ", "⌉"))
  309. | "\\lbrace" -> DELIMITER (HTMLABLEC(FONT_UFH, "\\lbrace ", "{"))
  310. | "\\rbrace" -> DELIMITER (HTMLABLEC(FONT_UFH, "\\rbrace ", "}"))
  311. | "\\infty" -> LITERAL (HTMLABLEM(FONT_UF, "\\infty ", "∞"))
  312. | "\\infin" -> LITERAL (HTMLABLEM(FONT_UF, "\\infty ", "∞"))
  313. | "\\isin" -> LITERAL (HTMLABLE (FONT_UF, "\\in ", "∈"))
  314. | "\\in" -> LITERAL (HTMLABLE (FONT_UF, "\\in ", "∈"))
  315. | "\\ni" -> LITERAL (HTMLABLE (FONT_UF, "\\ni ", "∋"))
  316. | "\\notin" -> LITERAL (HTMLABLE (FONT_UF, "\\notin ", "∉"))
  317. | "\\smallsetminus" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\smallsetminus "))
  318. | "\\And" -> (tex_use_ams (); LITERAL (HTMLABLEM(FONT_UFH, "\\And ", " & ")))
  319. | "\\forall" -> LITERAL (HTMLABLE (FONT_UFH, "\\forall ", "∀"))
  320. | "\\exists" -> LITERAL (HTMLABLE (FONT_UFH, "\\exists ", "∃"))
  321. | "\\exist" -> LITERAL (HTMLABLE (FONT_UFH, "\\exists ", "∃"))
  322. | "\\equiv" -> LITERAL (HTMLABLEM(FONT_UFH, "\\equiv ", "≡"))
  323. | "\\ne" -> LITERAL (HTMLABLEM(FONT_UFH, "\\neq ", "≠"))
  324. | "\\neq" -> LITERAL (HTMLABLEM(FONT_UFH, "\\neq ", "≠"))
  325. | "\\Re" -> LITERAL (HTMLABLE (FONT_UF, "\\Re ", "ℜ"))
  326. | "\\real" -> LITERAL (HTMLABLE (FONT_UF, "\\Re ", "ℜ"))
  327. | "\\Im" -> LITERAL (HTMLABLE (FONT_UF, "\\Im ", "ℑ"))
  328. | "\\image" -> LITERAL (HTMLABLE (FONT_UF, "\\Im ", "ℑ"))
  329. | "\\prime" -> LITERAL (HTMLABLE (FONT_UFH,"\\prime ", "′"))
  330. | "\\backslash" -> DELIMITER (HTMLABLEM(FONT_UFH,"\\backslash ", "\\"))
  331. | "\\setminus" -> LITERAL (HTMLABLEM(FONT_UFH,"\\setminus ", "\\"))
  332. | "\\times" -> LITERAL (HTMLABLEM(FONT_UFH,"\\times ", "×"))
  333. | "\\pm" -> LITERAL (HTMLABLEM(FONT_UFH,"\\pm ", "±"))
  334. | "\\plusmn" -> LITERAL (HTMLABLEM(FONT_UFH,"\\pm ", "±"))
  335. | "\\cdot" -> LITERAL (HTMLABLE (FONT_UFH,"\\cdot ", "⋅"))
  336. | "\\AA" -> LITERAL (HTMLABLE (FONT_UFH,"\\AA ", "Å"))
  337. | "\\cdots" -> LITERAL (HTMLABLE (FONT_UFH,"\\cdots ", "⋅⋅⋅"))
  338. | "\\sdot" -> LITERAL (HTMLABLE (FONT_UFH,"\\cdot ", "⋅"))
  339. | "\\oplus" -> LITERAL (HTMLABLE (FONT_UF, "\\oplus ", "⊕"))
  340. | "\\otimes" -> LITERAL (HTMLABLE (FONT_UF, "\\otimes ", "⊗"))
  341. | "\\cap" -> LITERAL (HTMLABLEM(FONT_UF, "\\cap ", "∩"))
  342. | "\\cup" -> LITERAL (HTMLABLE (FONT_UF, "\\cup ", "∪"))
  343. | "\\uplus" -> LITERAL (TEX_ONLY "\\uplus ")
  344. | "\\sqcap" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqcap "))
  345. | "\\sqcup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqcup "))
  346. | "\\empty" -> LITERAL (HTMLABLE (FONT_UF, "\\emptyset ", "∅"))
  347. | "\\emptyset" -> LITERAL (HTMLABLE (FONT_UF, "\\emptyset ", "∅"))
  348. | "\\O" -> LITERAL (HTMLABLE (FONT_UF, "\\emptyset ", "∅"))
  349. | "\\S" -> LITERAL (HTMLABLEM(FONT_UFH,"\\S ", "§"))
  350. | "\\sect" -> LITERAL (HTMLABLEM(FONT_UFH,"\\S ", "§"))
  351. | "\\nabla" -> LITERAL (HTMLABLE (FONT_UF, "\\nabla ", "∇"))
  352. | "\\geq" -> LITERAL (HTMLABLE (FONT_UFH,"\\geq ", "≥"))
  353. | "\\ge" -> LITERAL (HTMLABLE (FONT_UFH,"\\geq ", "≥"))
  354. | "\\leq" -> LITERAL (HTMLABLE (FONT_UFH,"\\leq ", "≤"))
  355. | "\\le" -> LITERAL (HTMLABLE (FONT_UFH,"\\leq ", "≤"))
  356. | "\\cong" -> LITERAL (HTMLABLE (FONT_UF, "\\cong ", "≅"))
  357. | "\\ang" -> LITERAL (HTMLABLE (FONT_UF, "\\angle ", "∠"))
  358. | "\\part" -> LITERAL (HTMLABLEM(FONT_UF, "\\partial ", "∂"))
  359. | "\\partial" -> LITERAL (HTMLABLEM(FONT_UF, "\\partial ", "∂"))
  360. | "\\ldots" -> LITERAL (HTMLABLEM(FONT_UFH,"\\ldots ", "..."))
  361. | "\\dots" -> LITERAL (HTMLABLEM(FONT_UFH,"\\dots ", "..."))
  362. | "\\quad" -> LITERAL (HTMLABLE (FONT_UF, "\\quad ","  "))
  363. | "\\qquad" -> LITERAL (HTMLABLE (FONT_UF, "\\qquad ","    "))
  364. | "\\mid" -> LITERAL (HTMLABLEM(FONT_UFH,"\\mid ", " | "))
  365. | "\\neg" -> LITERAL (HTMLABLEM(FONT_UFH,"\\neg ", "¬"))
  366. | "\\langle" -> DELIMITER (HTMLABLE (FONT_UFH,"\\langle ","⟨"))
  367. | "\\rangle" -> DELIMITER (HTMLABLE (FONT_UFH,"\\rangle ","⟩"))
  368. | "\\lang" -> DELIMITER (HTMLABLE (FONT_UFH,"\\langle ","⟨"))
  369. | "\\rang" -> DELIMITER (HTMLABLE (FONT_UFH,"\\rangle ","⟩"))
  370. | "\\lbrack" -> DELIMITER (HTMLABLEC(FONT_UFH,"[","["))
  371. | "\\rbrack" -> DELIMITER (HTMLABLEC(FONT_UFH,"]","]"))
  372. | "\\surd" -> LITERAL (TEX_ONLY "\\surd ")
  373. | "\\ddots" -> LITERAL (TEX_ONLY "\\ddots ")
  374. | "\\clubs" -> LITERAL (TEX_ONLY "\\clubsuit ")
  375. | "\\clubsuit" -> LITERAL (TEX_ONLY "\\clubsuit ")
  376. | "\\spades" -> LITERAL (TEX_ONLY "\\spadesuit ")
  377. | "\\spadesuit" -> LITERAL (TEX_ONLY "\\spadesuit ")
  378. | "\\hearts" -> LITERAL (TEX_ONLY "\\heartsuit ")
  379. | "\\heartsuit" -> LITERAL (TEX_ONLY "\\heartsuit ")
  380. | "\\diamonds" -> LITERAL (TEX_ONLY "\\diamondsuit ")
  381. | "\\diamond" -> LITERAL (TEX_ONLY "\\diamond ")
  382. | "\\bigtriangleup" -> LITERAL (TEX_ONLY "\\bigtriangleup ")
  383. | "\\bigtriangledown" -> LITERAL (TEX_ONLY "\\bigtriangledown ")
  384. | "\\diamondsuit" -> LITERAL (TEX_ONLY "\\diamondsuit ")
  385. | "\\ominus" -> LITERAL (TEX_ONLY "\\ominus ")
  386. | "\\oslash" -> LITERAL (TEX_ONLY "\\oslash ")
  387. | "\\odot" -> LITERAL (TEX_ONLY "\\odot ")
  388. | "\\bigcirc" -> LITERAL (TEX_ONLY "\\bigcirc ")
  389. | "\\amalg" -> LITERAL (TEX_ONLY "\\amalg ")
  390. | "\\prec" -> LITERAL (TEX_ONLY "\\prec ")
  391. | "\\succ" -> LITERAL (TEX_ONLY "\\succ ")
  392. | "\\preceq" -> LITERAL (TEX_ONLY "\\preceq ")
  393. | "\\succeq" -> LITERAL (TEX_ONLY "\\succeq ")
  394. | "\\dashv" -> LITERAL (TEX_ONLY "\\dashv ")
  395. | "\\asymp" -> LITERAL (TEX_ONLY "\\asymp ")
  396. | "\\doteq" -> LITERAL (TEX_ONLY "\\doteq ")
  397. | "\\parallel" -> LITERAL (TEX_ONLY "\\parallel ")
  398. | "\\implies" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\implies ", "⇒")))
  399. | "\\mod" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mod ", "mod")))
  400. | "\\Diamond" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\Diamond ", "◊")))
  401. | "\\dotsb" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\dotsb ", "⋅⋅⋅")))
  402. | "\\reals" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "<b>R</b>")))
  403. | "\\Reals" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "<b>R</b>")))
  404. | "\\R" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "<b>R</b>")))
  405. | "\\C" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "<b>C</b>")))
  406. | "\\cnums" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "<b>C</b>")))
  407. | "\\Complex" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "<b>C</b>")))
  408. | "\\Z" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{Z}", "<b>Z</b>")))
  409. | "\\natnums" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{N}", "<b>N</b>")))
  410. | "\\N" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{N}", "<b>N</b>")))
  411. | "\\Q" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{Q}", "<b>Q</b>")))
  412. | "\\lVert" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\lVert ", "||")))
  413. | "\\rVert" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\rVert ", "||")))
  414. | "\\nmid" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nmid "))
  415. | "\\lesssim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lesssim "))
  416. | "\\ngeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ngeq "))
  417. | "\\smallsmile" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\smallsmile "))
  418. | "\\smallfrown" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\smallfrown "))
  419. | "\\nleftarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleftarrow "))
  420. | "\\nrightarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nrightarrow "))
  421. | "\\trianglelefteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\trianglelefteq "))
  422. | "\\trianglerighteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\trianglerighteq "))
  423. | "\\square" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\square "))
  424. | "\\checkmark" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\checkmark "))
  425. | "\\supsetneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\supsetneq "))
  426. | "\\subsetneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\subsetneq "))
  427. | "\\Box" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Box "))
  428. | "\\nleq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleq "))
  429. | "\\upharpoonright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\upharpoonright "))
  430. | "\\restriction" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\upharpoonright "))
  431. | "\\upharpoonleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\upharpoonleft "))
  432. | "\\downharpoonright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\downharpoonright "))
  433. | "\\downharpoonleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\downharpoonleft "))
  434. | "\\rightharpoonup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightharpoonup "))
  435. | "\\rightharpoondown" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightharpoondown "))
  436. | "\\leftharpoonup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftharpoonup "))
  437. | "\\leftharpoondown" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftharpoondown "))
  438. | "\\nless" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nless "))
  439. | "\\Vdash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Vdash "))
  440. | "\\vDash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\vDash "))
  441. | "\\varkappa" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varkappa "))
  442. | "\\digamma" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\digamma "))
  443. | "\\beth" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\beth "))
  444. | "\\daleth" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\daleth "))
  445. | "\\gimel" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gimel "))
  446. | "\\complement" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\complement "))
  447. | "\\eth" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\eth "))
  448. | "\\hslash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\hslash "))
  449. | "\\mho" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\mho "))
  450. | "\\Finv" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Finv "))
  451. | "\\Game" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Game "))
  452. | "\\varlimsup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varlimsup "))
  453. | "\\varliminf" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varliminf "))
  454. | "\\varinjlim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varinjlim "))
  455. | "\\varprojlim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varprojlim "))
  456. | "\\injlim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\injlim "))
  457. | "\\projlim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\projlim "))
  458. | "\\iint" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\iint "))
  459. | "\\iiint" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\iiint "))
  460. | "\\iiiint" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\iiiint "))
  461. | "\\varnothing" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varnothing "))
  462. | "\\left" -> LEFT
  463. | "\\right" -> RIGHT
  464. | "\\hat" -> FUN_AR1 "\\hat "
  465. | "\\hline" -> LITERAL (TEX_ONLY "\\hline ")
  466. | "\\vline" -> LITERAL (TEX_ONLY "\\vline ")
  467. | "\\widehat" -> LITERAL (TEX_ONLY "\\widehat ")
  468. | "\\overline" -> LITERAL (TEX_ONLY "\\overline ")
  469. | "\\overbrace" -> LITERAL (TEX_ONLY "\\overbrace ")
  470. | "\\underline" -> LITERAL (TEX_ONLY "\\underline ")
  471. | "\\underbrace" -> LITERAL (TEX_ONLY "\\underbrace ")
  472. | "\\overleftarrow" -> LITERAL (TEX_ONLY "\\overleftarrow ")
  473. | "\\overrightarrow" -> LITERAL (TEX_ONLY "\\overrightarrow ")
  474. | "\\overleftrightarrow"->LITERAL (TEX_ONLY "\\overleftrightarrow ")
  475. | "\\check" -> FUN_AR1 "\\check "
  476. | "\\acute" -> FUN_AR1 "\\acute "
  477. | "\\grave" -> FUN_AR1 "\\grave "
  478. | "\\bar" -> FUN_AR1 "\\bar "
  479. | "\\vec" -> FUN_AR1 "\\vec "
  480. | "\\dot" -> FUN_AR1 "\\dot "
  481. | "\\ddot" -> FUN_AR1 "\\ddot "
  482. | "\\breve" -> FUN_AR1 "\\breve "
  483. | "\\tilde" -> FUN_AR1 "\\tilde "
  484. | "\\not" -> LITERAL (TEX_ONLY "\\not ")
  485. | "\\choose" -> FUN_INFIX "\\choose "
  486. | "\\atop" -> FUN_INFIX "\\atop "
  487. | "\\binom" -> (tex_use_ams (); FUN_AR2 "\\binom ")
  488. | "\\dbinom" -> (tex_use_ams (); FUN_AR2 "\\dbinom ")
  489. | "\\tbinom" -> (tex_use_ams (); FUN_AR2 "\\tbinom ")
  490. | "\\stackrel" -> FUN_AR2 "\\stackrel "
  491. | "\\sideset" -> (tex_use_ams (); FUN_AR2nb "\\sideset ")
  492. | "\\underset" -> (tex_use_ams (); FUN_AR2 "\\underset ")
  493. | "\\overset" -> (tex_use_ams (); FUN_AR2 "\\overset ")
  494. | "\\frac" -> FUN_AR2h ("\\frac ", fun num den -> Html.html_render [num], "<hr style=\"{background: black}\"/>", Html.html_render [den])
  495. | "\\dfrac" -> (tex_use_ams () ; FUN_AR2 "\\dfrac ")
  496. | "\\tfrac" -> (tex_use_ams () ; FUN_AR2h ("\\tfrac ", fun num den -> Html.html_render [num], "<hr style=\"background: black\">", Html.html_render [den]))
  497. | "\\cfrac" -> (tex_use_ams (); FUN_AR2h ("\\cfrac ", fun num den -> Html.html_render [num], "<hr style=\"{background: black}\">", Html.html_render [den]))
  498. | "\\over" -> FUN_INFIXh ("\\over ", fun num den -> Html.html_render num, "<hr style=\"{background: black}\"/>", Html.html_render den)
  499. | "\\sqrt" -> FUN_AR1 "\\sqrt "
  500. | "\\cancel" -> FUN_AR1 "\\cancel "
  501. | "\\cancelto" -> FUN_AR2 "\\cancelto "
  502. | "\\pmod" -> FUN_AR1hl ("\\pmod ", ("(mod ", ")"))
  503. | "\\bmod" -> FUN_AR1hl ("\\bmod ", ("mod ", ""))
  504. | "\\emph" -> FUN_AR1 "\\emph "
  505. | "\\texttt" -> FUN_AR1 "\\texttt "
  506. | "\\textbf" -> FUN_AR1 "\\textbf "
  507. | "\\textit" -> FUN_AR1hf ("\\textit ", FONTFORCE_IT)
  508. | "\\textrm" -> FUN_AR1hf ("\\textrm ", FONTFORCE_RM)
  509. | "\\rm" -> DECLh ("\\rm ", FONTFORCE_RM)
  510. | "\\it" -> DECLh ("\\it ", FONTFORCE_IT)
  511. | "\\cal" -> DECL "\\cal "
  512. | "\\displaystyle" -> LITERAL (TEX_ONLY "\\displaystyle ")
  513. | "\\scriptstyle" -> LITERAL (TEX_ONLY "\\scriptstyle ")
  514. | "\\textstyle" -> LITERAL (TEX_ONLY "\\textstyle ")
  515. | "\\scriptscriptstyle"-> LITERAL (TEX_ONLY "\\scriptscriptstyle ")
  516. | "\\bf" -> DECL "\\bf "
  517. | "\\big" -> BIG "\\big "
  518. | "\\Big" -> BIG "\\Big "
  519. | "\\bigg" -> BIG "\\bigg "
  520. | "\\Bigg" -> BIG "\\Bigg "
  521. | "\\bigl" -> (tex_use_ams ();BIG "\\bigl ")
  522. | "\\bigr" -> (tex_use_ams ();BIG "\\bigr ")
  523. | "\\Bigl" -> (tex_use_ams ();BIG "\\Bigl ")
  524. | "\\Bigr" -> (tex_use_ams ();BIG "\\Bigr ")
  525. | "\\biggl" -> (tex_use_ams ();BIG "\\biggl ")
  526. | "\\biggr" -> (tex_use_ams ();BIG "\\biggr ")
  527. | "\\Biggl" -> (tex_use_ams ();BIG "\\Biggl ")
  528. | "\\Biggr" -> (tex_use_ams ();BIG "\\Biggr ")
  529. | "\\vartriangle" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\vartriangle "))
  530. | "\\triangledown" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\triangledown "))
  531. | "\\lozenge" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lozenge "))
  532. | "\\circledS" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circledS "))
  533. | "\\measuredangle" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\measuredangle "))
  534. | "\\nexists" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nexists "))
  535. | "\\Bbbk" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Bbbk "))
  536. | "\\backprime" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\backprime "))
  537. | "\\blacktriangle" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacktriangle "))
  538. | "\\blacktriangledown"-> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacktriangledown "))
  539. | "\\blacksquare" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacksquare "))
  540. | "\\blacklozenge" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacklozenge "))
  541. | "\\bigstar" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\bigstar "))
  542. | "\\sphericalangle" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sphericalangle "))
  543. | "\\diagup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\diagup "))
  544. | "\\diagdown" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\diagdown "))
  545. | "\\dotplus" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\dotplus "))
  546. | "\\Cap" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Cap "))
  547. | "\\doublecap" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Cap "))
  548. | "\\Cup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Cup "))
  549. | "\\doublecup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Cup "))
  550. | "\\barwedge" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\barwedge "))
  551. | "\\veebar" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\veebar "))
  552. | "\\doublebarwedge" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\doublebarwedge "))
  553. | "\\boxminus" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\boxminus "))
  554. | "\\boxtimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\boxtimes "))
  555. | "\\boxdot" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\boxdot "))
  556. | "\\boxplus" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\boxplus "))
  557. | "\\divideontimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\divideontimes "))
  558. | "\\ltimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ltimes "))
  559. | "\\rtimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rtimes "))
  560. | "\\leftthreetimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftthreetimes "))
  561. | "\\rightthreetimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightthreetimes "))
  562. | "\\curlywedge" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curlywedge "))
  563. | "\\curlyvee" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curlyvee "))
  564. | "\\circleddash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circleddash "))
  565. | "\\circledast" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circledast "))
  566. | "\\circledcirc" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circledcirc "))
  567. | "\\centerdot" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\centerdot "))
  568. | "\\intercal" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\intercal "))
  569. | "\\leqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leqq "))
  570. | "\\leqslant" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leqslant "))
  571. | "\\eqslantless" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\eqslantless "))
  572. | "\\lessapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lessapprox "))
  573. | "\\approxeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\approxeq "))
  574. | "\\lessdot" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lessdot "))
  575. | "\\lll" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lll "))
  576. | "\\lessgtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lessgtr "))
  577. | "\\lesseqgtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lesseqgtr "))
  578. | "\\lesseqqgtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lesseqqgtr "))
  579. | "\\doteqdot" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\doteqdot "))
  580. | "\\Doteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\doteqdot "))
  581. | "\\risingdotseq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\risingdotseq "))
  582. | "\\fallingdotseq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\fallingdotseq "))
  583. | "\\backsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\backsim "))
  584. | "\\backsimeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\backsimeq "))
  585. | "\\subseteqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\subseteqq "))
  586. | "\\Subset" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Subset "))
  587. | "\\preccurlyeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\preccurlyeq "))
  588. | "\\curlyeqprec" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curlyeqprec "))
  589. | "\\precsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\precsim "))
  590. | "\\precapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\precapprox "))
  591. | "\\vartriangleleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\vartriangleleft "))
  592. | "\\Vvdash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Vvdash "))
  593. | "\\bumpeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\bumpeq "))
  594. | "\\Bumpeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Bumpeq "))
  595. | "\\geqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\geqq "))
  596. | "\\geqslant" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\geqslant "))
  597. | "\\eqslantgtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\eqslantgtr "))
  598. | "\\gtrsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtrsim "))
  599. | "\\gtrapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtrapprox "))
  600. | "\\eqsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\eqsim "))
  601. | "\\gtrdot" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtrdot "))
  602. | "\\ggg" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ggg "))
  603. | "\\gggtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ggg "))
  604. | "\\gtrless" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtrless "))
  605. | "\\gtreqless" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtreqless "))
  606. | "\\gtreqqless" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtreqqless "))
  607. | "\\eqcirc" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\eqcirc "))
  608. | "\\circeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circeq "))
  609. | "\\triangleq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\triangleq "))
  610. | "\\thicksim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\thicksim "))
  611. | "\\thickapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\thickapprox "))
  612. | "\\supseteqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\supseteqq "))
  613. | "\\Supset" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Supset "))
  614. | "\\succcurlyeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succcurlyeq "))
  615. | "\\curlyeqsucc" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curlyeqsucc "))
  616. | "\\succsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succsim "))
  617. | "\\succapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succapprox "))
  618. | "\\vartriangleright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\vartriangleright "))
  619. | "\\shortmid" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\shortmid "))
  620. | "\\shortparallel" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\shortparallel "))
  621. | "\\between" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\between "))
  622. | "\\pitchfork" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\pitchfork "))
  623. | "\\varpropto" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varpropto "))
  624. | "\\blacktriangleleft"-> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacktriangleleft "))
  625. | "\\therefore" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\therefore "))
  626. | "\\backepsilon" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\backepsilon "))
  627. | "\\blacktriangleright"-> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacktriangleright "))
  628. | "\\because" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\because "))
  629. | "\\nleqslant" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleqslant "))
  630. | "\\nleqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleqq "))
  631. | "\\lneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lneq "))
  632. | "\\lneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lneqq "))
  633. | "\\lvertneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lvertneqq "))
  634. | "\\lnsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lnsim "))
  635. | "\\lnapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lnapprox "))
  636. | "\\nprec" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nprec "))
  637. | "\\npreceq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\npreceq "))
  638. | "\\precneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\precneqq "))
  639. | "\\precnsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\precnsim "))
  640. | "\\precnapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\precnapprox "))
  641. | "\\nsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsim "))
  642. | "\\nshortmid" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nshortmid "))
  643. | "\\nvdash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nvdash "))
  644. | "\\nVdash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nVdash "))
  645. | "\\ntriangleleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ntriangleleft "))
  646. | "\\ntrianglelefteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ntrianglelefteq "))
  647. | "\\nsubseteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsubseteq "))
  648. | "\\nsubseteqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsubseteqq "))
  649. | "\\varsubsetneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varsubsetneq "))
  650. | "\\subsetneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\subsetneqq "))
  651. | "\\varsubsetneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varsubsetneqq "))
  652. | "\\ngtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ngtr "))
  653. | "\\ngeqslant" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ngeqslant "))
  654. | "\\ngeqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ngeqq "))
  655. | "\\gneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gneq "))
  656. | "\\gneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gneqq "))
  657. | "\\gvertneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gvertneqq "))
  658. | "\\gnsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gnsim "))
  659. | "\\gnapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gnapprox "))
  660. | "\\nsucc" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsucc "))
  661. | "\\nsucceq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsucceq "))
  662. | "\\succneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succneqq "))
  663. | "\\succnsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succnsim "))
  664. | "\\succnapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succnapprox "))
  665. | "\\ncong" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ncong "))
  666. | "\\nshortparallel" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nshortparallel "))
  667. | "\\nparallel" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nparallel "))
  668. | "\\nvDash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nvDash "))
  669. | "\\nVDash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nVDash "))
  670. | "\\ntriangleright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ntriangleright "))
  671. | "\\ntrianglerighteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ntrianglerighteq "))
  672. | "\\nsupseteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsupseteq "))
  673. | "\\nsupseteqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsupseteqq "))
  674. | "\\varsupsetneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varsupsetneq "))
  675. | "\\supsetneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\supsetneqq "))
  676. | "\\varsupsetneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varsupsetneqq "))
  677. | "\\leftleftarrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftleftarrows "))
  678. | "\\leftrightarrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftrightarrows "))
  679. | "\\Lleftarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Lleftarrow "))
  680. | "\\leftarrowtail" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftarrowtail "))
  681. | "\\looparrowleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\looparrowleft "))
  682. | "\\leftrightharpoons"-> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftrightharpoons "))
  683. | "\\curvearrowleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curvearrowleft "))
  684. | "\\circlearrowleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circlearrowleft "))
  685. | "\\Lsh" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Lsh "))
  686. | "\\upuparrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\upuparrows "))
  687. | "\\rightrightarrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightrightarrows "))
  688. | "\\rightleftarrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightleftarrows "))
  689. | "\\Rrightarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Rrightarrow "))
  690. | "\\rightarrowtail" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightarrowtail "))
  691. | "\\looparrowright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\looparrowright "))
  692. | "\\curvearrowright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curvearrowright "))
  693. | "\\circlearrowright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circlearrowright "))
  694. | "\\Rsh" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Rsh "))
  695. | "\\downdownarrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\downdownarrows "))
  696. | "\\multimap" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\multimap "))
  697. | "\\leftrightsquigarrow"-> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftrightsquigarrow "))
  698. | "\\rightsquigarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightsquigarrow "))
  699. | "\\nLeftarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nLeftarrow "))
  700. | "\\nleftrightarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleftrightarrow "))
  701. | "\\nRightarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nRightarrow "))
  702. | "\\nLeftrightarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nLeftrightarrow "))
  703. | "\\mathit" -> (tex_use_ams (); FUN_AR1hf ("\\mathit ", FONTFORCE_IT))
  704. | "\\mathrm" -> (tex_use_ams (); FUN_AR1hf ("\\mathrm ", FONTFORCE_RM))
  705. | "\\mathord" -> (tex_use_ams (); FUN_AR1 "\\mathord ")
  706. | "\\mathop" -> (tex_use_ams (); FUN_AR1 "\\mathop ")
  707. | "\\mathbin" -> (tex_use_ams (); FUN_AR1 "\\mathbin ")
  708. | "\\mathrel" -> (tex_use_ams (); FUN_AR1 "\\mathrel ")
  709. | "\\mathopen" -> (tex_use_ams (); FUN_AR1 "\\mathopen ")
  710. | "\\mathclose" -> (tex_use_ams (); FUN_AR1 "\\mathclose ")
  711. | "\\mathpunct" -> (tex_use_ams (); FUN_AR1 "\\mathpunct ")
  712. | "\\boldsymbol" -> (tex_use_ams (); FUN_AR1 "\\boldsymbol ")
  713. | "\\bold" -> (tex_use_ams (); FUN_AR1 "\\mathbf ")
  714. | "\\Bbb" -> (tex_use_ams (); FUN_AR1 "\\mathbb ")
  715. | "\\mathbf" -> (tex_use_ams (); FUN_AR1 "\\mathbf ")
  716. | "\\mathsf" -> (tex_use_ams (); FUN_AR1 "\\mathsf ")
  717. | "\\mathcal" -> (tex_use_ams (); FUN_AR1 "\\mathcal ")
  718. | "\\mathbb" -> (tex_use_ams (); FUN_AR1 "\\mathbb ")
  719. | "\\mathfrak" -> (tex_use_ams (); FUN_AR1 "\\mathfrak ")
  720. | "\\operatorname" -> (tex_use_ams (); FUN_AR1 "\\operatorname ")
  721. | "\\text" -> raise (Failure "malformatted \\text")
  722. | "\\mbox" -> raise (Failure "malformatted \\mbox")
  723. | "\\vbox" -> raise (Failure "malformatted \\vbox")
  724. | "\\hbox" -> raise (Failure "malformatted \\hbox")
  725. | "\\color" -> (tex_use_color (); LITERAL (TEX_ONLY "\\color"))
  726. | s -> raise (Illegal_tex_function s)