[tex4ht-commits] [SCM] tex4ht updated: r1477 - trunk/lit

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Tue Feb 27 17:14:58 CET 2024


Author: michal_h21
Date: 2024-02-27 16:14:58 +0000 (Tue, 27 Feb 2024)
New Revision: 1477

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-html4.tex
   trunk/lit/tex4ht-mathml.tex
Log:
fixed some issues in arrow formatting

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2024-02-27 12:23:50 UTC (rev 1476)
+++ trunk/lit/ChangeLog	2024-02-27 16:14:58 UTC (rev 1477)
@@ -1,5 +1,9 @@
 2024-02-27  Michal Hoftich  <michal.h21 at gmail.com>
 
+	* tex4ht-html4.tex (html4.4ht),
+	* tex4ht-mathml.tex (mathml.4ht): fixed some issues in arrow
+	formatting.
+
 	* tex4ht-4ht.tex (mhchem.4ht): fixed formatting of left and
 	right bond arrows.
 

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2024-02-27 12:23:50 UTC (rev 1476)
+++ trunk/lit/tex4ht-html4.tex	2024-02-27 16:14:58 UTC (rev 1477)
@@ -21769,7 +21769,7 @@
 \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>}}
-\Configure{mhchemarrowyieldsLeft}{\HCode{<span class="mhchem-arrow-normal">&\#x2190;</span>}}
+\Configure{mhchemarrowyieldsLeft}{\HCode{<span class="mhchem-arrow-normal">&\#x27F5;</span>}}
 \Configure{mhchemarrowyieldsLeftRight}{\HCode{<span class="mhchem-arrow-normal">&\#x21c4;</span>}}  % todo: improve
 \Configure{mhchemarrowmesomerism}{\HCode{<span class="mhchem-arrow-normal">&\#x2194;</span>}}  % todo: improve
 \Configure{mhchemarrowequilibrium}{\HCode{<span class="mhchem-arrow-normal">&\#x21cc;</span>}}  % todo: improve

Modified: trunk/lit/tex4ht-mathml.tex
===================================================================
--- trunk/lit/tex4ht-mathml.tex	2024-02-27 12:23:50 UTC (rev 1476)
+++ trunk/lit/tex4ht-mathml.tex	2024-02-27 16:14:58 UTC (rev 1477)
@@ -5539,24 +5539,29 @@
 
 
 % 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{mhchemoperator}{<\:mhmathmlorhtml{mo \a:mathml stretchy="false" }{span} class="mhchem-operator">}{</\:mhmathmlorhtml{mo}{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
+\Configure{mhchemarrowyields}{\ensuremath{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x27F6;\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}}}
+\Configure{mhchemarrowyieldsLeft}{\ensuremath{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x27F5;\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}}}
+\Configure{mhchemarrowyieldsLeftRight}{\ensuremath{\HCode{<\a:mathml munder class="mhchem-arrow-larger"><\a:mathml mrow><\a:mathml mpadded height="0" depth="0.3em"><\a:mathml mo  stretchy="false" >&\#x27F5;</\a:mathml mo></\a:mathml mpadded></\a:mathml mrow>
+  <\a:mathml mrow><\a:mathml mpadded depth="0" height="0"><\a:mathml mo stretchy="false">&\#x27F6;</\a:mathml mo></\a:mathml mpadded></\a:mathml mrow></\a:mathml munder>}
+}} 
 \Configure{mhchemarrowmesomerism}{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x2194;\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}}  % todo: improve
-\Configure{mhchemarrowequilibrium}{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x21cc;\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}}  % todo: improve
+% \Configure{mhchemarrowequilibrium}{\ensuremath{\HCode{<\:mhmathmlorhtml{mrow}{span} class="mhchem-arrow-normal">\:mhonlyinmathml{\a:mhchemoperator}&\#x21cc;\:mhonlyinmathml{\b:mhchemoperator}</\:mhmathmlorhtml{mrow}{span}>}}}  % todo: improve
+\Configure{mhchemarrowequilibrium}{\ensuremath{\HCode{<\a:mathml munder class="mhchem-arrow-larger"><\a:mathml mrow><\a:mathml mpadded  height="0" depth="0" voffset="-0.1em" ><\a:mathml mo  stretchy="true" >&\#x21c0;</\a:mathml mo></\a:mathml mpadded></\a:mathml mrow>
+  <\a:mathml mpadded height="0" depth="0" ><\a:mathml mo stretchy="false">&\#x21bd;</\a:mathml mo></\a:mathml mpadded></\a:mathml munder>}
+}}  % todo: improve
 % 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 <mpadded> 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}
 {\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 mo></\a:mathml mpadded></\a:mathml mrow>
-  <\a:mathml mpadded height="0" depth="1" voffset="2px"><mspace width="0.167em"></mspace><\a:mathml mo stretchy="false">&\#x21bd;</\a:mathml mo><mspace width="0.167em"></mspace></\a:mathml mpadded></\a:mathml munder>}
+  <\a:mathml mpadded height="0" depth="1" voffset="2px"><\a:mathml mspace width="0.167em"></\a:mathml mspace><\a:mathml mo stretchy="false">&\#x21bd;</\a:mathml mo><\a:mathml mspace width="0.167em"></\a:mathml mspace></\a:mathml mpadded></\a:mathml munder>}
 }}  % todo: improve
 \Configure{mhchemarrowequilibriumLeft}
-{\ensuremath{\HCode{<\a:mathml munder class="mhchem-arrow-larger"><\a:mathml mrow><\a:mathml mpadded  height="0" depth="1" voffset="4px"><mspace width="0.167em"></mspace><\a:mathml mo stretchy="false">&\#x21c0;</\a:mathml mo><mspace width="0.167em"></mspace></\a:mathml mpadded></\a:mathml mrow>
+{\ensuremath{\HCode{<\a:mathml munder class="mhchem-arrow-larger"><\a:mathml mrow><\a:mathml mpadded  height="0" depth="1" voffset="4px"><\a:mathml mspace width="0.167em"></\a:mathml mspace><\a:mathml mo stretchy="false">&\#x21c0;</\a:mathml mo><\a:mathml mspace width="0.167em"></\a:mathml mspace></\a:mathml mpadded></\a:mathml mrow>
   <\a:mathml mpadded  height="0" depth="1" voffset="2px"><\a:mathml mo  stretchy="true" >&\#x21bd;</\a:mathml mo></\a:mathml mpadded></\a:mathml munder>}
 }}  % todo: improve
 



More information about the tex4ht-commits mailing list.