-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[tex2svg-page]-like processing: styles only included in first rendering #2678
Labels
Accepted
Issue has been reproduced by MathJax team
Code Example
Contains an illustrative code example, solution, or work-around
Fixed
Test Needed
v3
v3.2
Milestone
Comments
8 tasks
Well, yes and no. Because you are using the same instance of the output jax for both, the second run thinks it has already inserted the stylesheet into the page, and doesn't do it again. But that's probably not desired behavior. One work-around for now would be to add const run = (documentstring) => {
const mj = mathjax.document(documentstring, {
InputJax: tex,
OutputJax: svg,
});
svg.svgStyles = null;
mj.render();
return (
adaptor.doctype(mj.document) + adaptor.outerHTML(adaptor.root(mj.document))
);
}; |
I've made a PR that should resolve the issue. |
Thanks, Davide. |
dpvc
added
Ready for Review
Test Needed
Code Example
Contains an illustrative code example, solution, or work-around
labels
May 13, 2021
dpvc
added a commit
to mathjax/MathJax-src
that referenced
this issue
May 24, 2021
Clear the stylesheet when used in a new MathDocument. (mathjax/MathJax#2678)
dpvc
added a commit
to mathjax/MathJax-src
that referenced
this issue
May 24, 2021
dpvc
added a commit
to mathjax/MathJax-src
that referenced
this issue
May 24, 2021
Revert "Clear the stylesheet when used in a new MathDocument. (mathjax/MathJax#2678)"
dpvc
added a commit
to mathjax/MathJax-src
that referenced
this issue
May 24, 2021
Clear the stylesheet when used in a new MathDocument. (mathjax/MathJax#2678)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Accepted
Issue has been reproduced by MathJax team
Code Example
Contains an illustrative code example, solution, or work-around
Fixed
Test Needed
v3
v3.2
Sorry for the convoluted title. I'm not sure if the following is expected or not.
Say you do the following (based on https://github.com/mathjax/MathJax-demos-node/blob/master/direct/tex2svg-page)
Then the second output will not include the SVG output styles (
<style id="MJX-SVG-styles">...</style>
).Is this expected? It makes it slightly difficult to test multiple page renderings.
The text was updated successfully, but these errors were encountered: