diff options
author | Norbert Preining <norbert@preining.info> | 2024-02-09 03:00:44 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-02-09 03:00:44 +0000 |
commit | fa4b456400bb2b415dcbbfe785542c50e9dd61e3 (patch) | |
tree | 61bb8ad8f9071ab1f33a17b7bc28dc74fd010b3c /support | |
parent | baa694429155689a0e8bba804206961689e0a606 (diff) |
CTAN sync 202402090300
Diffstat (limited to 'support')
-rw-r--r-- | support/TeX4ht/source/ChangeLog | 7 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-4ht.tex | 29 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-html4.tex | 5 | ||||
-rw-r--r-- | support/TeX4ht/source/tex4ht-mathml.tex | 9 |
4 files changed, 30 insertions, 20 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index 1809a81346..adb567263a 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,10 @@ +2024-02-07 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-4ht.tex (mhchem.4ht), + * tex4ht-mathml.tex (mathml.4ht), + * tex4ht-html4.tex (html4.4ht): fixed more Mhchem formatting errors. + https://tex.stackexchange.com/q/654236/2891 + 2024-02-06 Michal Hoftich <michal.h21@gmail.com> * tex4ht-4ht.tex (mathtools-hooks.4ht): prevent multiple loading of diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex index 14ee0a16e9..d18a1123c8 100644 --- a/support/TeX4ht/source/tex4ht-4ht.tex +++ b/support/TeX4ht/source/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1458 2024-02-06 16:07:33Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1459 2024-02-07 13:33:10Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2024 TeX Users Group @@ -30914,29 +30914,30 @@ it come out as a complete mess. \NewConfigure{mhchemoperator}{2} -% ideally, the following commands should be redefined using \HLet, to support picture math. -% the current definition should work in MathML, I am not sure about normall HTML, as +% ideally, the following commands should be redefined using \HLet, to support picture math. +% the current definition should work in MathML, I am not sure about normall HTML, as \cs_set_protected:Npn \__mhchem_output_skipAfterAmount: {\HCode { ~ } } % space for copy & paste \cs_set_protected:Npn \__mhchem_output_skipBeforeStateOfAggregation: {} \cs_set_protected:Npn \__mhchem_output_minus: {\HCode{&\#x2212;}} % minus \cs_set_protected:Npn \__mhchem_output_operatorPlus: - { \a:mhchemoperator + \b:mhchemoperator } + { \HCode {\a:mhchemoperator + \b:mhchemoperator }} \cs_set_protected:Npn \__mhchem_output_operatorMinus: - { \a:mhchemoperator\HCode {&\#x2212;} \b:mhchemoperator } % minus + { \HCode {\a:mhchemoperator&\#x2212; \b:mhchemoperator }} % minus \cs_set_protected:Npn \__mhchem_output_operatorEquals: - { \a:mhchemoperator = \b:mhchemoperator } + { \HCode {\a:mhchemoperator = \b:mhchemoperator }} \cs_set_protected:Npn \__mhchem_output_operatorPlusMinus: - {\a:mhchemoperator \HCode {&\#xB1;} \b:mhchemoperator } % plusmn - \cs_set_protected:Npn \__mhchem_output_electronDot: { \HCode {&\#x2022;} } % bull - \cs_set_protected:Npn \__mhchem_output_additionCompound: { \HCode {&\#xB7;} } % middot + {\HCode {\a:mhchemoperator &\#xB1; \b:mhchemoperator }} % plusmn +\cs_set_protected:Npn \__mhchem_output_electronDot: { \HCode {&\#x2022;} } % bull +\cs_set_protected:Npn \__mhchem_output_additionCompound: { \HCode {&\#xB7;} } % middot \cs_set_protected:Npn \__mhchem_output_excited: { \HCode { &\#x2731; } } \cs_set_protected:Npn \__mhchem_output_commaDecimal: { , } \cs_set_protected:Npn \__mhchem_output_commaEnumeration: {,\HCode {&\#x2009;} } % thinsp -\cs_set_protected:Npn \__mhchem_output_commaEnumerationSmall: {,\HCode{&\#x2009;} } % thinsp - -\cs_set_protected:Npn \__mhchem_output_bond_single: { \a:mhchemoperator{\HCode { &\#x2212; }}\b:mhchemoperator} -\cs_set_protected:Npn \__mhchem_output_bond_double: { \a:mhchemoperator{\HCode { =}}\b:mhchemoperator} -\cs_set_protected:Npn \__mhchem_output_bond_triple: { \a:mhchemoperator{\HCode { &\#x2261;}}\b:mhchemoperator} +\cs_set_protected:Npn \__mhchem_output_commaEnumerationSmall: {,\HCode{&\#x2009;} } % thinsp + +\cs_set_protected:Npn \__mhchem_output_bond_single: { \HCode { \a:mhchemoperator&\#x2212;\b:mhchemoperator}} +\cs_set_protected:Npn \__mhchem_output_bond_double: { \HCode { \a:mhchemoperator=\b:mhchemoperator}} +\cs_set_protected:Npn \__mhchem_output_bond_triple: { \HCode { \a:mhchemoperator&\#x2261;\b:mhchemoperator}} + % todo: add MathML support for these \cs_set_protected:Npn \__mhchem_output_bond_half: % todo: improve {\a:mhchembondhalf} diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex index 38ac28f4d8..b11bd85bd8 100644 --- a/support/TeX4ht/source/tex4ht-html4.tex +++ b/support/TeX4ht/source/tex4ht-html4.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-html4.tex 1457 2024-01-30 20:48:28Z michal_h21 $ +% $Id: tex4ht-html4.tex 1459 2024-02-07 13:33:10Z michal_h21 $ % Compile 4 times: latex tex4ht-html4 % Copy html4.4ht into the work directory before all but the last compilation. % @@ -21764,7 +21764,8 @@ users redefine the latter macro. \Configure{mhchemisotope}{\HCode{<span class="mhchem-isotope">}}{\HCode{<br />&\#xfeff;}}{\HCode{</span>}} \Configure{mhchemsub}{\HCode {<sub class="mhchem-sub">}}{\HCode{</sub>} } \Configure{mhchemsup}{\HCode {<sup class="mhchem-sup">}}{\HCode{</sup>} } -\Configure{mhchemoperator}{\HCode {<span class="mhchem-operator">}}{\HCode {</span>}} +% mhchemoperator is always used inside \HCode, so we need not to use \HCode in it's configuration +\Configure{mhchemoperator}{<span class="mhchem-operator">}{</span>} \Configure{mhchemarrow}{\HCode {<span class="mhchem-arrow">}}{\HCode{</span>}} \Configure{mhchemarrowabove}{\HCode {<span class="mhchem-above">}}{\HCode{</span>}} \Configure{mhchemarrowyields}{\HCode{<span class="mhchem-arrow-normal">&\#x27F6;</span>}} diff --git a/support/TeX4ht/source/tex4ht-mathml.tex b/support/TeX4ht/source/tex4ht-mathml.tex index acdc463ecb..2cbd51fe5a 100644 --- a/support/TeX4ht/source/tex4ht-mathml.tex +++ b/support/TeX4ht/source/tex4ht-mathml.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-mathml.tex 1456 2024-01-30 16:31:58Z michal_h21 $$ +% $Id: tex4ht-mathml.tex 1459 2024-02-07 13:33:10Z michal_h21 $$ % compile 3 times: latex tex4ht-mathltx % or xhlatex tex4ht-mathltx "html,3,sections+" % @@ -5535,10 +5535,11 @@ with small shifting. \HCode{<sup>}}% }{\:mhmathmlorhtml{\Tg</\a:mathml mrow>\TG</\a:mathml msup\Hnewline>}{\HCode{</sup>}}} -\Configure{mhchemoperator}{\HCode{<\:mhmathmlorhtml{mo}{span} class="mhchem-operator">}\PauseMathClass}{\EndPauseMathClass\HCode {</\:mhmathmlorhtml{mo}{span}>}} +% mhchemoperator is always used inside \HCode, so we need not to use \HCode in it's configuration +\Configure{mhchemoperator}{<\:mhmathmlorhtml{mo}{span} class="mhchem-operator">}{</\:mhmathmlorhtml{mo}{span}>} -\Configure{mhchemarrow}{\HCode {<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow">\:mhonlyinmathml{\a:mhchemoperator}}}{\HCode{\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}} -\Configure{mhchemarrowabove}{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-above">\:mhonlyinmathml{\a:mhchemoperator}}}{\HCode{\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}} +\Configure{mhchemarrow}{\HCode {<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow">\:mhonlyinmathml{\a:mhchemoperator}}\PauseMathClass}{\EndPauseMathClass\HCode{\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}} +\Configure{mhchemarrowabove}{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-above">\:mhonlyinmathml{\a:mhchemoperator}}\PauseMathClass}{\EndPauseMathClass\HCode{\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}} \Configure{mhchemarrowyields}{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x2192;\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}} \Configure{mhchemarrowyieldsLeft}{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x2190;\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>} } \Configure{mhchemarrowyieldsLeftRight}{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x21c4;\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}} % todo: improve |