-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Support \boldsymbol. (Feature request.) #1366
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
Comments
Love it! Thanks for the squeak! :-) |
There's two problems with doing this. One is that The other problem is really one of font availability. The computer modern truetype fonts that ship with matplotlib (the "Bakoma" fonts), simply don't contain those symbols. We would need to find another computer modern truetype distribution that had more stuff. And chances are it will have a different encoding, so the character map in However, the STIX fonts do have a lot of the Greek symbols in bold, so you can set the rcParam 'mathtext.fontset' to 'stix' and then do:
(Of course, if you really want to use Computer Modern to match the rest of your paper, this is less than ideal.). |
I recently came across the "Latin Modern Math" project when I was looking for math fonts with unicode support: It is a modernized math font for the Computer Modern family in the OpenType format. I already used it in XeLaTeX but I guess one could use it for matplotlib mathtext as well.. |
@pwuertz - sounds interesting. Can you think of any drawbacks to this? |
On first glance (I just opened it up in |
@mdboom - showing my naïvety here, but is there a font which could render the text inside a mathtex block (wrapped by |
The font used in the |
I mispoke -- |
Thanks Mike that helped me along the way, to match the mathtex font to the normal text font (in my case at least):
There is so much font capability in mpl that isn't really documented - are fonts your forte? Are there improvements to the font systems that you would like to see implemented before we write a font chapter in the documentation? |
Seems like there are really two issues here: one for the original The latter certainly stands, but where do we stand on |
The XITS fonts (derived work from STIX that did not deliver for years and years and years) contains both a regular and a bold variant. The Polish TeX user group GUST is working on a number of free Unicode math fonts and some of them come or will come in a bold variant. Even the non-bold fonts contain a number of bold symbols inside the "bold" Unicode slots. Supporting "bold mathematical ..." is certainly worth looking into. There are also some commercial fonts like Lucida with a special bold font. What I don't know is how much effort is needed to get the OpenType Math working in matplotlib. |
There is also http://www.gust.org.pl/projects/e-foundry/tex-gyre-dejavu-math. If bold symbols from the Unicode math repertoire is going to be used, it should be pretty straightforward to switch to a different Unicode Math OTF font. |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
The request is still valid/wanted. |
\perp won't go bold for me using this and when I use Latex then nothing will go bold and the font looks worse/inconsistent with other plots. Please help. |
While I understand that it is possible to use
along with the appropriate declarations for text.latex.preamble to be able to use \boldsymbol, it would be nice to be able to keep
with something like
to achieve bold symbols.
Even better would be to detect whether the current font is bold, and automatically substitute in a \boldsymbol command.
(As always, I'm appreciative of the work that matplotlib developers have contributed, but I also know that the squeaky wheel gets the grease.)
The text was updated successfully, but these errors were encountered: