Revision: 4586
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4586&view=rev
Author:   mdboom
Date:     2007-12-04 11:34:11 -0800 (Tue, 04 Dec 2007)

Log Message:
-----------
Support '|' as a symbol in mathtext.

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

Modified: trunk/matplotlib/lib/matplotlib/_mathtext_data.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/_mathtext_data.py   2007-12-04 19:29:49 UTC 
(rev 4585)
+++ trunk/matplotlib/lib/matplotlib/_mathtext_data.py   2007-12-04 19:34:11 UTC 
(rev 4586)
@@ -90,7 +90,9 @@
     r'\phi'                 : ('cmmi10',  42),
     r'\chi'                 : ('cmmi10',  17),
     r'\psi'                 : ('cmmi10',  31),
-    
+
+    r'|'                    : ('cmsy10',  47),
+    r'\|'                   : ('cmsy10',  47),
     r'('                    : ('cmr10',  119),
     r'\leftparen'           : ('cmr10',  119),
     r'\rightparen'          : ('cmr10',   68),
@@ -129,7 +131,7 @@
     r'\Phi'                 : ('cmr10',   9),
     r'\Psi'                 : ('cmr10',  15),
     r'\Omega'               : ('cmr10',  12),
-    
+
     # these are mathml names, I think.  I'm just using them for the
     # tex methods noted
     r'\circumflexaccent'         : ('cmr10',   124), # for \hat
@@ -400,7 +402,7 @@
     r'\}'               : ('pncr8a', 125),
     r'\backslash'       : ('pncr8a',  92),
     r'\ast'             : ('pncr8a',  42),
-    
+
     r'\circumflexaccent'         : ('pncri8a',   124), # for \hat
     r'\combiningbreve'           : ('pncri8a',   81),  # for \breve
     r'\combininggraveaccent'     : ('pncri8a', 114), # for \grave
@@ -1773,6 +1775,7 @@
 'succnsim': 8937,
 'gimel': 8503,
 'vert': 124,
+'|': 124,
 'varrho': 1009,
 'P': 182,
 'approxident': 8779,
@@ -2073,7 +2076,7 @@
 'rightzigzagarrow': 8669,
 'rightarrow': 8594,
 'leftarrow': 8592,
-'__sqrt__': 8730,           
+'__sqrt__': 8730,
 'twoheaddownarrow': 8609,
 'oint': 8750,
 'bigvee': 8897,
@@ -2238,7 +2241,7 @@
 '{': 123,
 '}': 125,
 '_': 95,
-'imath': 0x131,          
+'imath': 0x131,
 'circumflexaccent'         : 770,
 'combiningbreve'           : 774,
 'combiningoverline'        : 772,
@@ -2471,5 +2474,5 @@
         (0x0061, 0x007a, 'rm', 0x1d68a)  # a-z
         ],
     }
-        
-    
+
+

Modified: trunk/matplotlib/lib/matplotlib/mathtext.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/mathtext.py 2007-12-04 19:29:49 UTC (rev 
4585)
+++ trunk/matplotlib/lib/matplotlib/mathtext.py 2007-12-04 19:34:11 UTC (rev 
4586)
@@ -2021,7 +2021,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.

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to