--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/09bae703-9b9f-438b-b22b-5987a68e9027%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You might consider using mathjax-node, which is a command-line version of MathJax, rather than trying to use MathJax in browser:or more specifically, the mathjax-node-svg2png extension atThese are command-line tools for working with MathJax.Just FYI, the issue you are probably running into is the fact that the SVG output uses a shared cache for the paths that it uses within the expressions on the page. The individual equations have <use> elements that refer to the paths in that cache. If you are using an individual SVG from the page without also including that global cache, your SVG's will not have the paths to refer to, and you will have blank images, as you are seeing.You can configure MathJax to not use a cache (i.e., use <path> elements directly), or use a cache that is local to each expression rather than a global cache. For example<script type="text/x-mathjax-config">MathJax.Hub.Config({SVG: {useGlobalCache: false}});</script>placed just BEFORE the script that loads MathJax.js itself would tell the SVG output to use font caches that are local to each expression. That should make the SVG elements self contained so they can be saved and processed outside the browser.Hope that does the trick fo you.Davide
On Jun 18, 2019, at 10:33 AM, m.u...@gmail.com wrote:
Hi,I can render mathml to equations as svg paths. I want the svg path to be converted to the image(
png or jpg) which can then be sent to webgl to render as a image. Can you guys point me in the right direction? I tried saving the inline svg and its empty. And I found out that paths have references to mathjax style files.so the image convert was empty(transparent).--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathja...@googlegroups.com.
You might consider using mathjax-node, which is a command-line version of MathJax, rather than trying to use MathJax in browser:or more specifically, the mathjax-node-svg2png extension atThese are command-line tools for working with MathJax.Just FYI, the issue you are probably running into is the fact that the SVG output uses a shared cache for the paths that it uses within the expressions on the page. The individual equations have <use> elements that refer to the paths in that cache. If you are using an individual SVG from the page without also including that global cache, your SVG's will not have the paths to refer to, and you will have blank images, as you are seeing.You can configure MathJax to not use a cache (i.e., use <path> elements directly), or use a cache that is local to each expression rather than a global cache. For example<script type="text/x-mathjax-config">MathJax.Hub.Config({SVG: {useGlobalCache: false}});</script>placed just BEFORE the script that loads MathJax.js itself would tell the SVG output to use font caches that are local to each expression. That should make the SVG elements self contained so they can be saved and processed outside the browser.Hope that does the trick fo you.Davide
On Jun 18, 2019, at 10:33 AM, m.u...@gmail.com wrote:
Hi,I can render mathml to equations as svg paths. I want the svg path to be converted to the image(
png or jpg) which can then be sent to webgl to render as a image. Can you guys point me in the right direction? I tried saving the inline svg and its empty. And I found out that paths have references to mathjax style files.so the image convert was empty(transparent).--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathja...@googlegroups.com.
I tried the useGlobalCache : false still i get blank svg on save. I copied the element<use transform="scale(0.707)" xlink:href="#E1-MJMAIN-31" x="1803" y="0"></use>When I remove the xlink:href="#E1-MJMAIN-31". Its not rendered.
<script type="text/x-mathjax-config">MathJax.Hub.Config({SVG: {
useFontCache: false}});</script>