You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Month names not set as text when using usetex #19836
The dateformatter does not use text mode for the month names but sets them like $Aug$. Which is bad typography, since it will be typeset as the mathematical expression A * u * g, not the text Aug.
Currently the formatter wraps text in \mathdefault (so things work with usetex=False), but mathdefault is a matplotlib-only thing and we just strip it out for usetex. In #18520 I argued that we should perhaps map it to amsmath's \text instead, which would fix that.
If amsmath's \text is not introduced in the near future, we can modify _wrap_in_tex function to differentiate alphabets and other characters, leaving alphabets out from \mathdefault. This way is a little clumsy, but it works. A PR can be open with this approach.
Activity
anntzer commentedon Mar 31, 2021
Currently the formatter wraps text in
\mathdefault(so things work with usetex=False), but mathdefault is a matplotlib-only thing and we just strip it out for usetex. In #18520 I argued that we should perhaps map it to amsmath's\textinstead, which would fix that.smartlixx commentedon Apr 1, 2021
If amsmath's
\textis not introduced in the near future, we can modify_wrap_in_texfunction to differentiate alphabets and other characters, leaving alphabets out from\mathdefault. This way is a little clumsy, but it works. A PR can be open with this approach.tacaswell commentedon May 14, 2021
@maxnoe Was this a change from 3.3?silly question, it is a new feature in 3.4 🐑