Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Problem
\bf
and\it
are both supported in mathtext but if used together, only the inner style is applied.
Proposed Solution
Apply both styles if both\bf
and\it
are used together. Alternatively, a new\bfit
command could be introduced which enables text to be set in bold and italic.
Additional context and prior art
This would be very useful when setting the experiment label in figures for the ATLAS experiment, which requires the name of the experiment in bold-italic followed by text describing the status of that figure in ordinary text. Additional text below this label communicates various experimental conditions that are often useful in interpreting the figure. In the absence of rich text functionality, mathtext (orusetex
) is the only way to do this.
I currently handle this inbeojan/atlas-mpl by usingusetex
. However, this requires the user to have a full LaTeX installation available, along with the TeX Gyre fonts in that installation in order to meet the font family requirements of the experiment.
@andrzejnovak handles the same issue inscikit-hep/mplhep by setting the various parts of the label separately, heuristically calculating the offsets needed. This is suboptimal compared to using the text layout algorithms built into the Matplotlib text engine.