From f325bd88d1d4db13f51277bc59c8ff8814e937bc Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 24 Feb 2024 03:01:46 +0000 Subject: CTAN sync 202402240301 --- support/TeX4ht/source/ChangeLog | 21 ++++++++ support/TeX4ht/source/tex4ht-4ht.tex | 82 ++++++++++++++-------------- support/TeX4ht/source/tex4ht-html4.tex | 4 +- support/TeX4ht/source/tex4ht-jats.tex | 94 +++++++++++++++++++++++++++------ support/TeX4ht/source/tex4ht-mathml.tex | 19 ++++--- 5 files changed, 154 insertions(+), 66 deletions(-) (limited to 'support/TeX4ht/source') diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog index 9169988704..62528a3a28 100644 --- a/support/TeX4ht/source/ChangeLog +++ b/support/TeX4ht/source/ChangeLog @@ -1,3 +1,24 @@ +2024-02-22 Michal Hoftich + + * tex4ht-jats.tex (jats.4ht): fixed DOCTYPE. + + * tex4ht-jats.tex (jats.4ht): added support for BibLaTeX. + +2024-02-21 Michal Hoftich + + * tex4ht-jats.tex (jats.4ht): removed \space commands from inside of + the element. It is suppossed to be used after the \TitleMark + command, and to be eaten by \:gobble if section numbers shoulnd't be + shown. + + * tex4ht-4ht.tex (mhchem.4ht): added support for Mhchem characters + in pictures. + + * tex4ht-4ht.tex (mhchem.4ht), + * tex4ht-mathml.tex (mathml.4ht), + * tex4ht-html4.tex (html4.4ht): fixed some issues with Mhchem + superscripts and subscripts. + 2024-02-19 Michal Hoftich <michal.h21@gmail.com> * tex4ht-mathml.tex (mathml.4ht): fixed rendering of 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} diff --git a/support/TeX4ht/source/tex4ht-html4.tex b/support/TeX4ht/source/tex4ht-html4.tex index e09bb507b2..8077218bec 100644 --- a/support/TeX4ht/source/tex4ht-html4.tex +++ b/support/TeX4ht/source/tex4ht-html4.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-html4.tex 1461 2024-02-13 15:20:24Z michal_h21 $ +% $Id: tex4ht-html4.tex 1464 2024-02-21 09:46:01Z michal_h21 $ % Compile 4 times: latex tex4ht-html4 % Copy html4.4ht into the work directory before all but the last compilation. % @@ -21757,13 +21757,13 @@ users redefine the latter macro. %%%%%%%%%%%%%%%%%%%%% \<configure html4 mhchem\><<< -\typeout{***************** hello mhchem} \Configure{mhchemcf}{\HCode{<span class="mhchem">}}{\HCode{</span>}} \Configure{mhchemce}{\HCode{<span class="mhchem">}}{\HCode{</span>}} \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{mhchemsupsub}{\HCode{<span class="mhchem-supsub">}}{\HCode{<br />&\#xfeff;}}{\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>}} diff --git a/support/TeX4ht/source/tex4ht-jats.tex b/support/TeX4ht/source/tex4ht-jats.tex index dc9ae8e5b9..071826a31e 100644 --- a/support/TeX4ht/source/tex4ht-jats.tex +++ b/support/TeX4ht/source/tex4ht-jats.tex @@ -1,8 +1,8 @@ -% $Id: tex4ht-jats.tex 269 2020-03-03 23:06:07Z karl $ +% $Id: tex4ht-jats.tex 1472 2024-02-22 22:12:22Z karl $ % compile 3 times: latex tex4ht-jats % or xhlatex tex4ht-jats "html,3,sections+" % -% Copyright 2009-2022 TeX Users Group +% Copyright 2009-2024 TeX Users Group % Copyright 2000-2009 Eitan M. Gurari % Released under LPPL 1.3c+. % See tex4ht-cpright.tex for license text. @@ -26,7 +26,7 @@ \<jats\><<< % jats.4ht (|version), generated from |jobname.tex -% Copyright 2022 TeX Users Group +% Copyright 2022-2024 TeX Users Group |<TeX4ht copywrite|> >>> @@ -223,7 +223,9 @@ Configurations that are shared only for article and report \NewConfigure{DtdVersion}{1} \Configure{DtdVersion}{1.3} -\Configure{DOCTYPE}{\HCode{<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v\a:DtdVersion\space 20130915//EN" "http://jats.nlm.nih.gov/archiving/\a:DtdVersion/JATS-archivearticle1-mathml3.dtd">\Hnewline}} +\def\:DTD{jats} % this is necessary to prevent html-mml from overriding DOCTYPE +% +\Configure{DOCTYPE}{\HCode{<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v\a:DtdVersion\space 20210610//EN" "JATS-archivearticle1-3.dtd">\Hnewline}} % XML configuratins \edef\html:xmlns{} @@ -587,7 +589,7 @@ This macro is used to print zeropaded days and months in the ISO date attribute \Configure{chapter} {\ifvmode\IgnorePar\fi\EndP\IgnorePar\HCode{<sec>\Hnewline}} {\ifvmode\IgnorePar\fi\EndP\IgnorePar\HCode{</sec>\Hnewline}} - {\TitleMark\HCode{<title>}\space\HtmlParOff} + {\TitleMark\space\HCode{<title>}\HtmlParOff} {\HCode{}\HtmlParOn \ShowPar\par} \ConfigureMark{chapter} @@ -598,7 +600,7 @@ This macro is used to print zeropaded days and months in the ISO date attribute \Configure{appendix} {\ifvmode\IgnorePar\fi\EndP\IgnorePar\HCode{\Hnewline}} {\ifvmode\IgnorePar\fi\EndP\IgnorePar\HCode{\Hnewline}} - {\TitleMark\HCode{}\space\HtmlParOff} + {\TitleMark\space\HCode{<title>}\HtmlParOff} {\HCode{}\HtmlParOn \ShowPar\par} \ConfigureMark{appendix}{\HCode{