From 2f56d3421e4663856409792eb5b08a2c57b38a8c Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 21 Feb 2024 03:01:35 +0000 Subject: CTAN sync 202402210301 --- support/TeX4ht/source/ChangeLog | 5 +++++ support/TeX4ht/source/tex4ht-mathml.tex | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) (limited to 'support') diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index 234d8cce80..9169988704 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,8 @@ +2024-02-19 Michal Hoftich + + * tex4ht-mathml.tex (mathml.4ht): fixed rendering of + mhchemarrowequilibriumLeft and mhchemarrowequilibriumRight. + 2024-02-15 Michal Hoftich * tex4ht-fonts-noncjk.tex ( diff --git a/support/TeX4ht/source/tex4ht-mathml.tex b/support/TeX4ht/source/tex4ht-mathml.tex index 2cbd51fe5a..74132b6ac0 100644 --- a/support/TeX4ht/source/tex4ht-mathml.tex +++ b/support/TeX4ht/source/tex4ht-mathml.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-mathml.tex 1459 2024-02-07 13:33:10Z michal_h21 $$ +% $Id: tex4ht-mathml.tex 1463 2024-02-19 13:33:57Z michal_h21 $$ % compile 3 times: latex tex4ht-mathltx % or xhlatex tex4ht-mathltx "html,3,sections+" % @@ -5545,16 +5545,18 @@ with small shifting. \Configure{mhchemarrowyieldsLeftRight}{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x21c4;\:mhonlyinmathml{\b:mhchemoperator}}} % todo: improve \Configure{mhchemarrowmesomerism}{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x2194;\:mhonlyinmathml{\b:mhchemoperator}}} % todo: improve \Configure{mhchemarrowequilibrium}{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x21cc;\:mhonlyinmathml{\b:mhchemoperator}}} % todo: improve -% this configuration leads to two arrows next to each other. but I cannot a -% better configuration right now. this symbol doesn't have Unicode support +% this configuration is inspired by the MathML code from MathJax. There is a problem with vertical positioning of arrows, so we need to use +% the element to fix that. It is still not perfect, moreover, there is a difference in rendering between +% vanilla Firefox and MathJax's MathML \Configure{mhchemarrowequilibriumRight} -{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-larger">\:mhonlyinmathml{\a:mhchemoperator}&\#x21c0;\:mhonlyinmathml{\b:mhchemoperator} -<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-complement">\:mhonlyinmathml{\a:mhchemoperator}&\#x21bd;\:mhonlyinmathml{\b:mhchemoperator}} -} % todo: improve +{\ensuremath{\HCode{<\a:mathml munder class="mhchem-arrow-larger"><\a:mathml mrow><\a:mathml mpadded height="0" depth="1" voffset="3px"><\a:mathml mo stretchy="true" >&\#x21c0; + <\a:mathml mpadded height="0" depth="1" voffset="2px"><\a:mathml mo stretchy="false">&\#x21bd;} +}} % todo: improve \Configure{mhchemarrowequilibriumLeft} -{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-complement">\:mhonlyinmathml{\a:mhchemoperator}&\#x21c0;\:mhonlyinmathml{\b:mhchemoperator} -<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-larger">\:mhonlyinmathml{\a:mhchemoperator}&\#x21bd;\:mhonlyinmathml{\b:mhchemoperator}} -} % todo: improve +{\ensuremath{\HCode{<\a:mathml munder class="mhchem-arrow-larger"><\a:mathml mrow><\a:mathml mpadded height="0" depth="1" voffset="4px"><\a:mathml mo stretchy="false">&\#x21c0; + <\a:mathml mpadded height="0" depth="1" voffset="2px"><\a:mathml mo stretchy="true" >&\#x21bd;} +}} % todo: improve + % this is not the right symbol % \Configure{mhchemarrowequilibriumRight}{\a:mhchemoperator\HCode{&\#x2942;}\b:mhchemoperator } % todo: improve % \Configure{mhchemarrowequilibriumLeft}{\a:mhchemoperator\HCode{&\#x2943;}\b:mhchemoperator} % todo: improve -- cgit v1.2.3