-
Notifications
You must be signed in to change notification settings - Fork 7.6k
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
[Feature Request] Latin-Modern font on the math typesetting #451
Comments
What configuration are you using to change the font? |
+1. STIX sucks (nobody wants this font). Please add the following in the
|
We tested it and there are clipping issues for matrices (see https://www.draw.io/#Uhttps%3A%2F%2Fjgraph.github.io%2Fdrawio-diagrams%2Fdiagrams%2Fmath.xml) |
This is my configuration (https://mhgharieb.github.io/drawio/src/main/webapp/index.html#Uhttps%3A%2F%2Fjgraph.github.io%2Fdrawio-diagrams%2Fdiagrams%2Fmath.xml) |
@alderg Seems that we can just adjust the bounding box to make the clipped region visible again. |
@wookayin Please submit your fix as a PR and we'll review it. |
This comment has been minimized.
This comment has been minimized.
Where do I change the config? |
@alderg Thanks for the reply. I saw the changes are focused on SVG, is there any solutions for PDF? |
PDF export uses the same configuration. |
The TeX font looks like this. I think this PDF viewer makes it look worse than it is on this zoom level, if you zoom in it should match what you see on the screen. |
Yes, you are right. Thanks again. |
Is there anything new that causing the bold-looking? |
Hi, |
We've added a new URL parameter math-output=html in 13.1.13 so that PDFs can be created via File, Print and Print to PDF in the browser with the previous math rendering. See https://desk.draw.io/support/solutions/articles/16000032875 for details. |
Fixed bold math in PDF export. For text selection, use https://app.diagrams.net/?math-output=html with client-side PDF export via File, Print and Print to PDF. |
Thanks, it is no longer bold with the trick. |
Is there an easy way to crop the pdf to the diagram size with this method? |
I know that draw.io uses Mathjax to render latex math. Therefore, draw.io follows the default configuration of Mathjax which uses "MathJax TeX" font by default. Mathjax also supports "Latin-Modern" font which is the actual font used in Latex.
Actually, I am able to reconfigure a local version of draw.io to use "Latin-Modern" in the GUI but the export files "SVG" or "PDF" still use "MathJax TeX" (STIXGeneral-Italic) font by default.
It will be better to use "Latin-Modern" font, so it is consistent with the latex
The text was updated successfully, but these errors were encountered: