| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
rebased. |
Sorry, something went wrong.
|
Is the failed doc build relevant? Moving to draft, feel free to move back when tests pass... |
Sorry, something went wrong.
Insert a `\special` at the end of the TeX output and record the baseline position there. This should be more robust than trying to guess the format of the dvi preamble, and more importantly this will also allow detecting the last baseline of *multiline* TeX output, which will then allow letting TeX handle multiline strings itself (while keeping the correct alignment).
Note that it may be worth passing the baselineskip (`Text.get_linespacing()`) as argument to texmanager, but that'll wait for a bigger refactor... for now, let's stick to the old default of 1.25. test_metrics_cache changes as the cache hit pattern changed for usetex strings.
This allows invalidating the cache when the source generation algorithm changes.
|
It seems spurious, but let's try again... |
Sorry, something went wrong.
Revert #22360: Let TeX handle multiline strings itself
… multiline strings itself
| Back | FazBrowse Home | New Git URL |
PR Summary
Previously, multiline strings were split at \n and passed one at a time to TeX -- likely, this is a remnant of how multiline strings are handled for the non-TeX case, as Matplotlib also renders one line at a time. This series of commits switches things to instead pass entire multiline strings all at once to TeX, which is useful e.g. if a tex font command must apply to arbitrary strings that may contain newlines. Goes on top of #22359.
1st commit: Switch TeX baseline detection to use a dvi special.
Insert a \special at the end of the TeX output and record the baseline
position there. This should be more robust than trying to guess the
format of the dvi preamble, and more importantly this will also allow
detecting the last baseline of multiline TeX output, which will then
allow letting TeX handle multiline strings itself (while keeping the
correct alignment).
2nd commit: Let TeX handle newlines itself.
Note that it may be worth passing the baselineskip
(Text.get_linespacing()) as argument to texmanager, but that'll wait
for a bigger refactor... for now, let's stick to the old default of
1.25.
test_metrics_cache changes as the cache hit pattern changed for usetex
strings.
Edit: I suspect that the tests are failing on some builds because the tex cache needs to be invalidated (the minver test run is also the only one that clears the cache first). Will do something about that...
3rd commit: Pick TeX cache name based on entire TeX source.
This allows invalidating the cache when the source generation algorithm
changes.
PR Checklist
Tests and Styling
Documentation