Greetings,
I've been checking out the code in lib/matplotlib/mathtext.py with the
hope of adding support for a "widebar". I have something that works,
although unlike \widetilde and \widehat, I can only find one glyph and
it's in cmr10. I've attached a patch that adds \widebar support using
svn rev 7943 if anyone is interested!
Cheers!
Sean Arms
University of Oklahoma
School of Meteorology
PhD Candidate
Index: lib/matplotlib/mathtext.py
mathtext_widebar.patch (796 Bytes)
···
===================================================================
--- lib/matplotlib/mathtext.py (revision 7943)
+++ lib/matplotlib/mathtext.py (working copy)
@@ -769,6 +769,7 @@
('ex', '\x64')],
r'\widetilde': [('rm', '\x7e'), ('ex', '\x65'), ('ex', '\x66'),
('ex', '\x67')],
+ r'\widebar' : [('rm', '\xB9')],
r'<' : [('cal', 'h'), ('ex', 'D')],
r'>' : [('cal', 'i'), ('ex', 'E')]
}
@@ -2481,7 +2482,7 @@
r'overleftarrow' : r'\leftarrow'
}
- _wide_accents = set(r"widehat widetilde".split())
+ _wide_accents = set(r"widehat widetilde widebar".split())
def accent(self, s, loc, toks):
assert(len(toks)==1)