From 7346759250f232130eed3c7befa5a3ec346550b5 Mon Sep 17 00:00:00 2001 From: Nicholas Longo Date: Mon, 16 May 2011 19:25:46 +0000 Subject: [PATCH] The following change fixes minor issues with the MathML display of arithmetic operations. In particular in displaying x-2 it should use the entity − in MathML as well. Also changed spacing so an opporation such as "+" would render as + instead of +. --- math/lexer.mll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/math/lexer.mll b/math/lexer.mll index db2cbda..3cede15 100644 --- a/math/lexer.mll +++ b/math/lexer.mll @@ -53,8 +53,8 @@ rule token = parse | literal_mn { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_RM, str,str,MN,str)) } | literal_uf_lt { let str = Lexing.lexeme lexbuf in LITERAL (HTMLABLEC (FONT_UFH, str,str)) } | delimiter_uf_lt { let str = Lexing.lexeme lexbuf in DELIMITER (MHTMLABLEC (FONT_UFH, str,str,MO,str)) } - | "-" { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_UFH,"-"," − ",MO,str))} - | literal_uf_op { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_UFH, str," "^str^" ",MO,str)) } + | "-" { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_UFH,"-"," − ",MO," − "))} + | literal_uf_op { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_UFH, str," "^str^" ",MO," "^str^" ")) } | delimiter_uf_op { let str = Lexing.lexeme lexbuf in DELIMITER (MHTMLABLEC (FONT_UFH, str," "^str^" ",MO,str)) } | "\\sqrt" space * "[" { FUN_AR1opt "\\sqrt" } | "\\xleftarrow" space * "[" { Texutil.tex_use_ams(); FUN_AR1opt "\\xleftarrow" }