FIX: re-order symbol and acent in mathtext - #4588
Conversation
Try to find symbols before finding accents Closes matplotlib#4462
5191ab8 to
0fdeb6e
Compare
|
@mdboom rebased + tests added |
|
Ping me if I should merge these tests into one, the idea was to split them up to make bisection easier |
|
ping @mdboom |
FIX: re-order symbol and acent in mathtext
|
@tacaswell: In my system this switch messes up the position of the accents. It might be system dependent, but I think my system is common enough that this shouldn't happen (everything from Debian Testing repos except matplotlib master, Python 3.4). Before the fix, accents rendered fine, symbols didn't: After it, accents are shifted to the left: I don't know much about parsers, so I don't really understand how this can happen from a cursory glance at |
|
Well, that is exciting. On Fri, Aug 7, 2015, 12:19 PM Victor Zabalza notifications@github.com
|
|
What is the mathtex string you are using? On Fri, Aug 7, 2015 at 12:24 PM, Thomas A Caswell notifications@github.com
|
|
The top one is from a test, the bottom is the one from issue #4462, and which is in tests as well since this PR: Note as well that the mathtext test for the first one doesn't fail for me: maybe the accents don't have enough area to meet the threshold? |
|
re: accents, I bet you are right about that. We probably only test them on As for the parsing, what I think is really strange is that the \hat for the On Fri, Aug 7, 2015 at 2:15 PM, Victor Zabalza notifications@github.com
|
|
It seems so: instead of being rendered in place and then shifted, it looks
|
This is a follow up to matplotlib#4588 The change in ae91e9f fixed the symbols that started with accent names, but broke all of the other accents. This fixes both by special casing the 8 named symbols that start with an accent as a prefix. ex '\doteq' should be parsed as a single symbol, not as as two symbols (e, q) with a dot over the e ('\dot{e}q')
This is a follow up to matplotlib#4588 The change in ae91e9f fixed the symbols that started with accent names, but broke all of the other accents. This fixes both by special casing the 8 named symbols that start with an accent as a prefix. ex '\doteq' should be parsed as a single symbol, not as as two symbols (e, q) with a dot over the e ('\dot{e}q')



Try to find symbols before finding accents
Closes #4462
attn @mdboom What can of worms have I opened here?