[tex4ht-commits] [SCM] tex4ht updated: r1119 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Tue Apr 26 17:53:46 CEST 2022
Author: michal_h21
Date: 2022-04-26 15:53:45 +0000 (Tue, 26 Apr 2022)
New Revision: 1119
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-4ht.tex
trunk/lit/tex4ht-html4.tex
trunk/lit/tex4ht-mathml.tex
Log:
fixed support for the ulem package
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2022-04-26 08:20:14 UTC (rev 1118)
+++ trunk/lit/ChangeLog 2022-04-26 15:53:45 UTC (rev 1119)
@@ -1,5 +1,11 @@
2022-04-26 Michal Hoftich <michal.h21 at gmail.com>
+ * tex4ht-4ht.tex (ulem.4ht),
+ * tex4ht-html4.tex (html4.4ht),
+ * tex4ht-mathml.tex (mathml.4ht): fixed support for the Ulem
+ package.
+ https://github.com/michal-h21/make4ht/issues/72
+
* tex4ht-4ht.tex (xr.4ht, xr-hooks.4ht): added support for external
documents in subdirectories.
https://puszcza.gnu.org.ua/bugs/?560
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2022-04-26 08:20:14 UTC (rev 1118)
+++ trunk/lit/tex4ht-4ht.tex 2022-04-26 15:53:45 UTC (rev 1119)
@@ -30878,21 +30878,49 @@
\endinput
>>> \AddFile{9}{ulem}
+We use different configurations, depending on the fact if we are inside math mode or not.
+Configurations in math mode are named after the command with the "-math" suffix.
+
\<ulem sty\><<<
-\expandafter\def\csname uline \endcsname{\relax
- \ifmmode\expandafter\underline
- \else \a:uline \bgroup \aftergroup\b:uline \expandafter\ULset\fi}
+\def\:ulemchoose#1#2{\relax\ifmmode\csname a:#1-math\endcsname#2\csname b:#1-math\endcsname\else\csname a:#1\endcsname#2\csname b:#1\endcsname\fi}
+
\NewConfigure{uline}{2}
-\def\uuline#1{\relax \a:uuline {#1}\b:uuline}
+\NewConfigure{uline-math}{2}
+\def\:tempa#1{\:ulemchoose{uline}{#1}}
+\HLet\uline\:tempa
+
\NewConfigure{uuline}{2}
-\def\sout#1{\relax \a:sout {#1}\b:sout}
+\NewConfigure{uuline-math}{2}
+\def\:tempa#1{\:ulemchoose{uuline}{#1}}
+\HLet\uuline\:tempa
+
\NewConfigure{sout}{2}
-\def\xout#1{\relax \a:xout {#1}\b:xout}
+\NewConfigure{sout-math}{2}
+\def\:tempa#1{\:ulemchoose{sout}{#1}}
+\HLet\sout\:tempa
+
\NewConfigure{xout}{2}
-\def\uwave#1{\relax \a:uwave {#1}\b:uwave}
+\NewConfigure{xout-math}{2}
+\def\:tempa#1{\:ulemchoose{xout}{#1}}
+\HLet\xout\:tempa
+
\NewConfigure{uwave}{2}
+\NewConfigure{uwave-math}{2}
+\def\:tempa#1{\:ulemchoose{uwave}{#1}}
+\HLet\uwave\:tempa
+
+\NewConfigure{dashuline}{2}
+\NewConfigure{dashuline-math}{2}
+\def\:tempa#1{\:ulemchoose{dashuline}{#1}}
+\HLet\dashuline\:tempa
+
+\NewConfigure{dotuline}{2}
+\NewConfigure{dotuline-math}{2}
+\def\:tempa#1{\:ulemchoose{dotuline}{#1}}
+\HLet\dotuline\:tempa
+
\def\:temp{\z@}
-\HLet\ULthickness|=\:temp
+\HLet\ULthickness\:temp
>>>
%%%%%%%%%%%%%%%%%%%
Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex 2022-04-26 08:20:14 UTC (rev 1118)
+++ trunk/lit/tex4ht-html4.tex 2022-04-26 15:53:45 UTC (rev 1119)
@@ -22054,22 +22054,48 @@
\<configure html4 ulem\><<<
\Configure{uline}
- {\HCode{<span class="uline">}} {\HCode{</span>}}
-\Css{.uline{ text-decoration:underline; }}
+ {\HCode{<span class="uline">}\NoFonts} {\EndNoFonts\HCode{</span>}}
+\Configure{uline-math}
+ {\HCode{<span class="uline">}\NoFonts} {\EndNoFonts\HCode{</span>}}
+\Css{.uline,.uline-math{ text-decoration:underline; }}
\Configure{uuline}
- {\HCode{<span class="uuline">}} {\HCode{</span>}}
-\Css{.uuline{ text-decoration:underline; }}
+ {\HCode{<span class="uuline">}\NoFonts} {\EndNoFonts\HCode{</span>}}
+\Configure{uuline-math}
+ {\HCode{<span class="uuline">}\NoFonts} {\EndNoFonts\HCode{</span>}}
+\Css{.uuline,.uuline-math{ text-decoration:underline double; }}
\Configure{sout}
- {\HCode{<span class="sout">}} {\HCode{</span>}}
-\Css{span.sout {text-decoration: line-through }}
+ {\HCode{<span class="sout">}\NoFonts} {\EndNoFonts\HCode{</span>}}
+\Configure{sout-math}
+ {\HCode{<span class="sout">}\NoFonts} {\EndNoFonts\HCode{</span>}}
+\Css{span.sout, .sout-math {text-decoration: line-through }}
\Configure{xout}
- {\HCode{<span class="xout"><span class="underline">}}
- {\HCode{</span></span>}}
-\Css{span.xout {text-decoration: line-through }}
+ {\HCode{<span class="xout">}\NoFonts}
+ {\EndNoFonts\HCode{</span>}}
+\Configure{xout-math}
+ {\HCode{<span class="xout">}\NoFonts}
+ {\EndNoFonts\HCode{</span>}}
+\Css{span.xout, .xout-math {text-decoration: line-through underline }}
\Configure{uwave}
- {\HCode{<span class="uwave">}}
- {\HCode{</span>}}
-\Css{span.uwave {text-decoration:underline }}
+ {\HCode{<span class="uwave">}\NoFonts}
+ {\EndNoFonts\HCode{</span>}}
+\Configure{uwave-math}
+ {\HCode{<span class="uwave">}\NoFonts}
+ {\EndNoFonts\HCode{</span>}}
+\Css{span.uwave, .uwave-math {text-decoration:underline wavy; }}
+\Configure{dashuline}
+ {\HCode{<span class="dashuline">}\NoFonts}
+ {\EndNoFonts\HCode{</span>}}
+\Configure{dashuline-math}
+ {\HCode{<span class="dashuline">}\NoFonts}
+ {\EndNoFonts\HCode{</span>}}
+\Css{span.dashuline, .dashuline-math {text-decoration:underline dashed;}}
+\Configure{dotuline}
+ {\HCode{<span class="dotuline">}\NoFonts}
+ {\EndNoFonts\HCode{</span>}}
+\Configure{dotuline-math}
+ {\HCode{<span class="dotuline">}\NoFonts}
+ {\EndNoFonts\HCode{</span>}}
+\Css{span.dotuline, .dotuline-math {text-decoration:underline dotted;}}
>>>
Modified: trunk/lit/tex4ht-mathml.tex
===================================================================
--- trunk/lit/tex4ht-mathml.tex 2022-04-26 08:20:14 UTC (rev 1118)
+++ trunk/lit/tex4ht-mathml.tex 2022-04-26 15:53:45 UTC (rev 1119)
@@ -3828,6 +3828,34 @@
{\HCode{</mrow></munder>}}
>>>
+Support for the Ulem package in MathML
+\<configure mathml ulem\><<<
+\Configure{uline-math}
+ {\HCode{<mstyle class="uline-math">}\NoFonts} {\EndNoFonts\HCode{</mstyle>}}
+\Css{.uline-math{ text-decoration:underline; }}
+\Configure{uuline-math}
+ {\HCode{<mstyle class="uuline-math">}\NoFonts} {\EndNoFonts\HCode{</mstyle>}}
+\Css{.uuline-math{ text-decoration:underline double; }}
+\Configure{sout-math}
+ {\HCode{<mstyle class="sout-math">}\NoFonts} {\EndNoFonts\HCode{</mstyle>}}
+\Css{.sout-math {text-decoration: line-through }}
+\Configure{xout-math}
+ {\HCode{<mstyle class="xout-math">}\NoFonts}
+ {\EndNoFonts\HCode{</mstyle>}}
+\Css{.xout-math {text-decoration: line-through underline }}
+\Configure{uwave-math}
+ {\HCode{<mstyle class="uwave-math">}\NoFonts}
+ {\EndNoFonts\HCode{</mstyle>}}
+\Css{.uwave-math {text-decoration:underline wavy; }}
+\Configure{dashuline-math}
+ {\HCode{<mstyle class="dashuline-math">}\NoFonts}
+ {\EndNoFonts\HCode{</mstyle>}}
+\Css{.dashuline-math {text-decoration:underline dashed;}}
+\Configure{dotuline-math}
+ {\HCode{<mstyle class="dotuline-math">}\NoFonts}
+ {\EndNoFonts\HCode{</mstyle>}}
+\Css{.dotuline-math {text-decoration:underline dotted;}}
+>>>
More information about the tex4ht-commits
mailing list.