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
Config options don't change appearance of SVG output #456
I am using Mathjax-node v2.1.1 to render SVG output. The SVG output is too large and the font-weight is too heavy compared to its surrounding text. I've tried changing the config options to no avail. Here is an example of the typeset math compared to the text it is surrounded by:
Changing the configuration has not seemed to yield any differences in rendering whatsoever.
Not all MathJax configuration options apply to mathjax-node. One of these is the scale parameter. In the browser, MathJax handles the scale by placing a <span style="font-size:70%"> element around the <svg> element, but that is not included in the mathjax-node output, since that produces only the <svg> element. You can modify your code to include a surrounding <span> to include the needed scaling factor, if you want.
Also note that mtextFontInherit: true, while allowed, will not produce the result you may be expecting. Since mathjax-node does not have access to the surrounding font (as MathJax does in the browser), it can not know the size of the text in that font, and so doesn't know how much space to leave for it. So mathjax-node uses the monospace font, so that it can approximate the size better.
As for the darkness, I am not able to reproduce the result you are seeing. Can you link to an actual page that shows it? You might try changing the blacker option in the SVG configuration block. Its default should be 1, but try setting it to 1 or 0 and see if that helps.
Activity
dpvc commentedon Feb 24, 2020
Not all MathJax configuration options apply to mathjax-node. One of these is the
scaleparameter. In the browser, MathJax handles the scale by placing a<span style="font-size:70%">element around the<svg>element, but that is not included in the mathjax-node output, since that produces only the<svg>element. You can modify your code to include a surrounding<span>to include the needed scaling factor, if you want.Also note that
mtextFontInherit: true, while allowed, will not produce the result you may be expecting. Since mathjax-node does not have access to the surrounding font (as MathJax does in the browser), it can not know the size of the text in that font, and so doesn't know how much space to leave for it. So mathjax-node uses themonospacefont, so that it can approximate the size better.As for the darkness, I am not able to reproduce the result you are seeing. Can you link to an actual page that shows it? You might try changing the
blackeroption in the SVG configuration block. Its default should be 1, but try setting it to 1 or 0 and see if that helps.