diff options
Diffstat (limited to 'support/TeX4ht/source/tex4ht-4ht.tex')
-rw-r--r-- | support/TeX4ht/source/tex4ht-4ht.tex | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex index b48cac55f5..13c70fc3d2 100644 --- a/support/TeX4ht/source/tex4ht-4ht.tex +++ b/support/TeX4ht/source/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1461 2024-02-13 15:20:24Z michal_h21 $ +% $Id: tex4ht-4ht.tex 1465 2024-02-21 13:48:35Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2024 TeX Users Group @@ -30838,6 +30838,8 @@ it come out as a complete mess. \NewConfigure{mhchemsup}{2} +\NewConfigure{mhchemsupsub}{3} + \cs_set_protected:Npn \__mhchem_output_coreFivefourht:nnnnnnn #1#2#3#4#5#6#7 { \bool_if:nT @@ -30872,11 +30874,11 @@ it come out as a complete mess. \b:mhchemsup } { - \HCode { <span~class="mhchem-supsub"> } + \a:mhchemsupsub \__mhchem_output_withFont:n { #4#5#7 } - \HCode { <br~/>&\#xfeff; } + \c:mhchemsupsub \__mhchem_output_withFont:n { #6 } - \HCode { </span> } + \b:mhchemsupsub } } } @@ -30905,58 +30907,56 @@ it come out as a complete mess. % replace original coreFive with our alternative version. it will work in picture math \HLet\__mhchem_output_coreFive:nnnnnnn\__mhchem_output_coreFivefourht:nnnnnnn -\cs_set_protected:Npn \__mhchem_output_withFont:n #1 %. output #1 as math or text +\cs_set_protected:Npn \__mhchem_output_withFontfourht:n #1 %. output #1 as math or text { \bool_if:NTF \l__mhchem_output_isMathMode_bool { \begingroup\mathrm {#1}\endgroup } { \begingroup\text {#1}\endgroup } } +\HLet\__mhchem_output_withFont:n\__mhchem_output_withFontfourht:n + \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 -\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: - { \HCode {\a:mhchemoperator + \b:mhchemoperator }} -\cs_set_protected:Npn \__mhchem_output_operatorMinus: - { \HCode {\a:mhchemoperator&\#x2212; \b:mhchemoperator }} % minus -\cs_set_protected:Npn \__mhchem_output_operatorEquals: - { \HCode {\a:mhchemoperator = \b:mhchemoperator }} -\cs_set_protected:Npn \__mhchem_output_operatorPlusMinus: - {\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: { \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}} +\def\:tempa#1#2{% + \cs_set_protected:Npn\:tempb:{#2}% + \HLet#1\:tempb:% +} + +\:tempa \__mhchem_output_skipAfterAmount: {\HCode { ~ } } % space for copy & paste +\:tempa \__mhchem_output_skipBeforeStateOfAggregation: {} +\:tempa \__mhchem_output_minus: {\HCode{&\#x2212;}} % minus +\:tempa \__mhchem_output_operatorPlus:{ \HCode {\a:mhchemoperator + \b:mhchemoperator }} +\:tempa \__mhchem_output_operatorMinus:{ \HCode {\a:mhchemoperator&\#x2212; \b:mhchemoperator }} % minus +\:tempa \__mhchem_output_operatorEquals:{ \HCode {\a:mhchemoperator = \b:mhchemoperator }} +\:tempa \__mhchem_output_operatorPlusMinus:{\HCode {\a:mhchemoperator &\#xB1; \b:mhchemoperator }} % plusmn +\:tempa \__mhchem_output_electronDot: { \HCode {&\#x2022;} } % bull +\:tempa \__mhchem_output_additionCompound: { \HCode {&\#xB7;} } % middot +\:tempa \__mhchem_output_excited: { \HCode { &\#x2731; } } +\:tempa \__mhchem_output_commaDecimal: { , } +\:tempa \__mhchem_output_commaEnumeration: {,\HCode {&\#x2009;} } % thinsp +\:tempa \__mhchem_output_commaEnumerationSmall: {,\HCode{&\#x2009;} } % thinsp + +\:tempa \__mhchem_output_bond_single: { \HCode { \a:mhchemoperator&\#x2212;\b:mhchemoperator}} +\:tempa \__mhchem_output_bond_double: { \HCode { \a:mhchemoperator=\b:mhchemoperator}} +\:tempa \__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} -\cs_set_protected:Npn \__mhchem_output_bond_oneAndHalf: % todo: improve - {\a:mhchembondoneandhalf} -\cs_set_protected:Npn \__mhchem_output_bond_twoAndHalf: % todo: improve - {\a:mhchembondtwoandhalf} -\cs_set_protected:Npn \__mhchem_output_bond_twoAndHalff: % todo: improve - {\a:mhchembondtwoandhalff} +\:tempa \__mhchem_output_bond_half:{\a:mhchembondhalf} +\:tempa \__mhchem_output_bond_oneAndHalf:{\a:mhchembondoneandhalf} +\:tempa \__mhchem_output_bond_twoAndHalf:{\a:mhchembondtwoandhalf} +\:tempa \__mhchem_output_bond_twoAndHalff:{\a:mhchembondtwoandhalff} + +\:tempa \__mhchem_output_bond_dotdotdot: { \HCode { &\#xB7;&\#xB7;&\#xB7;} } % ··· +\:tempa \__mhchem_output_bond_dotdotdotdot: { \HCode { &\#xB7;&\#xB7;&\#xB7;&\#xB7;} } % ···· +\:tempa \__mhchem_output_bond_rightArrow: { \HCode { &\#xffeb; } } +\:tempa \__mhchem_output_bond_leftArrow: { \HCode { &\#xffe9; } } + \NewConfigure{mhchembondhalf}{1} \NewConfigure{mhchembondoneandhalf}{1} \NewConfigure{mhchembondtwoandhalf}{1} \NewConfigure{mhchembondtwoandhalff}{1} -\cs_set_protected:Npn \__mhchem_output_bond_dotdotdot: { \HCode { &\#xB7;&\#xB7;&\#xB7;} } % ··· -\cs_set_protected:Npn \__mhchem_output_bond_dotdotdotdot: { \HCode { &\#xB7;&\#xB7;&\#xB7;&\#xB7;} } % ···· -\cs_set_protected:Npn \__mhchem_output_bond_rightArrow: { \HCode { &\#xffeb; } } -\cs_set_protected:Npn \__mhchem_output_bond_leftArrow: { \HCode { &\#xffe9; } } - \NewConfigure{mhchemarrow}{2} |