[tex4ht-commits] [SCM] tex4ht updated: r1118 - trunk/lit
Michal Hoftich
INVALID.NOREPLY at gnu.org.ua
Tue Apr 26 10:20:14 CEST 2022
Author: michal_h21
Date: 2022-04-26 08:20:14 +0000 (Tue, 26 Apr 2022)
New Revision: 1118
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-4ht.tex
Log:
fixed support for subdirectories in xr
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2022-04-25 13:31:56 UTC (rev 1117)
+++ trunk/lit/ChangeLog 2022-04-26 08:20:14 UTC (rev 1118)
@@ -1,3 +1,9 @@
+2022-04-26 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (xr.4ht, xr-hooks.4ht): added support for external
+ documents in subdirectories.
+ https://puszcza.gnu.org.ua/bugs/?560
+
2022-04-25 Michal Hoftich <michal.h21 at gmail.com>
* tex4ht-4ht.tex (xr-hyper.4ht,
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2022-04-25 13:31:56 UTC (rev 1117)
+++ trunk/lit/tex4ht-4ht.tex 2022-04-26 08:20:14 UTC (rev 1118)
@@ -3799,6 +3799,10 @@
\<wait with xr\><<<
\:AtEndOfPackage{\let\XR:\XR@
\def\XR@[#1]#2{%
+ % save directory for the linked file
+ \filename at parse{#2}%
+ % \filename at base is filename, \filename at area directory
+ \expandafter\xdef\csname xr:dir:\filename at base\endcsname{\filename at area}%
\Configure{AtBeginDocument}{\XR:[#1]{#2}}{}}%
}
>>>
@@ -3836,7 +3840,10 @@
>>>
\<fix xr-nonhyper\><<<
-\def\XRrEfLiNK[#1]#2#3{\a:xr[#1]{#2}{}%
+\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}
@@ -3921,9 +3928,9 @@
\:AtEndOfPackage{\let\XR:\XR@
\def\XR@[#1][#2]#3{%
% save directory for the linked file
- \filename at parse{#3}
+ \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}
+ \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.