Reputation: 27295
Whenever I run MathJax, I see something like the following in the output html:
<div style="visibility: hidden; overflow: hidden; position: absolute; top: 0px; height: 1px; width: auto; padding: 0px; border: 0px; margin: 0px; text-align: left; text-indent: 0px; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal;"><div id="MathJax_Hidden"><br><br><br><br></div></div>
Unless I'm mistaken, that doesn't do anything. Is there a way to prevent it from happening?
In my use case, I am using the final html only. So I don't care what it looks like while being jaxed.
Here is another one:
<div style="position: absolute; width: 0px; height: 0px; overflow: hidden; padding: 0px; border: 0px; margin: 0px;"><div id="MathJax_Font_Test" style="position: absolute; visibility: hidden; top: 0px; left: 0px; width: auto; padding: 0px; border: 0px; margin: 0px; white-space: nowrap; text-align: left; text-indent: 0px; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; font-size: 40px; font-weight: normal; font-style: normal; font-family: MathJax_Math-italic, sans-serif;"></div></div>
EDIT: here is my config:
MathJax.Hub.Config({
jax: ["input/TeX", "output/NativeMML"],
extensions: ["tex2jax.js"],
messageStyle: "none",
tex2jax: {preview: 'none'},
TeX: {
extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]
}
});
Upvotes: 0
Views: 386
Reputation: 12250
The two div
s that you indicate come from the HTML-CSS output. Since you have the NativeMML output in your configuration, I'm wondering if you are loading a combined configuration file that includes the HTML-CSS output? You don't show the script that actually loads MathJax.js
, so I can't tell, but it certainly looks like the HTML-CSS output jax has been loaded. With the configuration you are using, you don't need a ?config=
in the URL that loads MathJax.js
.
One thing to note: the NativeMML output is browser-specific, in the sense that MathJax will try to work around deficiencies in the MathML support of the various browsers. For example, Firefox doesn't support <mlabeledtr>
, so MathJax will use alternative (less meaningful) markup when there are labeled equations. So the result you get may depend on the browser you are using.
You may also want to consider using mathjax-node, which is a command-line interface to MathJax that can be used to process individual equations or complete pages. That way you don't have to use a browser.
Upvotes: 1