Closed danielezambelli closed 9 months ago
Hi Danielle, it seems to be caused by the physics
package. I will take a look at it later, but both issues go away when I remove it. It seems that it redefines lot of math commands in a way which doesn't work with TeX4ht.
It seems this file, physics.4ht
should fix it:
\DeclareDocumentCommand\argopen{s}{} % Special open grouping for argument of a function
\DeclareDocumentCommand\argclose{s}{} % Special close grouping for argument of a function
\Hinput{physics}
\endinput
Regarding the \div
command, it seems that physics
redefines it to this symbol. I get the same result even in the PDF output. The original symbol is available as \divisionsymbol
.
I removed the "physics" package from my project.
Thank you.
The fix didn't help?
The fix works for sin(...) and cos(...) then I had other problems with tan(...) and preferred to directly implement the two commands I needed (\dd and \dx) without loading the whole package.
I do not know too much about LaTeX, and sometimes I find solutions that are not the best.
In general, I think it is better to not load too many packages, as it increases the compilation time significantly, and it also can lead to clashes between command definitions. So it is best if you were able to create custom commands that work for you.
Hi Michal, I have found some errors when compiling in MATHML that do not appear when compiling in pdf or MATHJAX.
The compile command is:
make4ht sincosdiv.tex -f html5-common_domfilters -c ml_make4ht -l -u -s -d ./html/mathml "mathml, 3, sec-filename, fn-in, blind"
The problem arises when the macro \sin (or \cos) is followed by a parenthesis.
Second problem is the \div symbol is rendered differently when I compile in MATHML.
P.S. I do not understand these warnings and how to fix them.
[WARNING] tocid: char-def module not found [WARNING] tocid: cannot fix section id's
The source:
Thank you for your attention.
Daniele