-
Notifications
You must be signed in to change notification settings - Fork 97
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
[SVG ouptut] API for stylesheet #283
Comments
A quick look at the code suggests that for the "self-contained" SVG images that were generated by mj-single, there are only three styles that affect the SVG elements themselves (the ones that handle the font for monospace and sans-serif fonts, and the one for the color of href links). The rest all have to do with the surrounding machinery of MathJax, and its preventing bleed-through of CSS from the surrounding page into the SVG. Your current |
@dpvc hi I wonder generate sgv from Latex which contains Chinese chacater, but the error is cmd is |
@MissMyCat please don't post unrelated issues on existing issue threads.
that's only a warning; system fonts will be used for characters not provided by the chosen font.
This is #80; that's a difficult problem though. |
@pkra As you can see, Characters overlap each other. Is this relate to style or font? |
I think Peter meant that you should start a new issue when you have a new problem rather than adding to an existing issue that has already been answered (and in this case is pretty much unrelated to the issue you are having). As for the font warning messages, you could edit the
to
to prevent them from being reported. As for the characters themselves, mathjax-node will not be able to place these properly, because it doesn't have the bounding box data required to know how much space they take up (that is one reason you get the warning). Because mathjax-node can not find out the sizes as it can in a browser (that has a DOM whose elements can be measured), it tries to use a monospaced font for unknown characters, and assumes the width of those characters to all be the same and relatively small (1ex as I recall). Your characters probably aren't in your system's monospace font, and when you view the file, you are getting them from a variable-width font where they take up more space. So they aren't placed properly. Unfortunately, there is very little that mathjax-node can do about that without having a more fully-featured DOM implementation to work with. |
Realized I never responded to the actual topic.
Makes sense. |
This came up on pkra/mathjax-node-page#18.
There's currently an API to get the stylesheet needed for the CommonHTML output but no API for the stylesheet used for SVG output. It used to be that mjpage added a slimmed down stylesheet when using the SVG output.
Should there be a way to generate it or should this be handled differently?
The text was updated successfully, but these errors were encountered: