Closed ishanina closed 4 years ago
I don't get this result on your test file, $\mathcal{O}$
is converted as
<math xmlns='http://www.w3.org/1998/Math/MathML' display='inline'><mi mathvariant='bold-script'>𝒪</mi></math>
This may be caused by older version of configuration files for TeX4ht fonts in Miktex. Try the following file, cmsy.htf
:
cmsy 0 127
'−' '' 0 %
'⋅' '' 1 % cmsy.htf (unicode) 2020-05-27-14:14 %
'×' '' 2 % Copyright 2000-2009 Michel Goossens %
'∗' '' 3 % Eitan M. Gurari
'÷' '' 4 %
'◇' '' 5 % This work may be distributed and/or modified under the conditions
'±' '' 6 % of the LaTeX Project Public License, either version 1.3 of this
'∓' '' 7 % license or (at your option) any later version. The latest version
'⊕' '' 8 % of this license is in http://www.latex-project.org/lppl.txt and
'⊖' '' 9 % version 1.3 or later is part of all distributions of LaTeX version
'⊗' '' 10 % 2003/12/01 or later.
'⊘' '' 11 % This work has the LPPL maintenance status "maintained".
'⊙' '' 12 % Current Maintainer of this work is the TeX4ht Project.
'○' '' 13 %
'∘' '' 14 % If you modify this file, changing the
'∙' '' 15 % version identification would be appreciated.
'≍' '' 16 %
'≡' '' 17 % tex4ht@tug.org
'⊆' '' 18 % https://tug.org/tex4ht
'⊇' '' 19 %
'≤' '' 20
'≥' '' 21
'≼' '' 22
'≽' '' 23
'∼' '' 24
'≈' '' 25
'⊂' '' 26
'⊃' '' 27
'≪' '' 28
'≫' '' 29
'≺' '' 30
'≻' '' 31
'←' '' 32
'→' '' 33
'↑' '' 34
'↓' '' 35
'↔' '' 36
'↗' '' 37
'↘' '' 38
'≃' '' 39
'⇐' '' 40
'⇒' '' 41
'⇑' '' 42
'⇓' '' 43
'⇔' '' 44
'↖' '' 45
'↙' '' 46
'∝' '' 47
'′' '' 48
'∞' '' 49
'∈' '' 50
'∋' '' 51
'△' '' 52
'▽' '' 53
'⁄' '' 54
'↦' '' 55
'∀' '' forall 56
'∃' '' 57
'¬' '' 58
'∅' '' 59
'ℜ' '' 60
'ℑ' '' 61
'⊤' '' 62
'⊥' '' 63
'ℵ' '' 64
'𝒜' '' script A 65
'ℬ' '' script B 66
'𝒞' '' script C 67
'𝒟' '' script D 68
'ℰ' '' script E 69
'ℱ' '' script F 70
'𝒢' '' script G 71
'ℋ' '' script H 72
'ℐ' '' script I 73
'𝒥' '' script J 74
'𝒦' '' script K 75
'ℒ' '' script L 76
'ℳ' '' script M 77
'𝒩' '' script N 78
'𝒪' '' script O 79
'𝒫' '' script P 80
'𝒬' '' script Q 81
'ℛ' '' script R 82
'𝒮' '' script S 83
'𝒯' '' script T 84
'𝒰' '' script U 85
'𝒱' '' script V 86
'𝒲' '' script W 87
'𝒳' '' script X 88
'𝒴' '' script Y 89
'𝒵' '' script Z 90
'∪' '' 91
'∩' '' 92
'⊎' '' 93
'∧' '' 94
'∨' '' 95
'⊢' '' 96
'⊣' '' 97
'⌊' '' 98
'⌋' '' 99
'⌈' '' 100
'⌉' '' 101
'{' '' 102
'}' '' 103
'⟨' '' 104
'⟩' '' 105
'|' '' 106
'∥' '' 107
'↕' '' 108
'⇕' '' 109
'∖' '' 110
'≀' '' 111
'√' '' 112
'∐' '' 113
'∇' '' 114
'∫' '' 115
'⊔' '' 116
'⊓' '' 117
'⊑' '' 118
'⊒' '' 119
'§' '' 120
'†' '' 121
'‡' '' 122
'¶' '' 123
'♣' '' 124
'♢' '' 125
'♡' '' 126
'♠' '' 127
cmsy 0 127
Thanks for the response Michal,
Here is the solution I ultimately went with:
It turned out to be unnecessary to use both the mathjax and mathml options for make4ht, but rather I only needed mathjax. The trick is to not use the tikzcd environment in math mode. In particular, if you replace
\[\begin{tikzcd} U \arrow[r] & V \end{tikzcd}\]
with
\begin{center}\begin{tikzcd} U \arrow[r] & V \end{tikzcd}\end{center}
you get the same pdf output, but now when you run make4ht, mathjax doesn't try to render it, and it gets converted to svg. However using only mathjax makes my macros not work, so I essentially took the advice here to make my macros still work.
Thanks again!
Hi,
I am having an issue with running make4ht with the mathjax,mathml option. It is trying to render mathcal as a png. Here is a minimal not-working example.
I am running the following command:
make4ht test.tex "mathjax,mathml"
Where test.tex consists of
The output html file is
This looks like
You can see that there is an error message
Unknown node type: img
. I'm not too concerned about that, as I have a workaround for it. I am more concerned that$\mathcal{O}$
is being rendered ascmsy10-c-4f.png
, which is not what I want, because it it isn't flexible (I can't use superscripts/subscripts for example). I would prefer if it just used mathjax to render it.I can also run the command without mathml:
make4ht test.tex "mathjax"
which givesBut the issue with this is that the tikz-cd diagram isn't working correctly with mathjax.
So is there a reason mathcal is appearing as a png via mathml instead of being rendered normally by mathjax? Is there a way to fix it?
Thanks so much!