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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Sat Aug 16 15:47:49 CEST 2025


Author: michal_h21
Date: 2025-08-16 13:47:49 +0000 (Sat, 16 Aug 2025)
New Revision: 1729

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-mathml.tex
Log:
added support for new accessibility commands in mathml

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2025-08-14 19:03:26 UTC (rev 1728)
+++ trunk/lit/ChangeLog	2025-08-16 13:47:49 UTC (rev 1729)
@@ -1,3 +1,10 @@
+2025-08-16  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-mathml.tex (mathml.4ht): added support for \MathMLintent
+	and \MathMLarg commands, which should add accessibility support in
+	MathML.
+	Thanks to David Carlisle for the suggestion.
+
 2025-08-14  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-html4.tex (html4.4ht): removed vertical spacing for

Modified: trunk/lit/tex4ht-mathml.tex
===================================================================
--- trunk/lit/tex4ht-mathml.tex	2025-08-14 19:03:26 UTC (rev 1728)
+++ trunk/lit/tex4ht-mathml.tex	2025-08-16 13:47:49 UTC (rev 1729)
@@ -3550,8 +3550,33 @@
 >>>
 
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{Accessibility}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+MathML core specification provides a new way to specify 
+an accessible description of mathematical expressions, using the 
+\Link[https://w3c.github.io/mathml-docs/intent-explainer/]{}{}intent attribute\EndLink.
+\LaTeX{} will provide commands to set the intent attribute for
+mathematical expressions. We can redefine these commands
+to insert the necessary attributes in the MathML output.
 
+\<mathml latex\><<<
+\ifdefined\MathMLintent
+\RenewDocumentCommand{\MathMLintent}{mm}{{%
+  \def\${$}% Fix support for the \$ command
+  \HCode{<mrow intent="#1">}#2\HCode{</mrow>}%
+}}
+\fi
+
+\ifdefined\MathMLarg
+\RenewDocumentCommand\MathMLarg{mm}{%
+  \HCode{<mrow arg="#1">}#2\HCode{</mrow>}%
+}
+\fi
+>>>
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{Limits of Sub- snd Super- Scripts}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the tex4ht-commits mailing list.