Skip to content
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

Use stixsans mathfont for poster and slides #26

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pub_ready_plots/pub_ready_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,17 @@ def get_mpl_rcParams(
)

format: Style = PAPER_FORMATS[layout]
is_poster: bool = "poster" in layout._name_.lower()
is_poster_or_slides: bool = any(
name in layout._name_.lower() for name in ["poster", "slides"]
)

rc_params = {
"text.usetex": False,
"font.size": format.footnote_size,
"font.family": "sans-serif" if is_poster else "serif",
"font.family": "sans-serif" if is_poster_or_slides else "serif",
"font.serif": [format.font_name] + rcParams["font.serif"],
"font.sans-serif": [format.font_name, "Times"] + rcParams["font.sans-serif"],
"mathtext.fontset": "stixsans" if is_poster else "cm",
"mathtext.fontset": "stixsans" if is_poster_or_slides else "cm",
"lines.linewidth": format.linewidth,
"axes.linewidth": format.linewidth / 2,
"axes.titlesize": format.footnote_size,
Expand Down