Last modified: 2013-09-30 01:52:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T3594, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1594 - change texvc's HTML rendering of "-" to "−"
change texvc's HTML rendering of "-" to "−"
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Math (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-26 00:22 UTC by mark_sweep
Modified: 2013-09-30 01:52 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description mark_sweep 2005-02-26 00:22:22 UTC
Currently, texvc renders <math>A-B</math> with a hyphen (" - ") instead of a
minus sign (" &minus; ").  Use of the minus sign should be preferred for math
display.  The following diff will fix this by adding one line to the lexer:

# cvs diff -u
cvs diff: Diffing .
Index: lexer.mll
===================================================================
RCS file: /cvsroot/wikipedia/phase3/math/lexer.mll,v
retrieving revision 1.2
diff -u -r1.2 lexer.mll
--- lexer.mll   19 May 2003 22:40:16 -0000      1.2
+++ lexer.mll   26 Feb 2005 00:20:35 -0000
@@ -47,6 +47,7 @@
   | 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
(HTMLABLEC (FONT_UFH, str,str)) }
+  | "-"                         { LITERAL (HTMLABLE (FONT_UFH,"-"," &minus; "))}
   | 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)) }
   | "\\" alpha +               { Texutil.find (Lexing.lexeme lexbuf) }
Comment 1 Zigger 2005-03-13 14:34:54 UTC
Patch applied by Jens.
Comment 2 JeLuF 2005-03-13 14:38:34 UTC
Cache still contains HTML generated with old texvc revision.
Comment 3 JeLuF 2005-03-13 16:33:09 UTC
cleaned caches
Comment 4 Brion Vibber 2011-09-13 20:37:11 UTC
Found while doing general math testing:

This seems to render "-3" as " &minus; 3" in HTML mode, which renders with an extra space.
Comment 5 Sumana Harihareswara 2011-12-23 18:08:37 UTC
Marking patch as reviewed per Brion's comment 4.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links