Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Commit497738c
committed
Fix baseline alignment when using usetex.
Previously we inferred the baseline of usetex strings with the baselineof the character with the lowest baseline, which is wrong in thepresence of indices (see usetex_baseline_test.py). There was an optionto use the "preview" latex package to fix that, but that was never madethe default and likely cannot as the package is GPL.Instead I can infer the baseline position by "reverse-engineering"the starting instructions of the dvi stream (this was done withoutconsulting the approach in "preview"). The results can be checkedusing usetex_baseline_test.py (preview=False now looks the same aspreview=True; likewise, the output of test_usetex was changed.The text.latex.preview rc can now be deprecated (in a future PR).The test was also updated to include the strings of theusetex_baseline_test example (which may go away once text.latex.previewis removed).1 parent9fa950c commit497738c
File tree
6 files changed
+34
-8
lines changed- lib/matplotlib
- backends
- tests
- baseline_images/test_usetex
6 files changed
+34
-8
lines changedLines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
484 | 484 |
| |
485 | 485 |
| |
486 | 486 |
| |
487 |
| - | |
488 |
| - | |
| 487 | + | |
489 | 488 |
| |
490 | 489 |
| |
491 | 490 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
267 | 267 |
| |
268 | 268 |
| |
269 | 269 |
| |
| 270 | + | |
| 271 | + | |
270 | 272 |
| |
271 | 273 |
| |
272 | 274 |
| |
| |||
294 | 296 |
| |
295 | 297 |
| |
296 | 298 |
| |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
297 | 311 |
| |
298 | 312 |
| |
299 | 313 |
| |
| 314 | + | |
| 315 | + | |
| 316 | + | |
300 | 317 |
| |
301 | 318 |
| |
302 | 319 |
| |
|
Binary file not shown.
Lines changed: 15 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
21 | 22 |
| |
22 |
| - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 |
| |
24 | 27 |
| |
25 | 28 |
| |
26 | 29 |
| |
27 | 30 |
| |
28 |
| - | |
29 |
| - | |
30 |
| - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
31 | 41 |
| |
32 | 42 |
| |
33 | 43 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
410 | 410 |
| |
411 | 411 |
| |
412 | 412 |
| |
413 |
| - | |
| 413 | + | |
414 | 414 |
| |
415 | 415 |
| |
416 | 416 |
| |
|
0 commit comments
Comments
(0)