mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-23 23:25:02 +00:00
A change to fix a bug in LaTeX rendering of function names. An
additional space was necessary in the LaTeX code when rendering functions such as \sin foo32. Also a few lines of code were removed from texutil.ml that are now handled by lexer.mll.
This commit is contained in:
parent
0a98d44540
commit
e9f24f5264
|
@ -66,7 +66,7 @@ rule token = parse
|
|||
| "\\" (latex_function_names as name) space * "\\{"
|
||||
{ LITERAL (MHTMLABLEFC(FONT_UFH, "\\" ^ name ^ "\\{", name ^ "{", MF, name, "{")) }
|
||||
| "\\" (latex_function_names as name) space *
|
||||
{ LITERAL (MHTMLABLEC(FONT_UFH,"\\" ^ name, name ^ " ", MF, name)) }
|
||||
{ LITERAL (MHTMLABLEC(FONT_UFH,"\\" ^ name ^ " ", name ^ " ", MF, name)) }
|
||||
| "\\" (mediawiki_function_names as name) space * "("
|
||||
{ (Texutil.tex_use_ams(); LITERAL (MHTMLABLEFC(FONT_UFH,
|
||||
"\\operatorname{" ^ name ^ "}(", name ^ "(", MF, name, "("))) }
|
||||
|
@ -77,7 +77,7 @@ rule token = parse
|
|||
{ (Texutil.tex_use_ams(); LITERAL (MHTMLABLEFC(FONT_UFH,
|
||||
"\\operatorname{" ^ name ^ "}\\{", name ^ "{", MF, name, "{"))) }
|
||||
| "\\" (mediawiki_function_names as name) space *
|
||||
{ (Texutil.tex_use_ams(); LITERAL (MHTMLABLEC(FONT_UFH,"\\operatorname{" ^ name ^ "}", name ^ " ", MF, name))) }
|
||||
{ (Texutil.tex_use_ams(); LITERAL (MHTMLABLEC(FONT_UFH,"\\operatorname{" ^ name ^ "} ", name ^ " ", MF, name))) }
|
||||
| "\\" alpha + { Texutil.find (Lexing.lexeme lexbuf) }
|
||||
| "\\," { LITERAL (HTMLABLE (FONT_UF, "\\,"," ")) }
|
||||
| "\\ " { LITERAL (HTMLABLE (FONT_UF, "\\ "," ")) }
|
||||
|
|
|
@ -269,10 +269,6 @@ let find = function
|
|||
| "\\limits" -> LITERAL (TEX_ONLY "\\limits ")
|
||||
| "\\nolimits" -> LITERAL (TEX_ONLY "\\nolimits ")
|
||||
| "\\top" -> LITERAL (TEX_ONLY "\\top ")
|
||||
| "\\arccot" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccot}}","arccot")))
|
||||
| "\\arcsec" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arcsec}}","arcsec")))
|
||||
| "\\arccsc" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{arccsc}}","arccsc")))
|
||||
| "\\sgn" -> (tex_use_ams (); LITERAL (HTMLABLEC(FONT_UFH,"\\mathop{\\mathrm{sgn}}","sgn")))
|
||||
| "\\bullet" -> LITERAL (HTMLABLE (FONT_UFH, "\\bullet ", "•"))
|
||||
| "\\bull" -> LITERAL (HTMLABLE (FONT_UFH, "\\bullet ", "•"))
|
||||
| "\\angle" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\angle ", "∠")))
|
||||
|
|
Loading…
Reference in a new issue