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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Wed Sep 20 14:19:50 CEST 2023


Author: michal_h21
Date: 2023-09-20 12:19:50 +0000 (Wed, 20 Sep 2023)
New Revision: 1371

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-mathml.tex
Log:
Added support for the \mathversion command

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2023-09-17 15:00:53 UTC (rev 1370)
+++ trunk/lit/ChangeLog	2023-09-20 12:19:50 UTC (rev 1371)
@@ -1,3 +1,8 @@
+2023-09-20  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-mathml.tex (mathml.4ht): added support for the \mathvariant
+	command (thanks to Linas Stonys).
+
 2023-09-11  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-html4.tex (html4.4ht): prevent duplicate TOC when the

Modified: trunk/lit/tex4ht-mathml.tex
===================================================================
--- trunk/lit/tex4ht-mathml.tex	2023-09-17 15:00:53 UTC (rev 1370)
+++ trunk/lit/tex4ht-mathml.tex	2023-09-20 12:19:50 UTC (rev 1371)
@@ -1843,8 +1843,33 @@
 
 
 
+Support for the \verb'\mathversion' command. Thanks to Linas Stonys
+for the report and additional testing.
 
+\<configure mathml fontmath\><<<
+|<mathversion config|>
+>>>
 
+We can configure attributes that will be added to the \verb'<math>' element 
+using \verb'\Configure{mathversion-style}' ideally, 
+use something like \verb'mathvariant="xxx"'.
+
+\<mathversion config\><<<
+\NewConfigure{mathversion-style}[2]{\expandafter\gdef\csname :mathversion-#1\endcsname{#2}}
+% ToDo: Add support for other mathversions
+\Configure{mathversion-style}{bold}{\a:mathml mathvariant="bold-italic"}
+>>>
+
+Now we can append code to \verb'\mathversion'. 
+It will add the mathvariant tag to the \verb'<math>' element.
+
+\<mathversion config\><<<
+\append:defI\mathversion{%
+    % \a:DviMathML is executed at the beginning of math \a:@math is hook for attributes. we need to append out tags to it
+    \Configure{DviMathML}{\append:def\a:@math{\expandafter\csname :mathversion-\math at version\endcsname}}{}%
+}
+>>>
+
 \<plain,latex mathml\><<<
 \Configure{afterSUB}{'}{\def\SUB:prime{\SUB:SUP}}
 \Configure{'}



More information about the tex4ht-commits mailing list.