Dear Michal,
I didn't explicitly use the "mathml" option. I wanted to use LaTeX input to
MathJax (because I've had problems with the MathML generated by TeX4ht before),
so I originally used the mathjax option, but that included MathJax <script>
elements in the generated HTML files, so you advised me not to use it. I
assumed that make4ht would then use MathML because your document "The make4ht
build system", Version v0.3g, says in section 7.6 that:
-----
mjcli detects whether to use MathML or LATEX input by use of the mathjax
option for make4ht. By default, it uses MathML. LATEX input can be required
using:
make4ht -f html5+mjcli filename.tex "mathjax"
-----
I used the command
make4ht -f html5+mjcli manual reduce,3,xhtml " -cunihtf -utf8" -cvalidate
At the end of the run, make4ht reported several errors that all have this form:
-----
[WARNING] domfilter: DOM parsing of manualse28.html failed:
[WARNING] domfilter:
...ive/2020/texmf-dist/tex/luatex/luaxml/luaxml-mod-xml.lua:175: Unbalanced Tag
(/mstyle) [char=51491]
D:\Program Files\mjcli-main\node_modules\mathjax-full\js\core\HandlerList.js:58
throw new Error("Can't find handler for document");
^
Error: Can't find handler for document
at HandlerList.handlesDocument (D:\Program
Files\mjcli-main\node_modules\mathjax-full\js\core\HandlerList.js:58:15)
at HandlerList.document (D:\Program
Files\mjcli-main\node_modules\mathjax-full\js\core\HandlerList.js:62:21)
at Object.document (D:\Program
Files\mjcli-main\node_modules\mathjax-full\js\mathjax.js:10:41)
at Object.<anonymous> (D:\Program Files\mjcli-main\bin\mjcli.js:127:22)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain]
(internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
-----
Each of the HTML files referenced in a similar message is empty and the other
messages reference the tags /msup, /mrow, and /munderover, which all look to me
like MathML tags.
On the non-empty output pages, some of the maths looks fine but some if it is
rendered noticeably differently from the version rendered by MathJax running in
a browser. The maths all looks slightly bigger, some brackets are too tall, and
the calligraphic font looks very different. In fact, I'm wondering whether the
browser is picking up the wrong font files. I haven't investigated further yet.
Francis
-----Original Message-----
From: Michal Hoftich <[email protected]>
Sent: Thursday, 1 April 2021 6:17 pm
To: Francis Wright <[email protected]>
Cc: [email protected]
Subject: Re: [tex4ht] Problem using mjcli on Cygwin
What problems do happen? MathML shouldn't be used unless you explicitly use the
"mathml" option. There are some notorious issues with sub and super scripts
with the MathML option, TeX4ht needs to enclose the base and exponent in {} in
order to work correctly, for example. I am sure there are many more problems.
Best regards,
Michal
>Thanks. Removing the mathjax option does indeed remove the two
>redundant script elements relating to MathJax from the output HTML
>files, although using MathML seems to cause other problems that I need
>to investigate further.
>
>Best wishes, Francis
>