Handling this like an accent is trivial, and handled with the patch
below (which I will commit to SVN).
Handling this in such a way that the length of the arrow changes based
on the size of the underlying text is less straightforward and will take
some time to implement.
Cheers,
Mike
Index: lib/matplotlib/mathtext.py
===================================================================
--- lib/matplotlib/mathtext.py (revision 7148)
+++ lib/matplotlib/mathtext.py (working copy)
@@ -2445,7 +2445,9 @@
r"'" : r'\combiningacuteaccent',
r'~' : r'\combiningtilde',
r'.' : r'\combiningdotabove',
- r'^' : r'\circumflexaccent'
+ r'^' : r'\circumflexaccent',
+ r'overrightarrow' : r'\rightarrow',
+ r'overleftarrow' : r'\leftarrow'
}
_wide_accents = set(r"widehat widetilde".split())
Nicolas Pourcelot wrote:
> Hi,
>
> is there any way to display a big arrow on a vector using mathtext, like
> "$\overrightarrow{AB}$" ?
>
> If not, is there any plan to implement it in a next release ?
>
> Thanks a lot,
>
> Nicolas P.
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
> _______________________________________________
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users