On Fri, Apr 22, 2016 at 06:02:50PM +0300, Dmitry Shachnev wrote: > Hi Mattia, and sorry for the late response,
I shall apologize too. I was pretty busy in the last month, but in the last 2 weeks I tackled a lot of things I've been postponing. > On Thu, Mar 17, 2016 at 03:34:17PM +0000, Mattia Rizzolo wrote: > > For more background, see > > https://github.com/mathjax/MathJax/wiki/Single-file-built > > I think your problem should be solved by replacing the bundled MathJax.js with > a link to /usr/share/javascript/mathjax/MathJax.js and adding something like > this to the HTML files (not tested): Ok, so I managed to understand what I had to look for while testing, found out a test file and figured what I should modify. FTR, this thing is needed to the preview window, and it is only injected in the html right before sending it to the previewer. The annoying part is that to test this a full recompilation is needed, as this html bit is engraved into a QString in src/MainUI/PreviewWindow.cpp. > MathJax.Hub.Config({ > config: ["MML_SVG.js"], > extensions: ["MatchWebFonts.js"], > MathML: { extensions: ["mml3.js"] }, > SVG: { blacker: 1 }, > }); This is apparently not right (as in: the test document is not displayed as it should). So, I went looking for mathjax docs <http://docs.mathjax.org/> on a tentative to forge configuration that would work, but I totally failed on the process (all the trials failed). Would you be willing to help me figure out what are the right options for this? Also FTR, the patch i cooked is this (+ rm+ln) --- a/src/MainUI/PreviewWindow.cpp +++ b/src/MainUI/PreviewWindow.cpp @@ -213,6 +213,14 @@ int endheadpos = text.indexOf("</head>"); if (endheadpos > 1) { QString inject_mathjax = + "<script type=\"text/x-mathjax-config\">" + " MathJax.Hub.Config({" + " config: [\"MML_SVG.js\"]," + " extensions: [\"MatchWebFonts.js\"]," + " MathML: { extensions: [\"mml3.js\"] }," + " SVG: { blacker: 1 }," + " });" + "</script>" "<script type=\"text/javascript\" " "src=\"" + mathjaxurl + "\"></script>"; text.insert(endheadpos, inject_mathjax); > This is first time I hear about the single-file option, and according to the > linked upstream page, it is experimental and needs some hacks to make SVG, etc > working. Also, sigil's configuration looks a bit specific, so if I add a > generic single-file build, it will most likely not suit sigils' needs. I *think* what sigil needs is input in MathML and output in SVG, but I have no clue how this thing works... > Any ideas what else I can do are appreciated :) If you can think of any other clever conf that would be awesome! For that, feel free to ping me on IRC, I'm there most of the time :) If you can't, well, thanks a bunch already for this inputs!! -- regards, Mattia Rizzolo GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`. more about me: https://mapreri.org : :' : Launchpad user: https://launchpad.net/~mapreri `. `'` Debian QA page: https://qa.debian.org/developer.php?login=mattia `-
signature.asc
Description: PGP signature

