From 7b9369df36adafdc30953d0c1582dc2cd47bc1b4 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Wed, 27 Apr 2022 03:00:38 +0000
Subject: CTAN sync 202204270300

---
 support/TeX4ht/source/tex4ht-4ht.tex | 59 ++++++++++++++++++++++++++++--------
 1 file changed, 47 insertions(+), 12 deletions(-)

(limited to 'support/TeX4ht/source/tex4ht-4ht.tex')

diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index 5e3d3106bd..eb4ca2f77d 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1117 2022-04-25 13:31:56Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1119 2022-04-26 15:53:45Z michal_h21 $
 % tex tex4ht-4ht   or   ht tex tex4ht-4ht
 %
 % Copyright 2009-2022 TeX Users Group    
@@ -3799,6 +3799,10 @@ before \''\begin{document}'.
 \<wait with xr\><<<
 \:AtEndOfPackage{\let\XR:\XR@ 
    \def\XR@[#1]#2{%
+    % save directory for the linked file
+    \filename@parse{#2}%
+    % \filename@base is filename, \filename@area directory
+    \expandafter\xdef\csname xr:dir:\filename@base\endcsname{\filename@area}%
     \Configure{AtBeginDocument}{\XR:[#1]{#2}}{}}%
 }
 >>>
@@ -3836,7 +3840,10 @@ before \''\begin{document}'.
 >>>
 
 \<fix xr-nonhyper\><<<
-\def\XRrEfLiNK[#1]#2#3{\a:xr[#1]{#2}{}%
+\def\XRrEfLiNK[#1]#2#3{%
+  \filename@parse{#1}% Get basename of the linked html file, 
+  % xr:dir\filename@base contains file's directory
+  \a:xr[\csname xr:dir:\filename@base\endcsname#1]{#2}{}%
    \ifx\hyperrefLabel\:UnDef #3\else \hyperrefLabel\fi \b:xr}
 \NewConfigure{xr}{2}
 \Configure{xr}{\Link}{\EndLink}
@@ -3921,9 +3928,9 @@ it, so we can safely eat that.
 \:AtEndOfPackage{\let\XR:\XR@
     \def\XR@[#1][#2]#3{%
        % save directory for the linked file
-      \filename@parse{#3}
+      \filename@parse{#3}%
       % \filename@base is filename, \filename@area directory
-      \expandafter\xdef\csname xr:dir:\filename@base\endcsname{\filename@area}
+      \expandafter\xdef\csname xr:dir:\filename@base\endcsname{\filename@area}%
       \AtBeginDocument{\XR:[#1][#2]{#3}}
     }%
 }
@@ -30871,21 +30878,49 @@ d|<haddr prefix|>\last:haddr
 \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
 >>>
 
 %%%%%%%%%%%%%%%%%%%
-- 
cgit v1.2.3

