Revision: 4238
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4238&view=rev
Author:   mdboom
Date:     2007-11-12 12:45:15 -0800 (Mon, 12 Nov 2007)

Log Message:
-----------
[ 1358130 ] Cannot get underscore in mathtext
Fixed.

Modified Paths:
--------------
    trunk/matplotlib/examples/mathtext_examples.py
    trunk/matplotlib/lib/matplotlib/_mathtext_data.py
    trunk/matplotlib/lib/matplotlib/mathtext.py

Modified: trunk/matplotlib/examples/mathtext_examples.py
===================================================================
--- trunk/matplotlib/examples/mathtext_examples.py      2007-11-12 20:27:33 UTC 
(rev 4237)
+++ trunk/matplotlib/examples/mathtext_examples.py      2007-11-12 20:45:15 UTC 
(rev 4238)
@@ -6,7 +6,7 @@
 
 stests = [
     r'Kerning: AVA $AVA$',
-    r'\$100.00 $\alpha$',
+    r'\$100.00 $\alpha \_$',
     r'$\frac{\$100.00}{y}$',
     r'$x   y$',
     r'$x+y\ x=y\ x<y\ x:y\ x,y\ [EMAIL PROTECTED]',

Modified: trunk/matplotlib/lib/matplotlib/_mathtext_data.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/_mathtext_data.py   2007-11-12 20:27:33 UTC 
(rev 4237)
+++ trunk/matplotlib/lib/matplotlib/_mathtext_data.py   2007-11-12 20:45:15 UTC 
(rev 4238)
@@ -117,6 +117,7 @@
     r'%'                    : ('cmr10',   48),
     r'\$'                   : ('cmr10',   99),
     r'@'                    : ('cmr10',  111),
+    r'\_'                   : ('cmtt10', 79),
     r'\Gamma'               : ('cmr10',  19),
     r'\Delta'               : ('cmr10',   6),
     r'\Theta'               : ('cmr10',   7),
@@ -2236,6 +2237,7 @@
 '$': 36,
 '{': 123,
 '}': 125,
+'_': 95,
 'imath': 0x131,          
 'circumflexaccent'         : 770,
 'combiningbreve'           : 774,

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2007-11-12 20:27:33 UTC (rev 
4237)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2007-11-12 20:45:15 UTC (rev 
4238)
@@ -1975,7 +1975,7 @@
                      ).setParseAction(self.customspace).setName('customspace')
 
         unicode_range = u"\U00000080-\U0001ffff"
-        symbol       =(Regex(UR"([a-zA-Z0-9 
+\-*/<>=:,.;!'@()%s])|(\\[%%${}\[\]])" % unicode_range)
+        symbol       =(Regex(UR"([a-zA-Z0-9 
+\-*/<>=:,.;!'@()%s])|(\\[%%${}\[\]_])" % unicode_range)
                      | Combine(
                          bslash
                        + oneOf(tex2uni.keys())


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to