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:
Nicholas Longo 2011-05-13 00:01:44 +00:00
parent 0a98d44540
commit e9f24f5264
2 changed files with 2 additions and 6 deletions

View file

@ -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, "\\ "," ")) }

View file

@ -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 ", "∠")))