| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
| return [hlist] | ||
|
|
||
| def text(self, s, loc, toks): | ||
| self.pop_state() |
There was a problem hiding this comment.
This won't work with something like r"$\mathbf{\text{hello, world!}}$" (popping out of the mathbf puts you in italic mode, and setting back to italic at exit isn't correct either; instead I think you just need to push a new state for the \text.
Sorry, something went wrong.
There was a problem hiding this comment.
Ahh, OK! I'll look into the state things. Almost looked a bit too easy to solve it...
Sorry, something went wrong.
|
I can't repro the kerning issue? Usually you can try blowing up text size (e.g. fontsize=42) to make it easier to check them; otherwise it may just be pixellation. One major comment, but otherwise the approach looks good to me. (Just needs a test as well.) |
Sorry, something went wrong.
|
This is updated (although I only pushed, not commented), if you have time @anntzer ... |
Sorry, something went wrong.
|
Just one minor point left, I think. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Closes #18520
gives

However, the kerning is still from math, see
import matplotlib.pyplot as plt plt.text(0.1, 0.5, r"where $a = \sin(\phi) \text{ where } \phi = \frac{x}{y}$") plt.draw()where the spacing between the e and the r in where differs.
However, it is not the case for e.g. r"where $\text{where}$" so not really clear to me why and where this happens.
Again, a bit doubtful (see #22171) if I can generate correct test images, so tests must be added.
It is not really clear how things will work with special symbols etc. Right now \{, \} and \$ can be dealt with, but one can probably break it if one tries (as for LaTeX itself).
PR Checklist
Tests and Styling
Documentation