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

Michal Hoftich INVALID.NOREPLY at gnu.org.ua
Mon Apr 25 15:31:56 CEST 2022


Author: michal_h21
Date: 2022-04-25 13:31:56 +0000 (Mon, 25 Apr 2022)
New Revision: 1117

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
fixed support for subdirectories in xr-hyper

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2022-04-25 08:10:08 UTC (rev 1116)
+++ trunk/lit/ChangeLog	2022-04-25 13:31:56 UTC (rev 1117)
@@ -1,5 +1,9 @@
 2022-04-25  Michal Hoftich  <michal.h21 at gmail.com>
 
+	* tex4ht-4ht.tex (xr-hyper.4ht,
+	xrhyper-hooks.4ht): added support for external documents in
+	subdirectories.
+	https://puszcza.gnu.org.ua/bugs/?560
 	* tex4ht-4ht.tex (breqn.4ht): added support for the Breqn package.
 	https://tex.stackexchange.com/a/641918/2891
 

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2022-04-25 08:10:08 UTC (rev 1116)
+++ trunk/lit/tex4ht-4ht.tex	2022-04-25 13:31:56 UTC (rev 1117)
@@ -3889,8 +3889,11 @@
 Hyperref pasess five arguments to \`|\newlabel|, we must adapt \`|\XR:rEfLiNK| to that
 
 \<fix xr-hyper\><<<
-\def\XRrEfLiNK[#1]#2#3{\a:xr[#1]{#2}{}%
-   \ifx\hyperrefLabel\:UnDef #3\else \hyperrefLabel\fi \b:xr}
+\def\XRrEfLiNK[#1]#2#3{%
+  \filename at parse{#1}% Get basename of the linked html file, 
+  % xr:dir\filename at base contains file's directory
+  \a:xr[\csname xr:dir:\filename at base\endcsname#1]{#2}{}%
+  \ifx\hyperrefLabel\:UnDef #3\else \hyperrefLabel\fi \b:xr}
 \NewConfigure{xr}{2}
 \Configure{xr}{\Link}{\EndLink}
 \def\XR:rEfLiNK#1#2#3#4#5{{\xr:rEfLiNK#1}{\xr:rEfLiNK#2}{\xr:rEfLiNK#3}}
@@ -3917,6 +3920,10 @@
 \<wait with xr-hyper\><<<
 \:AtEndOfPackage{\let\XR:\XR@
     \def\XR@[#1][#2]#3{%
+       % save directory for the linked file
+      \filename at parse{#3}
+      % \filename at base is filename, \filename at area directory
+      \expandafter\xdef\csname xr:dir:\filename at base\endcsname{\filename at area}
       \AtBeginDocument{\XR:[#1][#2]{#3}}
     }%
 }



More information about the tex4ht-commits mailing list.