mathtext support for \phantom, \llap, \rlap for faking text metrics.#30908
Merged
QuLogic merged 1 commit intomatplotlib:text-overhaulfrom Mar 11, 2026
Merged
mathtext support for \phantom, \llap, \rlap for faking text metrics.#30908QuLogic merged 1 commit intomatplotlib:text-overhaulfrom
QuLogic merged 1 commit intomatplotlib:text-overhaulfrom
Conversation
QuLogic
reviewed
Feb 7, 2026
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| mathtext gained support for the TeX macros ``\phantom``, ``\llap``, and | ||
| ``\rlap``. ``\phantom`` allows to occupy some space on the canvas as if some | ||
| text was being rendered, without actually render that text, whereas ``\llap`` |
Member
There was a problem hiding this comment.
Suggested change
| text was being rendered, without actually render that text, whereas ``\llap`` | |
| text was being rendered, without actually rendering that text, whereas ``\llap`` |
Member
|
But still has conflicts... |
Contributor
Author
|
rebased. |
QuLogic
approved these changes
Mar 2, 2026
ksunden
approved these changes
Mar 6, 2026
wavebyrd
pushed a commit
to wavebyrd/matplotlib
that referenced
this pull request
Mar 13, 2026
mathtext support for \phantom, \llap, \rlap for faking text metrics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28211 (although it doesn't implement
\smash, which isn't really necessary). Goes on top of #30059 (some details of mathtext raster rendering are different prior to #30059 and I don't think it's really worth figuring out how to exactly write the code compatible with the old version).The example in the given issue is supported via