-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add tex_annotation!()
#43
base: master
Are you sure you want to change the base?
Conversation
user needs to have font installed, on linux, check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty cool! I would prefer we go through the to_plottable_cachedtex
pipeline here, and make the mathfont etc changes there, since there is already a lot of logic there surrounding color, fontsize, line spacing, etc.
$(isnothing(mainfont) ? "" : | ||
"\\setmainfont{$mainfont}[Scale=MatchLowercase, Ligatures=TeX]" | ||
) | ||
$(isnothing(mathfont) ? "" : | ||
"\\setmathfont(Digits,Latin)[Scale=MatchLowercase]{$mathfont}" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa cool! I didn't know you could do that.
Do \bf
, \it
, \sc
etc work correctly with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably, we can probably have a comprehensive test of making 2x2x2 different math on the same canvase as a sanity check
two caveats:
- I can't find the default font's name
- I'm yet to fully understand how the exactly interaction between multiple
set*font
work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default font in Makie is "TeX Gyre Heros Makie", it's in the assets
folder of Makie (I think).
I guess we should set the default math font to also be whichever math font relates to TeX Gyre Heros? This is what I was trying to do earlier, in building up a set of known font families for which we have good math fonts.
you can use https://tug.org/FontCatalogue/ to find fonts with math support. https://ctan.org/pkg/tex-gyre-heros?lang=en by the look of it, it's basically Nimbus, but yeah we can default to it. And in that case a good math font is probably https://tug.org/FontCatalogue/urwnimbusroman/ |
Bump? |
for #36