Index: branches/REL1_18/extensions/Math/math/mathml.ml |
— | — | @@ -1,15 +1,13 @@ |
2 | 2 | open Tex |
3 | 3 | open Render_info |
4 | 4 | |
5 | | -type t = TREE_MN of string | TREE_MO of string | TREE_MI of string | TREE_MF of string | TREE_MFB of string * string |
| 5 | +type t = TREE_MN of string | TREE_MO of string | TREE_MI of string |
6 | 6 | |
7 | 7 | let rec make_mathml_tree = function |
8 | 8 | TREE_MN a::otr,TEX_LITERAL(MHTMLABLEC(_,_,_,MN,b))::itr -> make_mathml_tree(TREE_MN (a^b)::otr,itr) |
9 | 9 | | otr,TEX_LITERAL(MHTMLABLEC(_,_,_,MN,a))::itr -> make_mathml_tree(TREE_MN a::otr,itr) |
10 | 10 | | otr,TEX_LITERAL(MHTMLABLEC(_,_,_,MO,a))::itr -> make_mathml_tree(TREE_MO a::otr,itr) |
11 | 11 | | otr,TEX_LITERAL(MHTMLABLEC(_,_,_,MI,a))::itr -> make_mathml_tree(TREE_MI a::otr,itr) |
12 | | - | otr,TEX_LITERAL(MHTMLABLEC(_,_,_,MF,a))::itr -> make_mathml_tree(TREE_MF a::otr,itr) |
13 | | - | otr,TEX_LITERAL(MHTMLABLEFC(_,_,_,MF,a,b))::itr -> make_mathml_tree(TREE_MFB (a,b)::otr,itr) |
14 | 12 | | otr,TEX_CURLY(crl)::itr -> make_mathml_tree(otr,crl@itr) |
15 | 13 | | otr,[] -> List.rev otr |
16 | 14 | | _ -> failwith "failed to render mathml" |
— | — | @@ -18,7 +16,5 @@ |
19 | 17 | TREE_MN s -> "<mn>"^s^"</mn>" |
20 | 18 | | TREE_MI s -> "<mi>"^s^"</mi>" |
21 | 19 | | TREE_MO s -> "<mo>"^s^"</mo>" |
22 | | - | TREE_MF s -> "<mi>"^s^" </mi>" |
23 | | - | TREE_MFB (s,b) -> "<mi>"^s^"</mi>"^"<mo>"^b^"</mo>" |
24 | 20 | |
25 | 21 | let render tree = try Some (Util.mapjoin render_mathml_tree (make_mathml_tree ([],tree))) with _ -> None |
Index: branches/REL1_18/extensions/Math/math/parser.mly |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | open Tex |
4 | 4 | open Render_info |
5 | 5 | |
6 | | - let sq_close_ri = MHTMLABLEC(FONT_UFH,"]", "]",MO,"]") |
| 6 | + let sq_close_ri = HTMLABLEC(FONT_UFH,"]", "]") |
7 | 7 | %} |
8 | 8 | %token <Render_info.t> LITERAL DELIMITER |
9 | 9 | %token <string> FUN_AR2 FUN_INFIX FUN_AR1 DECL FUN_AR1opt BIG FUN_AR2nb |
Index: branches/REL1_18/extensions/Math/math/lexer.mll |
— | — | @@ -6,15 +6,13 @@ |
7 | 7 | let space = [' ' '\t' '\n' '\r'] |
8 | 8 | let alpha = ['a'-'z' 'A'-'Z'] |
9 | 9 | let literal_id = ['a'-'z' 'A'-'Z'] |
10 | | -let literal_mn = ['0'-'9' '.'] |
| 10 | +let literal_mn = ['0'-'9'] |
11 | 11 | let literal_uf_lt = [',' ':' ';' '?' '!' '\''] |
12 | | -let delimiter_uf_lt = ['(' ')'] |
| 12 | +let delimiter_uf_lt = ['(' ')' '.'] |
13 | 13 | let literal_uf_op = ['+' '-' '*' '='] |
14 | 14 | let delimiter_uf_op = ['/' '|'] |
15 | | -let boxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' '\'' '`' ' ' '\128'-'\255'] |
16 | | -let aboxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '\'' '`' '!' ' '] |
17 | | -let latex_function_names = "arccos" | "arcsin" | "arctan" | "arg" | "cos" | "cosh" | "cot" | "coth" | "csc"| "deg" | "det" | "dim" | "exp" | "gcd" | "hom" | "inf" | "ker" | "lg" | "lim" | "liminf" | "limsup" | "ln" | "log" | "max" | "min" | "Pr" | "sec" | "sin" | "sinh" | "sup" | "tan" | "tanh" |
18 | | -let mediawiki_function_names = "arccot" | "arcsec" | "arccsc" | "sgn" | "sen" |
| 15 | +let boxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' ' ' '\128'-'\255'] |
| 16 | +let aboxchars = ['0'-'9' 'a'-'z' 'A'-'Z' '+' '-' '*' ',' '=' '(' ')' ':' '/' ';' '?' '.' '!' ' '] |
19 | 17 | |
20 | 18 | rule token = parse |
21 | 19 | space + { token lexbuf } |
— | — | @@ -52,39 +50,20 @@ |
53 | 51 | | literal_id { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_IT, str,str,MI,str)) } |
54 | 52 | | literal_mn { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_RM, str,str,MN,str)) } |
55 | 53 | | literal_uf_lt { let str = Lexing.lexeme lexbuf in LITERAL (HTMLABLEC (FONT_UFH, str,str)) } |
56 | | - | delimiter_uf_lt { let str = Lexing.lexeme lexbuf in DELIMITER (MHTMLABLEC (FONT_UFH, str,str,MO,str)) } |
57 | | - | "-" { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_UFH,"-"," − ",MO," − "))} |
58 | | - | literal_uf_op { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_UFH, str," "^str^" ",MO," "^str^" ")) } |
| 54 | + | delimiter_uf_lt { let str = Lexing.lexeme lexbuf in DELIMITER (HTMLABLEC (FONT_UFH, str,str)) } |
| 55 | + | "-" { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_UFH,"-"," − ",MO,str))} |
| 56 | + | literal_uf_op { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_UFH, str," "^str^" ",MO,str)) } |
59 | 57 | | delimiter_uf_op { let str = Lexing.lexeme lexbuf in DELIMITER (MHTMLABLEC (FONT_UFH, str," "^str^" ",MO,str)) } |
| 58 | + | "\\" alpha + { Texutil.find (Lexing.lexeme lexbuf) } |
60 | 59 | | "\\sqrt" space * "[" { FUN_AR1opt "\\sqrt" } |
61 | 60 | | "\\xleftarrow" space * "[" { Texutil.tex_use_ams(); FUN_AR1opt "\\xleftarrow" } |
62 | 61 | | "\\xrightarrow" space * "[" { Texutil.tex_use_ams(); FUN_AR1opt "\\xrightarrow" } |
63 | | - | "\\" (latex_function_names as name) space * "(" |
64 | | - { LITERAL (MHTMLABLEFC(FONT_UFH,"\\" ^ name ^ "(", name ^ "(", MF, name, "(")) } |
65 | | - | "\\" (latex_function_names as name) space * "[" |
66 | | - { LITERAL (MHTMLABLEFC(FONT_UFH,"\\" ^ name ^ "[", name ^ "[", MF, name, "[")) } |
67 | | - | "\\" (latex_function_names as name) space * "\\{" |
68 | | - { LITERAL (MHTMLABLEFC(FONT_UFH, "\\" ^ name ^ "\\{", name ^ "{", MF, name, "{")) } |
69 | | - | "\\" (latex_function_names as name) space * |
70 | | - { LITERAL (MHTMLABLEC(FONT_UFH,"\\" ^ name ^ " ", name ^ " ", MF, name)) } |
71 | | - | "\\" (mediawiki_function_names as name) space * "(" |
72 | | - { (Texutil.tex_use_ams(); LITERAL (MHTMLABLEFC(FONT_UFH, |
73 | | - "\\operatorname{" ^ name ^ "}(", name ^ "(", MF, name, "("))) } |
74 | | - | "\\" (mediawiki_function_names as name) space * "[" |
75 | | - { (Texutil.tex_use_ams(); LITERAL (MHTMLABLEFC(FONT_UFH, |
76 | | - "\\operatorname{" ^ name ^ "}[", name ^ "[", MF, name, "["))) } |
77 | | - | "\\" (mediawiki_function_names as name) space * "\\{" |
78 | | - { (Texutil.tex_use_ams(); LITERAL (MHTMLABLEFC(FONT_UFH, |
79 | | - "\\operatorname{" ^ name ^ "}\\{", name ^ "{", MF, name, "{"))) } |
80 | | - | "\\" (mediawiki_function_names as name) space * |
81 | | - { (Texutil.tex_use_ams(); LITERAL (MHTMLABLEC(FONT_UFH,"\\operatorname{" ^ name ^ "} ", name ^ " ", MF, name))) } |
82 | | - | "\\" alpha + { Texutil.find (Lexing.lexeme lexbuf) } |
83 | 62 | | "\\," { LITERAL (HTMLABLE (FONT_UF, "\\,"," ")) } |
84 | 63 | | "\\ " { LITERAL (HTMLABLE (FONT_UF, "\\ "," ")) } |
85 | 64 | | "\\;" { LITERAL (HTMLABLE (FONT_UF, "\\;"," ")) } |
86 | 65 | | "\\!" { LITERAL (TEX_ONLY "\\!") } |
87 | | - | "\\{" { DELIMITER (MHTMLABLEC(FONT_UFH,"\\{","{",MO,"{")) } |
88 | | - | "\\}" { DELIMITER (MHTMLABLEC(FONT_UFH,"\\}","}",MO,"}")) } |
| 66 | + | "\\{" { DELIMITER (HTMLABLEC(FONT_UFH,"\\{","{")) } |
| 67 | + | "\\}" { DELIMITER (HTMLABLEC(FONT_UFH,"\\}","}")) } |
89 | 68 | | "\\|" { DELIMITER (HTMLABLE (FONT_UFH,"\\|","||")) } |
90 | 69 | | "\\_" { LITERAL (HTMLABLEC(FONT_UFH,"\\_","_")) } |
91 | 70 | | "\\#" { LITERAL (HTMLABLE (FONT_UFH,"\\#","#")) } |
— | — | @@ -120,7 +99,7 @@ |
121 | 100 | | '%' { LITERAL (HTMLABLEC(FONT_UFH,"\\%","%")) } |
122 | 101 | | '$' { LITERAL (HTMLABLEC(FONT_UFH,"\\$","$")) } |
123 | 102 | | '~' { LITERAL (HTMLABLE (FONT_UF, "~"," ")) } |
124 | | - | '[' { DELIMITER (MHTMLABLEC(FONT_UFH,"[","[",MO,"[")) } |
| 103 | + | '[' { DELIMITER (HTMLABLEC(FONT_UFH,"[","[")) } |
125 | 104 | | ']' { SQ_CLOSE } |
126 | 105 | | '{' { CURLY_OPEN } |
127 | 106 | | '}' { CURLY_CLOSE } |
Index: branches/REL1_18/extensions/Math/math/texutil.ml |
— | — | @@ -9,7 +9,6 @@ |
10 | 10 | | HTMLABLEM (_,t,_) -> t |
11 | 11 | | HTMLABLEC (_,t,_) -> t |
12 | 12 | | MHTMLABLEC (_,t,_,_,_) -> t |
13 | | - | MHTMLABLEFC (_,t,_,_,_,_) -> t |
14 | 13 | | HTMLABLE_BIG (t,_) -> t |
15 | 14 | | TEX_ONLY t -> t |
16 | 15 | |
— | — | @@ -21,7 +20,7 @@ |
22 | 21 | | TEX_DQN (a) -> "_{" ^ (render_tex a) ^ "}" |
23 | 22 | | TEX_UQN (a) -> "^{" ^ (render_tex a) ^ "}" |
24 | 23 | | TEX_LITERAL s -> tex_part s |
25 | | - | TEX_FUN1 (f,a) -> f ^ " " ^ (render_tex a) |
| 24 | + | TEX_FUN1 (f,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}" |
26 | 25 | | TEX_FUN1hl (f,_,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}" |
27 | 26 | | TEX_FUN1hf (f,_,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}" |
28 | 27 | | TEX_DECLh (f,_,a) -> "{" ^ f ^ "{" ^ (mapjoin render_tex a) ^ "}}" |
— | — | @@ -46,22 +45,16 @@ |
47 | 46 | let modules_nonascii = ref false |
48 | 47 | let modules_encoding = ref UTF8 |
49 | 48 | let modules_color = ref false |
50 | | -let modules_teubner = ref false |
51 | | -let modules_euro = ref false |
52 | 49 | |
53 | 50 | (* wrappers to easily set / reset module properties *) |
54 | 51 | let tex_use_ams () = modules_ams := true |
55 | 52 | let tex_use_nonascii () = modules_nonascii := true |
56 | 53 | let tex_use_color () = modules_color := true |
57 | | -let tex_use_teubner () = modules_teubner := true |
58 | | -let tex_use_euro () = modules_euro := true |
59 | 54 | let tex_mod_reset () = ( |
60 | 55 | modules_ams := false; |
61 | 56 | modules_nonascii := false; |
62 | 57 | modules_encoding := UTF8; |
63 | | - modules_color := false; |
64 | | - modules_teubner := false; |
65 | | - modules_euro := false; |
| 58 | + modules_color := false |
66 | 59 | ) |
67 | 60 | |
68 | 61 | (* Return TeX fragment for one of the encodings in (UTF8,LATIN1,LATIN2) *) |
— | — | @@ -75,8 +68,6 @@ |
76 | 69 | (if !modules_nonascii then get_encoding !modules_encoding else "") ^ |
77 | 70 | (if !modules_ams then "\\usepackage{amsmath}\n\\usepackage{amsfonts}\n\\usepackage{amssymb}\n" else "") ^ |
78 | 71 | (if !modules_color then "\\usepackage[dvips,usenames]{color}\n" else "") ^ |
79 | | - (if !modules_teubner then "\\usepackage[greek]{babel}\n\\usepackage{teubner}\n" else "") ^ |
80 | | - (if !modules_euro then "\\usepackage{eurosym}\n" else "") ^ |
81 | 72 | "\\usepackage{cancel}\n\\pagestyle{empty}\n\\begin{document}\n$$\n" |
82 | 73 | |
83 | 74 | (* TeX fragment appended after the content *) |
— | — | @@ -106,7 +97,7 @@ |
107 | 98 | | "\\epsilon" -> LITERAL (TEX_ONLY "\\epsilon ") |
108 | 99 | | "\\Epsilon" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF, |
109 | 100 | "\\mathrm{E}", "Ε"))) |
110 | | - | "\\varepsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\varepsilon ", "ε")) |
| 101 | + | "\\varepsilon" -> LITERAL (TEX_ONLY "\\varepsilon ") |
111 | 102 | | "\\zeta" -> LITERAL (HTMLABLEC (FONT_UF, "\\zeta ", "ζ")) |
112 | 103 | | "\\Zeta" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF, |
113 | 104 | "\\mathrm{Z}", "Ζ"))) |
— | — | @@ -151,9 +142,9 @@ |
152 | 143 | "\\mathrm{T}", "Τ"))) |
153 | 144 | | "\\upsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\upsilon ", "υ")) |
154 | 145 | | "\\Upsilon" -> LITERAL (HTMLABLEC (FONT_UF, "\\Upsilon ", "Υ")) |
155 | | - | "\\phi" -> LITERAL (HTMLABLEC (FONT_UF, "\\phi ", "ϕ")) |
| 146 | + | "\\phi" -> LITERAL (TEX_ONLY "\\phi ") |
156 | 147 | | "\\Phi" -> LITERAL (HTMLABLEC (FONT_UF, "\\Phi ", "Φ")) |
157 | | - | "\\varphi" -> LITERAL (HTMLABLEC (FONT_UF, "\\varphi ", "φ")) |
| 148 | + | "\\varphi" -> LITERAL (TEX_ONLY "\\varphi ") |
158 | 149 | | "\\chi" -> LITERAL (HTMLABLEC (FONT_UF, "\\chi ", "χ")) |
159 | 150 | | "\\Chi" -> (tex_use_ams (); LITERAL (HTMLABLEC (FONT_UF, |
160 | 151 | "\\mathrm{X}", "Χ"))) |
— | — | @@ -249,6 +240,16 @@ |
250 | 241 | | "\\triangleleft" -> LITERAL (TEX_ONLY "\\triangleleft ") |
251 | 242 | | "\\triangleright" -> LITERAL (TEX_ONLY "\\triangleright ") |
252 | 243 | | "\\textvisiblespace" -> LITERAL (TEX_ONLY "\\textvisiblespace ") |
| 244 | + | "\\ker" -> LITERAL (HTMLABLEC(FONT_UFH,"\\ker ","ker")) |
| 245 | + | "\\lim" -> LITERAL (TEX_ONLY "\\lim ") |
| 246 | + | "\\limsup" -> LITERAL (TEX_ONLY "\\limsup ") |
| 247 | + | "\\liminf" -> LITERAL (TEX_ONLY "\\liminf ") |
| 248 | + | "\\sup" -> LITERAL (TEX_ONLY "\\sup ") |
| 249 | + | "\\Pr" -> LITERAL (TEX_ONLY "\\Pr ") |
| 250 | + | "\\hom" -> LITERAL (HTMLABLEC(FONT_UFH,"\\hom ","hom")) |
| 251 | + | "\\arg" -> LITERAL (HTMLABLEC(FONT_UFH,"\\arg ","arg")) |
| 252 | + | "\\dim" -> LITERAL (HTMLABLEC(FONT_UFH,"\\dim ","dim")) |
| 253 | + | "\\inf" -> LITERAL (TEX_ONLY "\\inf ") |
253 | 254 | | "\\circ" -> LITERAL (TEX_ONLY "\\circ ") |
254 | 255 | | "\\hbar" -> LITERAL (TEX_ONLY "\\hbar ") |
255 | 256 | | "\\imath" -> LITERAL (TEX_ONLY "\\imath ") |
— | — | @@ -269,6 +270,32 @@ |
270 | 271 | | "\\limits" -> LITERAL (TEX_ONLY "\\limits ") |
271 | 272 | | "\\nolimits" -> LITERAL (TEX_ONLY "\\nolimits ") |
272 | 273 | | "\\top" -> LITERAL (TEX_ONLY "\\top ") |
| 274 | + | "\\sin" -> LITERAL (HTMLABLEC(FONT_UFH,"\\sin ","sin")) |
| 275 | + | "\\cos" -> LITERAL (HTMLABLEC(FONT_UFH,"\\cos ","cos")) |
| 276 | + | "\\sinh" -> LITERAL (HTMLABLEC(FONT_UFH,"\\sinh ","sinh")) |
| 277 | + | "\\cosh" -> LITERAL (HTMLABLEC(FONT_UFH,"\\cosh ","cosh")) |
| 278 | + | "\\tan" -> LITERAL (HTMLABLEC(FONT_UFH,"\\tan ","tan")) |
| 279 | + | "\\tanh" -> LITERAL (HTMLABLEC(FONT_UFH,"\\tanh ","tanh")) |
| 280 | + | "\\sec" -> LITERAL (HTMLABLEC(FONT_UFH,"\\sec ","sec")) |
| 281 | + | "\\csc" -> LITERAL (HTMLABLEC(FONT_UFH,"\\csc ","csc")) |
| 282 | + | "\\arcsin" -> LITERAL (HTMLABLEC(FONT_UFH,"\\arcsin ","arcsin")) |
| 283 | + | "\\arctan" -> LITERAL (HTMLABLEC(FONT_UFH,"\\arctan ","arctan")) |
| 284 | + | "\\arccos" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccos}}","arccos"))) |
| 285 | + | "\\arccot" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccot}}","arccot"))) |
| 286 | + | "\\arcsec" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arcsec}}","arcsec"))) |
| 287 | + | "\\arccsc" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccsc}}","arccsc"))) |
| 288 | + | "\\sgn" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{sgn}}","sgn"))) |
| 289 | + | "\\cot" -> LITERAL (HTMLABLEC(FONT_UFH,"\\cot ","cot")) |
| 290 | + | "\\coth" -> LITERAL (HTMLABLEC(FONT_UFH,"\\coth ","coth")) |
| 291 | + | "\\log" -> LITERAL (HTMLABLEC(FONT_UFH,"\\log ", "log")) |
| 292 | + | "\\lg" -> LITERAL (HTMLABLEC(FONT_UFH,"\\lg ", "lg")) |
| 293 | + | "\\ln" -> LITERAL (HTMLABLEC(FONT_UFH,"\\ln ", "ln")) |
| 294 | + | "\\exp" -> LITERAL (HTMLABLEC(FONT_UFH,"\\exp ", "exp")) |
| 295 | + | "\\min" -> LITERAL (HTMLABLEC(FONT_UFH,"\\min ", "min")) |
| 296 | + | "\\max" -> LITERAL (HTMLABLEC(FONT_UFH,"\\max ", "max")) |
| 297 | + | "\\gcd" -> LITERAL (HTMLABLEC(FONT_UFH,"\\gcd ", "gcd")) |
| 298 | + | "\\deg" -> LITERAL (HTMLABLEC(FONT_UFH,"\\deg ", "deg")) |
| 299 | + | "\\det" -> LITERAL (HTMLABLEC(FONT_UFH,"\\det ", "det")) |
273 | 300 | | "\\bullet" -> LITERAL (HTMLABLE (FONT_UFH, "\\bullet ", "•")) |
274 | 301 | | "\\bull" -> LITERAL (HTMLABLE (FONT_UFH, "\\bullet ", "•")) |
275 | 302 | | "\\angle" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\angle ", "∠"))) |
— | — | @@ -392,22 +419,6 @@ |
393 | 420 | | "\\asymp" -> LITERAL (TEX_ONLY "\\asymp ") |
394 | 421 | | "\\doteq" -> LITERAL (TEX_ONLY "\\doteq ") |
395 | 422 | | "\\parallel" -> LITERAL (TEX_ONLY "\\parallel ") |
396 | | - | "\\euro" -> (tex_use_euro (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\euro}", "€"))) |
397 | | - | "\\geneuro" -> (tex_use_euro (); LITERAL (TEX_ONLY "\\mbox{\\geneuro}")) |
398 | | - | "\\geneuronarrow" -> (tex_use_euro (); LITERAL (TEX_ONLY "\\mbox{\\geneuronarrow}")) |
399 | | - | "\\geneurowide" -> (tex_use_euro (); LITERAL (TEX_ONLY "\\mbox{\\geneurowide}")) |
400 | | - | "\\officialeuro" -> (tex_use_euro (); LITERAL (TEX_ONLY "\\mbox{\\officialeuro}")) |
401 | | - | "\\Coppa" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\Coppa}", "Ϙ"))) |
402 | | - | "\\coppa" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\coppa}", "ϙ"))) |
403 | | - | "\\varcoppa" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\coppa}", "ϙ"))) |
404 | | - | "\\Digamma" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\Digamma}", "Ϝ"))) |
405 | | - | "\\Koppa" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\Koppa}", "Ϙ"))) |
406 | | - | "\\koppa" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\koppa}", "ϟ"))) |
407 | | - | "\\Sampi" -> (tex_use_teubner (); LITERAL (TEX_ONLY "\\mbox{\\Sampi}")) |
408 | | - | "\\sampi" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\sampi}", "ϡ"))) |
409 | | - | "\\Stigma" -> (tex_use_teubner (); LITERAL (TEX_ONLY "\\mbox{\\Stigma}")) |
410 | | - | "\\stigma" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\stigma}", "ϛ"))) |
411 | | - | "\\varstigma" -> (tex_use_teubner (); LITERAL (TEX_ONLY "\\mbox{\\varstigma}")) |
412 | 423 | | "\\implies" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\implies ", "⇒"))) |
413 | 424 | | "\\mod" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mod ", "mod"))) |
414 | 425 | | "\\Diamond" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\Diamond ", "◊"))) |
— | — | @@ -416,17 +427,16 @@ |
417 | 428 | | "\\dotsi" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\dotsi ", "⋅⋅⋅"))) |
418 | 429 | | "\\dotsm" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\dotsm ", "⋅⋅⋅"))) |
419 | 430 | | "\\dotso" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\dotso ", "..."))) |
420 | | - | "\\reals" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "ℝ"))) |
421 | | - | "\\Reals" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "ℝ"))) |
422 | | - | "\\R" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "ℝ"))) |
423 | | - | "\\C" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "ℂ"))) |
424 | | - | "\\cnums" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "ℂ"))) |
425 | | - | "\\Complex" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "ℂ"))) |
426 | | - | "\\Z" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{Z}", "ℤ"))) |
427 | | - | "\\natnums" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{N}", "ℕ"))) |
428 | | - | "\\N" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{N}", "ℕ"))) |
429 | | - | "\\Q" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{Q}", "ℚ"))) |
430 | | - | "\\H" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{H}", "ℍ"))) |
| 431 | + | "\\reals" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "<b>R</b>"))) |
| 432 | + | "\\Reals" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "<b>R</b>"))) |
| 433 | + | "\\R" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{R}", "<b>R</b>"))) |
| 434 | + | "\\C" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "<b>C</b>"))) |
| 435 | + | "\\cnums" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "<b>C</b>"))) |
| 436 | + | "\\Complex" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{C}", "<b>C</b>"))) |
| 437 | + | "\\Z" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{Z}", "<b>Z</b>"))) |
| 438 | + | "\\natnums" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{N}", "<b>N</b>"))) |
| 439 | + | "\\N" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{N}", "<b>N</b>"))) |
| 440 | + | "\\Q" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mathbb{Q}", "<b>Q</b>"))) |
431 | 441 | | "\\lVert" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\lVert ", "||"))) |
432 | 442 | | "\\rVert" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\rVert ", "||"))) |
433 | 443 | | "\\nmid" -> (tex_use_ams (); LITERAL (TEX_ONLY "\\nmid ")) |
— | — | @@ -482,7 +492,6 @@ |
483 | 493 | | "\\hat" -> FUN_AR1 "\\hat " |
484 | 494 | | "\\hline" -> LITERAL (TEX_ONLY "\\hline ") |
485 | 495 | | "\\vline" -> LITERAL (TEX_ONLY "\\vline ") |
486 | | - | "\\widetilde" -> LITERAL (TEX_ONLY "\\widetilde ") |
487 | 496 | | "\\widehat" -> LITERAL (TEX_ONLY "\\widehat ") |
488 | 497 | | "\\overline" -> LITERAL (TEX_ONLY "\\overline ") |
489 | 498 | | "\\overbrace" -> LITERAL (TEX_ONLY "\\overbrace ") |
Index: branches/REL1_18/extensions/Math/math/render_info.mli |
— | — | @@ -11,13 +11,10 @@ |
12 | 12 | MN |
13 | 13 | | MI |
14 | 14 | | MO |
15 | | - | MF |
16 | | - |
17 | 15 | type t = |
18 | 16 | HTMLABLEC of font_class * string * string |
19 | 17 | | HTMLABLEM of font_class * string * string |
20 | 18 | | HTMLABLE of font_class * string * string |
21 | 19 | | MHTMLABLEC of font_class * string * string * math_class * string |
22 | | - | MHTMLABLEFC of font_class * string * string * math_class * string * string |
23 | 20 | | HTMLABLE_BIG of string * string |
24 | 21 | | TEX_ONLY of string |
Index: branches/REL1_18/extensions/Math/math/html.ml |
— | — | @@ -28,7 +28,6 @@ |
29 | 29 | TEX_LITERAL (HTMLABLE (ft,_,sh))::r -> (html_liberal (); (font_render sh (ctx,ft))^html_render_flat ctx r) |
30 | 30 | | TEX_LITERAL (HTMLABLEC(ft,_,sh))::r -> (font_render sh (ctx,ft))^html_render_flat ctx r |
31 | 31 | | TEX_LITERAL (MHTMLABLEC(ft,_,sh,_,_))::r -> (font_render sh (ctx,ft))^html_render_flat ctx r |
32 | | - | TEX_LITERAL (MHTMLABLEFC(ft,_,sh,_,_,_))::r -> (font_render sh (ctx,ft))^html_render_flat ctx r |
33 | 32 | | TEX_LITERAL (HTMLABLEM(ft,_,sh))::r -> (html_moderate(); (font_render sh (ctx,ft))^html_render_flat ctx r) |
34 | 33 | | TEX_LITERAL (HTMLABLE_BIG (_,sh))::r -> (html_liberal (); sh^html_render_flat ctx r) |
35 | 34 | | TEX_FUN1hl (_,(f1,f2),a)::r -> f1^(html_render_flat ctx [a])^f2^html_render_flat ctx r |
— | — | @@ -76,7 +75,6 @@ |
77 | 76 | | TEX_LITERAL (HTMLABLEM(ft,_,sh))::r -> (html_moderate(); ("",(font_render sh (ctx,ft)),"")::html_render_deep ctx r) |
78 | 77 | | TEX_LITERAL (HTMLABLEC(ft,_,sh))::r -> ("",(font_render sh (ctx,ft)),"")::html_render_deep ctx r |
79 | 78 | | TEX_LITERAL (MHTMLABLEC(ft,_,sh,_,_))::r -> ("",(font_render sh (ctx,ft)),"")::html_render_deep ctx r |
80 | | - | TEX_LITERAL (MHTMLABLEFC(ft,_,sh,_,_,_))::r -> ("",(font_render sh (ctx,ft)),"")::html_render_deep ctx r |
81 | 79 | | TEX_LITERAL (HTMLABLE_BIG (_,sh))::r -> (html_liberal (); ("",sh,"")::html_render_deep ctx r) |
82 | 80 | | TEX_FUN2h (_,f,a,b)::r -> (html_liberal (); (f a b)::html_render_deep ctx r) |
83 | 81 | | TEX_INFIXh (_,f,a,b)::r -> (html_liberal (); (f a b)::html_render_deep ctx r) |