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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Fri Jul 8 14:39:32 CEST 2022


Author: michal_h21
Date: 2022-07-08 12:39:32 +0000 (Fri, 08 Jul 2022)
New Revision: 1174

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-jats.tex
Log:
resolve basic font commands clash with MathML

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-07-07 13:29:07 UTC (rev 1173)
+++ trunk/lit/ChangeLog	2022-07-08 12:39:32 UTC (rev 1174)
@@ -1,3 +1,8 @@
+2022-07-08  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-jats.tex (jats.4ht): overwrite MathML redefinitions for
+	basic font commands configurations.
+
 2022-07-07  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-fonts-mnsymbol.tex: added support for the MnSymbol fonts.

Modified: trunk/lit/tex4ht-jats.tex
===================================================================
--- trunk/lit/tex4ht-jats.tex	2022-07-07 13:29:07 UTC (rev 1173)
+++ trunk/lit/tex4ht-jats.tex	2022-07-08 12:39:32 UTC (rev 1174)
@@ -73,8 +73,14 @@
 
 \<configure jats latex\><<<
 |<latex fonts|>
+% We must override MathML's version of basic font commands.
+\AtBeginDocument{%
+|<mathml fonts|>
+}
 >>>
 
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{Classes}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -453,22 +459,6 @@
 >>>
 
 \<latex fonts\><<<
-\Configure{textit}{\Protect\HCode{<italic>}\NoFonts}{\EndNoFonts\Protect\Tg</italic>}
-\Configure{textbf}{\Protect\HCode{<bold>}\NoFonts}{\EndNoFonts\Protect\Tg</bold>}
-\Configure{textsc}{\Protect\HCode{<sc>}\NoFonts}{\EndNoFonts\Protect\Tg</sc>}
-\Configure{textrm}{\Protect\HCode{<roman>}\NoFonts}
-                    {\EndNoFonts\Protect\HCode{</roman>}}
-\Configure{textup}{\Protect\HCode{<span class="textup">}\NoFonts}
-                    {\EndNoFonts\Protect\HCode{</span>}}  
-\Configure{textsf}{\Protect\HCode{<sans-serif>}\NoFonts}
-                    {\EndNoFonts\Protect\HCode{</sans-serif>}}  
-\Configure{textsl}{\Protect\HCode{<italic>}\NoFonts}
-                    {\EndNoFonts\Protect\HCode{</italic>}}
-\Configure{texttt}{\Protect\HCode{<monospace>}\NoFonts}
-                    {\EndNoFonts\Protect\HCode{</monospace>}}
-\Configure{emph}{\Protect\HCode{<italic>}\NoFonts}
-                    {\EndNoFonts\Protect\HCode{</italic>}}
-
 \Configure{underline}
    {\HCode{<underline>}\:gobble}
    {\HCode{</underline>}}
@@ -482,7 +472,48 @@
   {\HCode{</sub>}}
 >>>
 
+The basic font commands are redefined in mathml.4ht, so we need to redefine them again 
 
+\<mathml fonts\><<<
+\Configure{texttt}
+   {\ifmathml\providemtextclass{\mml:class="texttt"
+         mathvariant="monospace" }\else\Protect\HCode{<monospace>}\NoFonts\fi}
+   {\ifmathml\else\EndNoFonts\Protect\HCode{</monospace>}\fi}%
+\Configure{textit}
+   {\ifmathml \providemtextclass{\mml:class="textit"
+         mathvariant="italic" }\else\Protect\HCode{<italic>}\NoFonts\fi}
+   {\ifmathml\else\EndNoFonts\Protect\HCode{</italic>}\fi}%
+\Configure{textrm}
+   {\ifmathml \providemtextclass{\mml:class="textrm"
+         mathvariant="normal" }\else\Protect\HCode{<roman>}\NoFonts\fi}
+   {\ifmathml\else\EndNoFonts\Protect\HCode{</roman>}\fi}%
+\Configure{textup}
+   {\ifmathml \providemtextclass{\mml:class="textup"
+         mathvariant="normal" }\else\Protect\HCode{<roman>}\NoFonts\fi}
+   {\ifmathml\else\EndNoFonts\Protect\HCode{</roman>}\fi}%
+\Configure{textsl}
+   {\ifmathml \providemtextclass{\mml:class="textsl"
+         mathvariant="italic" }\else\Protect\HCode{<italic>}\NoFonts\fi}
+   {\ifmathml\else\EndNoFonts\Protect\HCode{</italic>}\fi}%
+\Configure{textsf}
+   {\ifmathml \providemtextclass{\mml:class="textsf"
+         mathvariant="sans-serif" }\else\Protect\HCode{<sans-serif>}\NoFonts\fi}
+   {\ifmathml\else\EndNoFonts\Protect\HCode{</sans-serif>}\fi}%
+\Configure{textbf}
+   {\ifmathml \providemtextclass{\mml:class="textbf"
+         mathvariant="bold" }\else\Protect\HCode{<bold>}\NoFonts\fi}
+   {\ifmathml\else\EndNoFonts\Protect\HCode{</bold>}\fi}%
+\Configure{textsc}
+   {\ifmathml \providemtextclass{\mml:class="textsc"
+         mathvariant="normal" }\else\Protect\HCode{<sc>}\NoFonts\fi}
+   {\ifmathml\else\EndNoFonts\Protect\HCode{</sc>}\fi}%
+\Configure{emph}
+   {\ifmathml \providemtextclass{\mml:class="emph"
+         mathvariant="italic" }\else\Protect\HCode{<italic>}\NoFonts\fi}
+   {\ifmathml\else\EndNoFonts\Protect\HCode{</italic>}\fi}%
+>>>
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Document structure}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the tex4ht-commits mailing list.