summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
commita58285fd06c8113c45377c655dd43cef6337e815 (patch)
treedfe31d3d12652352fe44890b4811eda0728faefb /math
parent20194986f6638233732ba1fc3e838f117d3cc9ea (diff)
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'math')
-rw-r--r--math/html.ml35
-rw-r--r--math/lexer.mll14
-rw-r--r--math/parser.mly25
-rw-r--r--math/tex.mli4
-rw-r--r--math/texutil.ml295
-rw-r--r--math/texvc_test.ml1
6 files changed, 330 insertions, 44 deletions
diff --git a/math/html.ml b/math/html.ml
index 6a24b114..e880f073 100644
--- a/math/html.ml
+++ b/math/html.ml
@@ -47,10 +47,17 @@ let rec html_render_flat ctx = function
match html_render_size ctx a with
true, s -> raise Too_difficult_for_html
| false, s -> s^"<sub>"^bs^"</sub><sup>"^cs^"</sup>")^html_render_flat ctx r)
+ | TEX_DQN (a)::r -> (html_liberal ();
+ let bs = html_render_flat ctx [a] in "<sub>"^bs^"</sub>")^html_render_flat ctx r
+ | TEX_UQN (a)::r -> (html_liberal ();
+ let bs = html_render_flat ctx [a] in "<sup>"^bs^"</sup>")^html_render_flat ctx r
+ | TEX_FQN (a,b)::r -> (html_liberal ();
+ (let bs = html_render_flat ctx [a] in let cs = html_render_flat ctx [b] in "<sub>"^bs^"</sub><sup>"^cs^"</sup>")^html_render_flat ctx r)
| TEX_BOX (_,s)::r -> s^html_render_flat ctx r
| TEX_LITERAL (TEX_ONLY _)::_ -> raise Too_difficult_for_html
| TEX_FUN1 _::_ -> raise Too_difficult_for_html
| TEX_FUN2 _::_ -> raise Too_difficult_for_html
+ | TEX_FUN2nb _::_ -> raise Too_difficult_for_html
| TEX_FUN2h _::_ -> raise Too_difficult_for_html
| TEX_FUN2sq _::_ -> raise Too_difficult_for_html
| TEX_INFIX _::_ -> raise Too_difficult_for_html
@@ -73,16 +80,21 @@ let rec html_render_deep ctx = function
| TEX_INFIXh (_,f,a,b)::r -> (html_liberal (); (f a b)::html_render_deep ctx r)
| TEX_CURLY ls::r -> html_render_deep ctx (ls @ r)
| TEX_DQ (a,b)::r -> (let bs = html_render_flat ctx [b] in match html_render_size ctx a with
- true, s -> "","<font size='+2'>"^s^"</font>",bs
+ true, s -> "","<span style='font-size: x-large; font-family: serif;'>"^s^"</span>",bs
| false, s -> "",(s^"<sub>"^bs^"</sub>"),"")::html_render_deep ctx r
| TEX_UQ (a,b)::r -> (let bs = html_render_flat ctx [b] in match html_render_size ctx a with
- true, s -> bs,"<font size='+2'>"^s^"</font>",""
+ true, s -> bs,"<span style='font-size: x-large; font-family: serif;'>"^s^"</span>",""
| false, s -> "",(s^"<sup>"^bs^"</sup>"),"")::html_render_deep ctx r
| TEX_FQ (a,b,c)::r -> (html_liberal ();
(let bs = html_render_flat ctx [b] in let cs = html_render_flat ctx [c] in
match html_render_size ctx a with
- true, s -> (cs,"<font size='+2'>"^s^"</font>",bs)
+ true, s -> (cs,"<span style='font-size: x-large; font-family: serif;'>"^s^"</span>",bs)
| false, s -> ("",(s^"<sub>"^bs^"</sub><sup>"^cs^"</sup>"),""))::html_render_deep ctx r)
+ | TEX_DQN (a)::r -> (let bs = html_render_flat ctx [a] in "",("<sub>"^bs^"</sub>"),"")::html_render_deep ctx r
+ | TEX_UQN (a)::r -> (let bs = html_render_flat ctx [a] in "",("<sup>"^bs^"</sup>"),"")::html_render_deep ctx r
+ | TEX_FQN (a,b)::r -> (html_liberal ();
+ (let bs = html_render_flat ctx [a] in let cs = html_render_flat ctx [b] in
+ ("",("<sub>"^bs^"</sub><sup>"^cs^"</sup>"),""))::html_render_deep ctx r)
| TEX_FUN1hl (_,(f1,f2),a)::r -> ("",f1,"")::(html_render_deep ctx [a]) @ ("",f2,"")::html_render_deep ctx r
| TEX_FUN1hf (_,ff,a)::r -> (html_render_deep (new_ctx ff) [a]) @ html_render_deep ctx r
| TEX_DECLh (_,ff,a)::r -> (html_render_deep (new_ctx ff) a) @ html_render_deep ctx r
@@ -90,6 +102,7 @@ let rec html_render_deep ctx = function
| TEX_LITERAL (TEX_ONLY _)::_ -> raise Too_difficult_for_html
| TEX_FUN1 _::_ -> raise Too_difficult_for_html
| TEX_FUN2 _::_ -> raise Too_difficult_for_html
+ | TEX_FUN2nb _::_ -> raise Too_difficult_for_html
| TEX_FUN2sq _::_ -> raise Too_difficult_for_html
| TEX_INFIX _::_ -> raise Too_difficult_for_html
| TEX_MATRIX _::_ -> raise Too_difficult_for_html
@@ -106,13 +119,23 @@ let rec html_render_table = function
| sf,false,false,[] -> mapjoin (function (u,m,d) -> m) (List.rev sf)
| sf,true,false,[] -> let ustr,mstr = List.fold_left (fun (us,ms) (u,m,d) -> (us^"<td>"^u^"</td>",ms^"<td>"^u^"</td>"))
("","") (List.rev sf) in
- "<table><tr align='center' valign='bottom'>" ^ ustr ^ "</tr><tr align='center'>" ^ mstr ^ "</tr></table>"
+ "\n<table>\n" ^
+ "\t\t<tr style='text-align: center; vertical-align: bottom;'>" ^ ustr ^ "</tr>\n" ^
+ "\t\t<tr style='text-align: center;'>" ^ mstr ^ "</tr>\n" ^
+ "</table>\n"
| sf,false,true,[] -> let mstr,dstr = List.fold_left (fun (ms,ds) (u,m,d) -> (ms^"<td>"^m^"</td>",ds^"<td>"^d^"</td>"))
("","") (List.rev sf) in
- "<table><tr align='center'>" ^ mstr ^ "</tr><tr align='center' valign='top'>" ^ dstr ^ "</tr></table>"
+ "\n<table>\n" ^
+ "\t\t<tr style='text-align: center;'>" ^ mstr ^ "</tr>\n" ^
+ "\t\t<tr style='text-align: center; vertical-align: top;'>" ^ dstr ^ "</tr>\n" ^
+ "</table>\n"
| sf,true,true,[] -> let ustr,mstr,dstr = List.fold_left (fun (us,ms,ds) (u,m,d) ->
(us^"<td>"^u^"</td>",ms^"<td>"^m^"</td>",ds^"<td>"^d^"</td>")) ("","","") (List.rev sf) in
- "<table><tr align='center' valign='bottom'>" ^ ustr ^ "</tr><tr align='center'>" ^ mstr ^ "</tr><tr align='center' valign='top'>" ^ dstr ^ "</tr></table>"
+ "\n<table>\n" ^
+ "\t\t<tr style='text-align: center; vertical-align: bottom;'>" ^ ustr ^ "</tr>\n" ^
+ "\t\t<tr style='text-align: center;'>" ^ mstr ^ "</tr>\n" ^
+ "\t\t<tr style='text-align: center; vertical-align: top;'>" ^ dstr ^ "</tr>\n" ^
+ "</table>\n"
let html_render tree = html_render_table ([],false,false,html_render_deep CTX_NORMAL tree)
diff --git a/math/lexer.mll b/math/lexer.mll
index e5bb1ddf..4dd31e0e 100644
--- a/math/lexer.mll
+++ b/math/lexer.mll
@@ -16,6 +16,10 @@ let aboxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';'
rule token = parse
space + { token lexbuf }
+ | "\\text" space * '{' boxchars + '}'
+ { Texutil.tex_use_ams (); let str = Lexing.lexeme lexbuf in
+ let n = String.index str '{' + 1 in
+ BOX ("\\text", String.sub str n (String.length str - n - 1)) }
| "\\mbox" space * '{' aboxchars + '}'
{ let str = Lexing.lexeme lexbuf in
let n = String.index str '{' + 1 in
@@ -52,6 +56,8 @@ rule token = parse
| delimiter_uf_op { let str = Lexing.lexeme lexbuf in DELIMITER (MHTMLABLEC (FONT_UFH, str," "^str^" ",MO,str)) }
| "\\" alpha + { Texutil.find (Lexing.lexeme lexbuf) }
| "\\sqrt" space * "[" { FUN_AR1opt "\\sqrt" }
+ | "\\xleftarrow" space * "[" { Texutil.tex_use_ams(); FUN_AR1opt "\\xleftarrow" }
+ | "\\xrightarrow" space * "[" { Texutil.tex_use_ams(); FUN_AR1opt "\\xrightarrow" }
| "\\," { LITERAL (HTMLABLE (FONT_UF, "\\,","&nbsp;")) }
| "\\ " { LITERAL (HTMLABLE (FONT_UF, "\\ ","&nbsp;")) }
| "\\;" { LITERAL (HTMLABLE (FONT_UF, "\\;","&nbsp;")) }
@@ -77,6 +83,14 @@ rule token = parse
| "\\end{vmatrix}" { END_VMATRIX }
| "\\begin{Vmatrix}" { Texutil.tex_use_ams(); BEGIN_VVMATRIX }
| "\\end{Vmatrix}" { END_VVMATRIX }
+ | "\\begin{array}" { Texutil.tex_use_ams(); BEGIN_ARRAY }
+ | "\\end{array}" { END_ARRAY }
+ | "\\begin{align}" { Texutil.tex_use_ams(); BEGIN_ALIGN }
+ | "\\end{align}" { END_ALIGN }
+ | "\\begin{alignat}" { Texutil.tex_use_ams(); BEGIN_ALIGNAT }
+ | "\\end{alignat}" { END_ALIGNAT }
+ | "\\begin{smallmatrix}" { Texutil.tex_use_ams(); BEGIN_SMALLMATRIX }
+ | "\\end{smallmatrix}" { END_SMALLMATRIX }
| "\\begin{cases}" { Texutil.tex_use_ams(); BEGIN_CASES }
| "\\end{cases}" { END_CASES }
| '>' { LITERAL (HTMLABLEC(FONT_UFH,">"," &gt; ")) }
diff --git a/math/parser.mly b/math/parser.mly
index 4787db37..29882fb4 100644
--- a/math/parser.mly
+++ b/math/parser.mly
@@ -5,17 +5,16 @@
let sq_close_ri = HTMLABLEC(FONT_UFH,"]", "]")
%}
%token <Render_info.t> LITERAL DELIMITER
-%token <string> FUN_AR2 FUN_INFIX FUN_AR1 DECL FUN_AR1opt BIG
+%token <string> FUN_AR2 FUN_INFIX FUN_AR1 DECL FUN_AR1opt BIG FUN_AR2nb
%token <string*string> BOX
%token <string*(string*string)> FUN_AR1hl
%token <string*Render_info.font_force> FUN_AR1hf DECLh
%token <string*(Tex.t->Tex.t->string*string*string)> FUN_AR2h
%token <string*(Tex.t list->Tex.t list->string*string*string)> FUN_INFIXh
%token EOF CURLY_OPEN CURLY_CLOSE SUB SUP SQ_CLOSE NEXT_CELL NEXT_ROW
-%token BEGIN__MATRIX BEGIN_PMATRIX BEGIN_BMATRIX BEGIN_BBMATRIX BEGIN_VMATRIX BEGIN_VVMATRIX BEGIN_CASES
-%token END__MATRIX END_PMATRIX END_BMATRIX END_BBMATRIX END_VMATRIX END_VVMATRIX END_CASES
-%token LEFT RIGHT
-
+%token BEGIN__MATRIX BEGIN_PMATRIX BEGIN_BMATRIX BEGIN_BBMATRIX BEGIN_VMATRIX BEGIN_VVMATRIX BEGIN_CASES BEGIN_ARRAY BEGIN_ALIGN BEGIN_ALIGNAT BEGIN_SMALLMATRIX
+%token END__MATRIX END_PMATRIX END_BMATRIX END_BBMATRIX END_VMATRIX END_VVMATRIX END_CASES END_ARRAY END_ALIGN END_ALIGNAT END_SMALLMATRIX
+%token LEFT RIGHT
%type <Tex.t list> tex_expr
%start tex_expr
@@ -54,14 +53,25 @@ lit_aq:
lit { $1 }
| lit_dq { let base,downi = $1 in TEX_DQ(base,downi) }
| lit_uq { let base,upi = $1 in TEX_UQ(base,upi)}
+ | lit_dqn { TEX_DQN($1) }
+ | lit_uqn { TEX_UQN($1) }
| lit_fq { $1 }
+
lit_fq:
lit_dq SUP lit { let base,downi = $1 in TEX_FQ(base,downi,$3) }
| lit_uq SUB lit { let base,upi = $1 in TEX_FQ(base,$3,upi) }
+ | lit_dqn SUP lit { TEX_FQN($1, $3) }
+
lit_uq:
lit SUP lit { $1,$3 }
lit_dq:
lit SUB lit { $1,$3 }
+lit_uqn:
+ SUP lit { $2 }
+lit_dqn:
+ SUB lit { $2 }
+
+
left:
LEFT DELIMITER { $2 }
| LEFT SQ_CLOSE { sq_close_ri }
@@ -79,6 +89,7 @@ lit:
| FUN_AR1hf lit { let t,h=$1 in TEX_FUN1hf(t,h,$2) }
| FUN_AR1opt expr_nosqc SQ_CLOSE lit { TEX_FUN2sq($1,TEX_CURLY $2,$4) }
| FUN_AR2 lit lit { TEX_FUN2($1,$2,$3) }
+ | FUN_AR2nb lit lit { TEX_FUN2nb($1,$2,$3) }
| FUN_AR2h lit lit { let t,h=$1 in TEX_FUN2h(t,h,$2,$3) }
| BOX { let bt,s = $1 in TEX_BOX (bt,s) }
| CURLY_OPEN expr CURLY_CLOSE
@@ -93,6 +104,10 @@ lit:
| BEGIN_BBMATRIX matrix END_BBMATRIX { TEX_MATRIX ("Bmatrix", $2) }
| BEGIN_VMATRIX matrix END_VMATRIX { TEX_MATRIX ("vmatrix", $2) }
| BEGIN_VVMATRIX matrix END_VVMATRIX { TEX_MATRIX ("Vmatrix", $2) }
+ | BEGIN_ARRAY matrix END_ARRAY { TEX_MATRIX ("array", $2) }
+ | BEGIN_ALIGN matrix END_ALIGN { TEX_MATRIX ("aligned", $2) }
+ | BEGIN_ALIGNAT matrix END_ALIGNAT { TEX_MATRIX ("alignedat", $2) }
+ | BEGIN_SMALLMATRIX matrix END_SMALLMATRIX { TEX_MATRIX ("smallmatrix", $2) }
| BEGIN_CASES matrix END_CASES { TEX_MATRIX ("cases", $2) }
matrix:
line { [$1] }
diff --git a/math/tex.mli b/math/tex.mli
index 9e6013df..f2ed37cf 100644
--- a/math/tex.mli
+++ b/math/tex.mli
@@ -4,11 +4,15 @@ type t =
| TEX_FQ of t * t * t
| TEX_DQ of t * t
| TEX_UQ of t * t
+ | TEX_FQN of t * t
+ | TEX_DQN of t
+ | TEX_UQN of t
| TEX_LR of Render_info.t * Render_info.t * t list
| TEX_BOX of string * string
| TEX_BIG of string * Render_info.t
| TEX_FUN1 of string * t
| TEX_FUN2 of string * t * t
+ | TEX_FUN2nb of string * t * t
| TEX_INFIX of string * t list * t list
| TEX_FUN2sq of string * t * t
| TEX_FUN1hl of string * (string * string) * t
diff --git a/math/texutil.ml b/math/texutil.ml
index b4cd268c..f9ebb258 100644
--- a/math/texutil.ml
+++ b/math/texutil.ml
@@ -14,12 +14,16 @@ let rec render_tex = function
TEX_FQ (a,b,c) -> (render_tex a) ^ "_{" ^ (render_tex b) ^ "}^{" ^ (render_tex c) ^ "}"
| TEX_DQ (a,b) -> (render_tex a) ^ "_{" ^ (render_tex b) ^ "}"
| TEX_UQ (a,b) -> (render_tex a) ^ "^{" ^ (render_tex b) ^ "}"
+ | TEX_FQN (a,b) -> "_{" ^ (render_tex a) ^ "}^{" ^ (render_tex b) ^ "}"
+ | TEX_DQN (a) -> "_{" ^ (render_tex a) ^ "}"
+ | TEX_UQN (a) -> "^{" ^ (render_tex a) ^ "}"
| TEX_LITERAL s -> tex_part s
| TEX_FUN1 (f,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}"
| TEX_FUN1hl (f,_,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}"
| TEX_FUN1hf (f,_,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}"
| TEX_DECLh (f,_,a) -> "{" ^ f ^ "{" ^ (mapjoin render_tex a) ^ "}}"
| TEX_FUN2 (f,a,b) -> "{" ^ f ^ " " ^ (render_tex a) ^ (render_tex b) ^ "}"
+ | TEX_FUN2nb (f,a,b) -> f ^ (render_tex a) ^ (render_tex b)
| TEX_FUN2h (f,_,a,b) -> "{" ^ f ^ " " ^ (render_tex a) ^ (render_tex b) ^ "}"
| TEX_FUN2sq (f,a,b) -> "{" ^ f ^ "[ " ^ (render_tex a) ^ "]" ^ (render_tex b) ^ "}"
| TEX_CURLY (tl) -> "{" ^ (mapjoin render_tex tl) ^ "}"
@@ -30,6 +34,7 @@ let rec render_tex = function
| TEX_MATRIX (t,rows) -> "{\\begin{"^t^"}"^(mapjoine "\\\\" (mapjoine "&" (mapjoin render_tex)) rows)^"\\end{"^t^"}}"
| TEX_LR (l,r,tl) -> "\\left "^(tex_part l)^(mapjoin render_tex tl)^"\\right "^(tex_part r)
+
(* Dynamic loading*)
type encoding_t = LATIN1 | LATIN2 | UTF8
@@ -66,59 +71,71 @@ exception Illegal_tex_function of string
let find = function
"\\alpha" -> LITERAL (HTMLABLEC (FONT_UF, "\\alpha ", "&alpha;"))
- | "\\Alpha" -> LITERAL (HTMLABLEC (FONT_RTI, "A", "&Alpha;"))
+ | "\\Alpha" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{A}", "&Alpha;")))
| "\\beta" -> LITERAL (HTMLABLEC (FONT_UF, "\\beta ", "&beta;"))
- | "\\Beta" -> LITERAL (HTMLABLEC (FONT_RTI, "B", "&Beta;"))
+ | "\\Beta" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{B}", "&Beta;")))
| "\\gamma" -> LITERAL (HTMLABLEC (FONT_UF, "\\gamma ", "&gamma;"))
- | "\\Gamma" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Gamma ", "&Gamma;"))
+ | "\\Gamma" -> LITERAL (HTMLABLEC (FONT_UF, "\\Gamma ", "&Gamma;"))
| "\\delta" -> LITERAL (HTMLABLEC (FONT_UF, "\\delta ", "&delta;"))
- | "\\Delta" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Delta ", "&Delta;"))
+ | "\\Delta" -> LITERAL (HTMLABLEC (FONT_UF, "\\Delta ", "&Delta;"))
| "\\epsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\epsilon ", "&epsilon;"))
- | "\\Epsilon" -> LITERAL (HTMLABLEC (FONT_RTI, "E", "&Epsilon;"))
+ | "\\Epsilon" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{E}", "&Epsilon;")))
| "\\varepsilon" -> LITERAL (TEX_ONLY "\\varepsilon ")
| "\\zeta" -> LITERAL (HTMLABLEC (FONT_UF, "\\zeta ", "&zeta;"))
- | "\\Zeta" -> LITERAL (HTMLABLEC (FONT_RTI, "Z", "&Zeta;"))
+ | "\\Zeta" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{Z}", "&Zeta;")))
| "\\eta" -> LITERAL (HTMLABLEC (FONT_UF, "\\eta ", "&eta;"))
- | "\\Eta" -> LITERAL (HTMLABLEC (FONT_RTI, "H", "&Eta;"))
+ | "\\Eta" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{H}", "&Eta;")))
| "\\theta" -> LITERAL (HTMLABLEC (FONT_UF, "\\theta ", "&theta;"))
- | "\\Theta" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Theta ", "&Theta;"))
+ | "\\Theta" -> LITERAL (HTMLABLEC (FONT_UF, "\\Theta ", "&Theta;"))
| "\\vartheta" -> LITERAL (HTMLABLE (FONT_UF, "\\vartheta ", "&thetasym;"))
| "\\thetasym" -> LITERAL (HTMLABLE (FONT_UF, "\\vartheta ", "&thetasym;"))
| "\\iota" -> LITERAL (HTMLABLEC (FONT_UF, "\\iota ", "&iota;"))
- | "\\Iota" -> LITERAL (HTMLABLEC (FONT_RTI, "I", "&Iota;"))
+ | "\\Iota" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{I}", "&Iota;")))
| "\\kappa" -> LITERAL (HTMLABLEC (FONT_UF, "\\kappa ", "&kappa;"))
- | "\\Kappa" -> LITERAL (HTMLABLEC (FONT_RTI, "K", "&Kappa;"))
+ | "\\Kappa" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{K}", "&Kappa;")))
| "\\lambda" -> LITERAL (HTMLABLEC (FONT_UF, "\\lambda ", "&lambda;"))
- | "\\Lambda" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Lambda ", "&Lambda;"))
+ | "\\Lambda" -> LITERAL (HTMLABLEC (FONT_UF, "\\Lambda ", "&Lambda;"))
| "\\mu" -> LITERAL (HTMLABLEC (FONT_UF, "\\mu ", "&mu;"))
- | "\\Mu" -> LITERAL (HTMLABLEC (FONT_RTI, "M", "&Mu;"))
+ | "\\Mu" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{M}", "&Mu;")))
| "\\nu" -> LITERAL (HTMLABLEC (FONT_UF, "\\nu ", "&nu;"))
- | "\\Nu" -> LITERAL (HTMLABLEC (FONT_RTI, "N", "&Nu;"))
+ | "\\Nu" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{N}", "&Nu;")))
| "\\pi" -> LITERAL (HTMLABLEC (FONT_UF, "\\pi ", "&pi;"))
- | "\\Pi" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Pi ", "&Pi;"))
+ | "\\Pi" -> LITERAL (HTMLABLEC (FONT_UF, "\\Pi ", "&Pi;"))
| "\\varpi" -> LITERAL (TEX_ONLY "\\varpi ")
| "\\rho" -> LITERAL (HTMLABLEC (FONT_UF, "\\rho ", "&rho;"))
- | "\\Rho" -> LITERAL (HTMLABLEC (FONT_RTI, "P", "&Rho;"))
+ | "\\Rho" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{P}", "&Rho;")))
| "\\varrho" -> LITERAL (TEX_ONLY "\\varrho ")
| "\\sim" -> LITERAL (HTMLABLEC (FONT_UF, "\\sim ", "&tilde;"))
| "\\sigma" -> LITERAL (HTMLABLEC (FONT_UF, "\\sigma ", "&sigma;"))
- | "\\Sigma" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Sigma ", "&Sigma;"))
+ | "\\Sigma" -> LITERAL (HTMLABLEC (FONT_UF, "\\Sigma ", "&Sigma;"))
| "\\varsigma" -> LITERAL (TEX_ONLY "\\varsigma ")
| "\\tau" -> LITERAL (HTMLABLEC (FONT_UF, "\\tau ", "&tau;"))
- | "\\Tau" -> LITERAL (HTMLABLEC (FONT_RTI, "T", "&Tau;"))
+ | "\\Tau" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{T}", "&Tau;")))
| "\\upsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\upsilon ", "&upsilon;"))
- | "\\Upsilon" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Upsilon ", "&Upsilon;"))
+ | "\\Upsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\Upsilon ", "&Upsilon;"))
| "\\phi" -> LITERAL (HTMLABLEC (FONT_UF, "\\phi ", "&phi;"))
- | "\\Phi" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Phi ", "&Phi;"))
+ | "\\Phi" -> LITERAL (HTMLABLEC (FONT_UF, "\\Phi ", "&Phi;"))
| "\\varphi" -> LITERAL (TEX_ONLY "\\varphi ")
| "\\chi" -> LITERAL (HTMLABLEC (FONT_UF, "\\chi ", "&chi;"))
- | "\\Chi" -> LITERAL (HTMLABLEC (FONT_RTI, "X", "&Chi;"))
+ | "\\Chi" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF,
+ "\\mathrm{X}", "&Chi;")))
| "\\psi" -> LITERAL (HTMLABLEC (FONT_UF, "\\psi ", "&psi;"))
- | "\\Psi" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Psi ", "&Psi;"))
+ | "\\Psi" -> LITERAL (HTMLABLEC (FONT_UF, "\\Psi ", "&Psi;"))
| "\\omega" -> LITERAL (HTMLABLEC (FONT_UF, "\\omega ", "&omega;"))
- | "\\Omega" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Omega ", "&Omega;"))
+ | "\\Omega" -> LITERAL (HTMLABLEC (FONT_UF, "\\Omega ", "&Omega;"))
| "\\xi" -> LITERAL (HTMLABLEC (FONT_UF, "\\xi ", "&xi;"))
- | "\\Xi" -> LITERAL (HTMLABLEC (FONT_RTI, "\\Xi ", "&Xi;"))
+ | "\\Xi" -> LITERAL (HTMLABLEC (FONT_UF, "\\Xi ", "&Xi;"))
| "\\aleph" -> LITERAL (HTMLABLE (FONT_UF, "\\aleph ", "&alefsym;"))
| "\\alef" -> LITERAL (HTMLABLE (FONT_UF, "\\aleph ", "&alefsym;"))
| "\\alefsym" -> LITERAL (HTMLABLE (FONT_UF, "\\aleph ", "&alefsym;"))
@@ -158,6 +175,8 @@ let find = function
| "\\lrcorner" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\lrcorner "))
| "\\twoheadleftarrow" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\twoheadleftarrow "))
| "\\twoheadrightarrow" -> (tex_use_ams (); DELIMITER (TEX_ONLY "\\twoheadrightarrow "))
+ | "\\xleftarrow" -> (tex_use_ams (); FUN_AR1 "\\xleftarrow ")
+ | "\\xrightarrow" -> (tex_use_ams (); FUN_AR1 "\\xrightarrow ")
| "\\rightleftharpoons" -> DELIMITER (TEX_ONLY "\\rightleftharpoons ")
| "\\leftrightarrow" -> LITERAL (HTMLABLE (FONT_UF, "\\leftrightarrow ", "&harr;"))
| "\\lrarr" -> LITERAL (HTMLABLE (FONT_UF, "\\leftrightarrow ", "&harr;"))
@@ -167,6 +186,7 @@ let find = function
| "\\Harr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "&hArr;"))
| "\\lrArr" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "&hArr;"))
| "\\hAar" -> LITERAL (HTMLABLE (FONT_UF, "\\Leftrightarrow ", "&hArr;"))
+ | "\\longleftrightarrow"->LITERAL (HTMLABLE (FONT_UF, "\\longleftrightarrow ", "&harr;"))
| "\\Longleftrightarrow"->LITERAL (HTMLABLE (FONT_UF, "\\Longleftrightarrow ", "&harr;"))
| "\\iff" -> LITERAL (HTMLABLE (FONT_UF, "\\iff ", "&harr;"))
| "\\ll" -> LITERAL (TEX_ONLY "\\ll ")
@@ -177,6 +197,7 @@ let find = function
| "\\swarrow" -> LITERAL (TEX_ONLY "\\swarrow ")
| "\\nwarrow" -> LITERAL (TEX_ONLY "\\nwarrow ")
| "\\simeq" -> LITERAL (TEX_ONLY "\\simeq ")
+ | "\\ast" -> LITERAL (TEX_ONLY "\\ast ")
| "\\star" -> LITERAL (TEX_ONLY "\\star ")
| "\\ell" -> LITERAL (TEX_ONLY "\\ell ")
| "\\P" -> LITERAL (TEX_ONLY "\\P ")
@@ -214,6 +235,7 @@ let find = function
| "\\circ" -> LITERAL (TEX_ONLY "\\circ ")
| "\\hbar" -> LITERAL (TEX_ONLY "\\hbar ")
| "\\imath" -> LITERAL (TEX_ONLY "\\imath ")
+ | "\\jmath" -> LITERAL (TEX_ONLY "\\jmath ")
| "\\lnot" -> LITERAL (TEX_ONLY "\\lnot ")
| "\\hookrightarrow" -> LITERAL (TEX_ONLY "\\hookrightarrow ")
| "\\hookleftarrow" -> LITERAL (TEX_ONLY "\\hookleftarrow ")
@@ -324,6 +346,7 @@ let find = function
| "\\otimes" -> LITERAL (HTMLABLE (FONT_UF, "\\otimes ", "&otimes;"))
| "\\cap" -> LITERAL (HTMLABLEM(FONT_UF, "\\cap ", "&cap;"))
| "\\cup" -> LITERAL (HTMLABLE (FONT_UF, "\\cup ", "&cup;"))
+ | "\\uplus" -> LITERAL (TEX_ONLY "\\uplus ")
| "\\sqcap" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqcap "))
| "\\sqcup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sqcup "))
| "\\empty" -> LITERAL (HTMLABLE (FONT_UF, "\\emptyset ", "&empty;"))
@@ -352,6 +375,7 @@ let find = function
| "\\rang" -> DELIMITER (HTMLABLE (FONT_UFH,"\\rangle ","&rang;"))
| "\\lbrack" -> DELIMITER (HTMLABLEC(FONT_UFH,"[","["))
| "\\rbrack" -> DELIMITER (HTMLABLEC(FONT_UFH,"]","]"))
+ | "\\surd" -> LITERAL (TEX_ONLY "\\surd ")
| "\\ddots" -> LITERAL (TEX_ONLY "\\ddots ")
| "\\clubs" -> LITERAL (TEX_ONLY "\\clubsuit ")
| "\\clubsuit" -> LITERAL (TEX_ONLY "\\clubsuit ")
@@ -360,7 +384,23 @@ let find = function
| "\\hearts" -> LITERAL (TEX_ONLY "\\heartsuit ")
| "\\heartsuit" -> LITERAL (TEX_ONLY "\\heartsuit ")
| "\\diamonds" -> LITERAL (TEX_ONLY "\\diamondsuit ")
+ | "\\diamond" -> LITERAL (TEX_ONLY "\\diamond ")
+ | "\\bigtriangleup" -> LITERAL (TEX_ONLY "\\bigtriangleup ")
+ | "\\bigtriangledown" -> LITERAL (TEX_ONLY "\\bigtriangledown ")
| "\\diamondsuit" -> LITERAL (TEX_ONLY "\\diamondsuit ")
+ | "\\ominus" -> LITERAL (TEX_ONLY "\\ominus ")
+ | "\\oslash" -> LITERAL (TEX_ONLY "\\oslash ")
+ | "\\odot" -> LITERAL (TEX_ONLY "\\odot ")
+ | "\\bigcirc" -> LITERAL (TEX_ONLY "\\bigcirc ")
+ | "\\amalg" -> LITERAL (TEX_ONLY "\\amalg ")
+ | "\\prec" -> LITERAL (TEX_ONLY "\\prec ")
+ | "\\succ" -> LITERAL (TEX_ONLY "\\succ ")
+ | "\\preceq" -> LITERAL (TEX_ONLY "\\preceq ")
+ | "\\succeq" -> LITERAL (TEX_ONLY "\\succeq ")
+ | "\\dashv" -> LITERAL (TEX_ONLY "\\dashv ")
+ | "\\asymp" -> LITERAL (TEX_ONLY "\\asymp ")
+ | "\\doteq" -> LITERAL (TEX_ONLY "\\doteq ")
+ | "\\parallel" -> LITERAL (TEX_ONLY "\\parallel ")
| "\\implies" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\implies ", "&rArr;")))
| "\\mod" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mod ", "mod")))
| "\\Diamond" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\Diamond ", "&loz;")))
@@ -391,6 +431,7 @@ let find = function
| "\\Box" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Box "))
| "\\nleq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleq "))
| "\\upharpoonright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\upharpoonright "))
+ | "\\restriction" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\upharpoonright "))
| "\\upharpoonleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\upharpoonleft "))
| "\\downharpoonright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\downharpoonright "))
| "\\downharpoonleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\downharpoonleft "))
@@ -425,14 +466,14 @@ let find = function
| "\\left" -> LEFT
| "\\right" -> RIGHT
| "\\hat" -> FUN_AR1 "\\hat "
- | "\\widehat" -> FUN_AR1 "\\widehat "
- | "\\overline" -> FUN_AR1 "\\overline "
- | "\\overbrace" -> FUN_AR1 "\\overbrace "
- | "\\underline" -> FUN_AR1 "\\underline "
- | "\\underbrace" -> FUN_AR1 "\\underbrace "
- | "\\overleftarrow" -> FUN_AR1 "\\overleftarrow "
- | "\\overrightarrow" -> FUN_AR1 "\\overrightarrow "
- | "\\overleftrightarrow"->FUN_AR1 "\\overleftrightarrow "
+ | "\\widehat" -> LITERAL (TEX_ONLY "\\widehat ")
+ | "\\overline" -> LITERAL (TEX_ONLY "\\overline ")
+ | "\\overbrace" -> LITERAL (TEX_ONLY "\\overbrace ")
+ | "\\underline" -> LITERAL (TEX_ONLY "\\underline ")
+ | "\\underbrace" -> LITERAL (TEX_ONLY "\\underbrace ")
+ | "\\overleftarrow" -> LITERAL (TEX_ONLY "\\overleftarrow ")
+ | "\\overrightarrow" -> LITERAL (TEX_ONLY "\\overrightarrow ")
+ | "\\overleftrightarrow"->LITERAL (TEX_ONLY "\\overleftrightarrow ")
| "\\check" -> FUN_AR1 "\\check "
| "\\acute" -> FUN_AR1 "\\acute "
| "\\grave" -> FUN_AR1 "\\grave "
@@ -445,9 +486,16 @@ let find = function
| "\\not" -> LITERAL (TEX_ONLY "\\not ")
| "\\choose" -> FUN_INFIX "\\choose "
| "\\atop" -> FUN_INFIX "\\atop "
- | "\\binom" -> FUN_AR2 "\\binom "
+ | "\\binom" -> (tex_use_ams (); FUN_AR2 "\\binom ")
+ | "\\dbinom" -> (tex_use_ams (); FUN_AR2 "\\dbinom ")
+ | "\\tbinom" -> (tex_use_ams (); FUN_AR2 "\\tbinom ")
| "\\stackrel" -> FUN_AR2 "\\stackrel "
+ | "\\sideset" -> (tex_use_ams (); FUN_AR2nb "\\sideset ")
+ | "\\underset" -> (tex_use_ams (); FUN_AR2 "\\underset ")
+ | "\\overset" -> (tex_use_ams (); FUN_AR2 "\\overset ")
| "\\frac" -> FUN_AR2h ("\\frac ", fun num den -> Html.html_render [num], "<hr style=\"{background: black}\"/>", Html.html_render [den])
+ | "\\dfrac" -> (tex_use_ams () ; FUN_AR2 "\\dfrac ")
+ | "\\tfrac" -> (tex_use_ams () ; FUN_AR2h ("\\tfrac ", fun num den -> Html.html_render [num], "<hr style=\"background: black\">", Html.html_render [den]))
| "\\cfrac" -> (tex_use_ams (); FUN_AR2h ("\\cfrac ", fun num den -> Html.html_render [num], "<hr style=\"{background: black}\">", Html.html_render [den]))
| "\\over" -> FUN_INFIXh ("\\over ", fun num den -> Html.html_render num, "<hr style=\"{background: black}\"/>", Html.html_render den)
| "\\sqrt" -> FUN_AR1 "\\sqrt "
@@ -470,6 +518,188 @@ let find = function
| "\\Big" -> BIG "\\Big "
| "\\bigg" -> BIG "\\bigg "
| "\\Bigg" -> BIG "\\Bigg "
+ | "\\bigl" -> (tex_use_ams ();BIG "\\bigl ")
+ | "\\bigr" -> (tex_use_ams ();BIG "\\bigr ")
+ | "\\Bigl" -> (tex_use_ams ();BIG "\\Bigl ")
+ | "\\Bigr" -> (tex_use_ams ();BIG "\\Bigr ")
+ | "\\biggl" -> (tex_use_ams ();BIG "\\biggl ")
+ | "\\biggr" -> (tex_use_ams ();BIG "\\biggr ")
+ | "\\Biggl" -> (tex_use_ams ();BIG "\\Biggl ")
+ | "\\Biggr" -> (tex_use_ams ();BIG "\\Biggr ")
+ | "\\vartriangle" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\vartriangle "))
+ | "\\triangledown" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\triangledown "))
+ | "\\lozenge" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lozenge "))
+ | "\\circledS" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circledS "))
+ | "\\measuredangle" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\measuredangle "))
+ | "\\nexists" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nexists "))
+ | "\\Bbbk" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Bbbk "))
+ | "\\backprime" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\backprime "))
+ | "\\blacktriangle" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacktriangle "))
+ | "\\blacktriangledown"-> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacktriangledown "))
+ | "\\blacksquare" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacksquare "))
+ | "\\blacklozenge" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacklozenge "))
+ | "\\bigstar" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\bigstar "))
+ | "\\sphericalangle" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\sphericalangle "))
+ | "\\diagup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\diagup "))
+ | "\\diagdown" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\diagdown "))
+ | "\\dotplus" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\dotplus "))
+ | "\\Cap" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Cap "))
+ | "\\doublecap" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Cap "))
+ | "\\Cup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Cup "))
+ | "\\doublecup" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Cup "))
+ | "\\barwedge" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\barwedge "))
+ | "\\veebar" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\veebar "))
+ | "\\doublebarwedge" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\doublebarwedge "))
+ | "\\boxminus" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\boxminus "))
+ | "\\boxtimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\boxtimes "))
+ | "\\boxdot" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\boxdot "))
+ | "\\boxplus" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\boxplus "))
+ | "\\divideontimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\divideontimes "))
+ | "\\ltimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ltimes "))
+ | "\\rtimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rtimes "))
+ | "\\leftthreetimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftthreetimes "))
+ | "\\rightthreetimes" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightthreetimes "))
+ | "\\curlywedge" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curlywedge "))
+ | "\\curlyvee" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curlyvee "))
+ | "\\circleddash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circleddash "))
+ | "\\circledast" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circledast "))
+ | "\\circledcirc" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circledcirc "))
+ | "\\centerdot" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\centerdot "))
+ | "\\intercal" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\intercal "))
+ | "\\leqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leqq "))
+ | "\\leqslant" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leqslant "))
+ | "\\eqslantless" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\eqslantless "))
+ | "\\lessapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lessapprox "))
+ | "\\approxeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\approxeq "))
+ | "\\lessdot" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lessdot "))
+ | "\\lll" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lll "))
+ | "\\lessgtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lessgtr "))
+ | "\\lesseqgtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lesseqgtr "))
+ | "\\lesseqqgtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lesseqqgtr "))
+ | "\\doteqdot" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\doteqdot "))
+ | "\\Doteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\doteqdot "))
+ | "\\risingdotseq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\risingdotseq "))
+ | "\\fallingdotseq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\fallingdotseq "))
+ | "\\backsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\backsim "))
+ | "\\backsimeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\backsimeq "))
+ | "\\subseteqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\subseteqq "))
+ | "\\Subset" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Subset "))
+ | "\\preccurlyeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\preccurlyeq "))
+ | "\\curlyeqprec" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curlyeqprec "))
+ | "\\precsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\precsim "))
+ | "\\precapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\precapprox "))
+ | "\\vartriangleleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\vartriangleleft "))
+ | "\\Vvdash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Vvdash "))
+ | "\\bumpeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\bumpeq "))
+ | "\\Bumpeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Bumpeq "))
+ | "\\geqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\geqq "))
+ | "\\geqslant" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\geqslant "))
+ | "\\eqslantgtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\eqslantgtr "))
+ | "\\gtrsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtrsim "))
+ | "\\gtrapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtrapprox "))
+ | "\\eqsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\eqsim "))
+ | "\\gtrdot" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtrdot "))
+ | "\\ggg" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ggg "))
+ | "\\gggtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ggg "))
+ | "\\gtrless" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtrless "))
+ | "\\gtreqless" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtreqless "))
+ | "\\gtreqqless" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gtreqqless "))
+ | "\\eqcirc" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\eqcirc "))
+ | "\\circeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circeq "))
+ | "\\triangleq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\triangleq "))
+ | "\\thicksim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\thicksim "))
+ | "\\thickapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\thickapprox "))
+ | "\\supseteqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\supseteqq "))
+ | "\\Supset" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Supset "))
+ | "\\succcurlyeq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succcurlyeq "))
+ | "\\curlyeqsucc" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curlyeqsucc "))
+ | "\\succsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succsim "))
+ | "\\succapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succapprox "))
+ | "\\vartriangleright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\vartriangleright "))
+ | "\\shortmid" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\shortmid "))
+ | "\\shortparallel" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\shortparallel "))
+ | "\\between" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\between "))
+ | "\\pitchfork" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\pitchfork "))
+ | "\\varpropto" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varpropto "))
+ | "\\blacktriangleleft"-> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacktriangleleft "))
+ | "\\therefore" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\therefore "))
+ | "\\backepsilon" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\backepsilon "))
+ | "\\blacktriangleright"-> (tex_use_ams (); LITERAL (TEX_ONLY "\\blacktriangleright "))
+ | "\\because" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\because "))
+ | "\\nleqslant" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleqslant "))
+ | "\\nleqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleqq "))
+ | "\\lneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lneq "))
+ | "\\lneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lneqq "))
+ | "\\lvertneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lvertneqq "))
+ | "\\lnsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lnsim "))
+ | "\\lnapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\lnapprox "))
+ | "\\nprec" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nprec "))
+ | "\\npreceq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\npreceq "))
+ | "\\precneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\precneqq "))
+ | "\\precnsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\precnsim "))
+ | "\\precnapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\precnapprox "))
+ | "\\nsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsim "))
+ | "\\nshortmid" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nshortmid "))
+ | "\\nvdash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nvdash "))
+ | "\\nVdash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nVdash "))
+ | "\\ntriangleleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ntriangleleft "))
+ | "\\ntrianglelefteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ntrianglelefteq "))
+ | "\\nsubseteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsubseteq "))
+ | "\\nsubseteqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsubseteqq "))
+ | "\\varsubsetneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varsubsetneq "))
+ | "\\subsetneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\subsetneqq "))
+ | "\\varsubsetneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varsubsetneqq "))
+ | "\\ngtr" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ngtr "))
+ | "\\ngeqslant" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ngeqslant "))
+ | "\\ngeqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ngeqq "))
+ | "\\gneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gneq "))
+ | "\\gneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gneqq "))
+ | "\\gvertneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gvertneqq "))
+ | "\\gnsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gnsim "))
+ | "\\gnapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\gnapprox "))
+ | "\\nsucc" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsucc "))
+ | "\\nsucceq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsucceq "))
+ | "\\succneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succneqq "))
+ | "\\succnsim" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succnsim "))
+ | "\\succnapprox" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\succnapprox "))
+ | "\\ncong" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ncong "))
+ | "\\nshortparallel" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nshortparallel "))
+ | "\\nparallel" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nparallel "))
+ | "\\nvDash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nvDash "))
+ | "\\nVDash" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nVDash "))
+ | "\\ntriangleright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ntriangleright "))
+ | "\\ntrianglerighteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\ntrianglerighteq "))
+ | "\\nsupseteq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsupseteq "))
+ | "\\nsupseteqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nsupseteqq "))
+ | "\\varsupsetneq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varsupsetneq "))
+ | "\\supsetneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\supsetneqq "))
+ | "\\varsupsetneqq" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\varsupsetneqq "))
+ | "\\leftleftarrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftleftarrows "))
+ | "\\leftrightarrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftrightarrows "))
+ | "\\Lleftarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Lleftarrow "))
+ | "\\leftarrowtail" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftarrowtail "))
+ | "\\looparrowleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\looparrowleft "))
+ | "\\leftrightharpoons"-> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftrightharpoons "))
+ | "\\curvearrowleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curvearrowleft "))
+ | "\\circlearrowleft" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circlearrowleft "))
+ | "\\Lsh" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Lsh "))
+ | "\\upuparrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\upuparrows "))
+ | "\\rightrightarrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightrightarrows "))
+ | "\\rightleftarrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightleftarrows "))
+ | "\\Rrightarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Rrightarrow "))
+ | "\\rightarrowtail" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightarrowtail "))
+ | "\\looparrowright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\looparrowright "))
+ | "\\curvearrowright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\curvearrowright "))
+ | "\\circlearrowright" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\circlearrowright "))
+ | "\\Rsh" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\Rsh "))
+ | "\\downdownarrows" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\downdownarrows "))
+ | "\\multimap" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\multimap "))
+ | "\\leftrightsquigarrow"-> (tex_use_ams (); LITERAL (TEX_ONLY "\\leftrightsquigarrow "))
+ | "\\rightsquigarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\rightsquigarrow "))
+ | "\\nLeftarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nLeftarrow "))
+ | "\\nleftrightarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nleftrightarrow "))
+ | "\\nRightarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nRightarrow "))
+ | "\\nLeftrightarrow" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nLeftrightarrow "))
| "\\mathit" -> (tex_use_ams (); FUN_AR1hf ("\\mathit ", FONTFORCE_IT))
| "\\mathrm" -> (tex_use_ams (); FUN_AR1hf ("\\mathrm ", FONTFORCE_RM))
| "\\mathop" -> (tex_use_ams (); FUN_AR1 "\\mathop ")
@@ -482,6 +712,7 @@ let find = function
| "\\mathbb" -> (tex_use_ams (); FUN_AR1 "\\mathbb ")
| "\\mathfrak" -> (tex_use_ams (); FUN_AR1 "\\mathfrak ")
| "\\operatorname" -> (tex_use_ams (); FUN_AR1 "\\operatorname ")
+ | "\\text" -> raise (Failure "malformatted \\text")
| "\\mbox" -> raise (Failure "malformatted \\mbox")
| "\\vbox" -> raise (Failure "malformatted \\vbox")
| "\\hbox" -> raise (Failure "malformatted \\hbox")
diff --git a/math/texvc_test.ml b/math/texvc_test.ml
index 3bce5296..cd3a1dfa 100644
--- a/math/texvc_test.ml
+++ b/math/texvc_test.ml
@@ -8,7 +8,6 @@ let rec foo () =
let line = input_line stdin in
(try
let tree = Parser.tex_expr lexer_token_safe (Lexing.from_string line) in
- let out = Util.mapjoin Texutil.render_tex tree in
(match Html.render tree with
Some _ -> print_string "$^\n"
| None -> print_string "$_\n";