Commit 0b615f0
Fix rendering of LaTeXString when using bracket (#5536)
* Fix bracket text to support LaTeXStrings
The text type annotation was forcing LaTeXString to convert to String,
which caused LaTeX expressions like L"u(x) = \sin(x)" to render as
literal text with dollar signs instead of mathematical notation.
Changed text_pos type from Tuple{String, Point2f} to
Tuple{Union{String, LaTeXStrings.LaTeXString}, Point2f}
* Add bracket plot tests with LaTeXString support
Adds new test file test/plots/bracket.jl containing tests to verify
that LaTeX strings are properly preserved in bracket text, including:
- Regular strings still work
- LaTeXStrings are preserved as LaTeXString type
- Mixed vectors preserve individual element types
* Update changelog
* import LaTeXStrings in test
* import LaTeXStrings from Makie
* include RichText
Co-authored-by: Henrik Wolf <49985053+henrik-wolf@users.noreply.github.com>
* check child text plot for string type and test for rich text
* update bracket reftest to use LaTeXString and RichText
* correct placement of changelog entry after merge
---------
Co-authored-by: Henrik Wolf <49985053+henrik-wolf@users.noreply.github.com>
Co-authored-by: Frederic Freyer <frederic481994@hotmail.de>1 parent 97ccdb6 commit 0b615f0
5 files changed
Lines changed: 35 additions & 3 deletions
File tree
- Makie
- src/basic_recipes
- test
- plots
- ReferenceTests/src/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
1217 | | - | |
| 1217 | + | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | | - | |
| 1220 | + | |
1221 | 1221 | | |
1222 | 1222 | | |
1223 | 1223 | | |
| |||
0 commit comments