diff options
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/ChangeLog | 6 | ||||
-rw-r--r-- | Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex | 34 |
2 files changed, 39 insertions, 1 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog index a8924e8b5f5..4bdb6320c77 100644 --- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog +++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog @@ -1,3 +1,9 @@ +2022-05-02 Michal Hoftich <michal.h21@gmail.com> + + * tex4ht-4ht.tex (xrhyper-hooks.4ht, xr-hooks.4ht): fixed support + for the cut files. + https://puszcza.gnu.org.ua/bugs/?561 + 2022-05-01 Karl Berry <karl@freefriends.org> * tex4ht-4ht.tex, diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex index f4b07a72b81..ac3a2f55863 100644 --- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex +++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex @@ -1,4 +1,4 @@ -% $Id: tex4ht-4ht.tex 1125 2022-05-01 15:26:13Z karl $ +% $Id: tex4ht-4ht.tex 1127 2022-05-02 12:43:55Z michal_h21 $ % tex tex4ht-4ht or ht tex tex4ht-4ht % % Copyright 2009-2022 TeX Users Group @@ -3793,6 +3793,7 @@ before \''\begin{document}'. % xr-hooks.4ht (|version), generated from |jobname.tex % Copyright 2020 TeX Users Group |<TeX4ht copywrite|> +|<xr cut files|> |<wait with xr|> >>>\AddFile{7}{xr-hooks} @@ -3803,6 +3804,7 @@ before \''\begin{document}'. \filename@parse{#2}% % \filename@base is filename, \filename@area directory \expandafter\xdef\csname xr:dir:\filename@base\endcsname{\filename@area}% + \:declare:xref:files{\filename@area\filename@base}{\filename@area}% declare directory for cut files \Configure{AtBeginDocument}{\XR:[#1]{#2}}{}}% } >>> @@ -3917,6 +3919,7 @@ Hyperref pasess five arguments to \`|\newlabel|, we must adapt \`|\XR:rEfLiNK| t % xrhyper-hooks.4ht (|version), generated from |jobname.tex % Copyright 2020 TeX Users Group |<TeX4ht license text|> +|<xr cut files|> |<wait with xr-hyper|> >>> \AddFile{9}{xrhyper-hooks} @@ -3931,11 +3934,40 @@ it, so we can safely eat that. \filename@parse{#3}% % \filename@base is filename, \filename@area directory \expandafter\xdef\csname xr:dir:\filename@base\endcsname{\filename@area}% + \:declare:xref:files{\filename@area\filename@base}{\filename@area}% declare directory for cut files \AtBeginDocument{\XR:[#1][#2]{#3}} }% } >>> +Declare file directory for filtes that were cut from the main file (using options "3", "4", etc.) + +\<xr cut files\><<< +\ExplSyntaxOn +% detect )F[number]F- using l3regex +\regex_new:N \l_xref_filename +\regex_set:Nn \l_xref_filename {F\d+F} +% save all filenames declared in the xref file +\def\:extract:filename:from:xref#1#2#3{% + \regex_match:NnTF \l_xref_filename {#1}{% + \filename@parse{#2} + \expandafter\xdef\csname xr:dir:\filename@base\endcsname{\:tempa} +}{} +} +\def\:declare:xref:files#1#2{ + \begingroup + % we need to find filenames of cutfiles + % we will use \filename@parse again, so we need to save the directory name + \edef\:tempa{#2}% + \def\:CrossWord##1##2##3{\:extract:filename:from:xref{##1}{##2}{\:tempa}}% + \catcode`\:=11% : is not letter at this moment + \InputIfFileExists{#1.xref}{}{}% load saved cross-references + \endgroup +} + +\ExplSyntaxOff +>>> + %%%%%%%%%%%%%%%%%% \Section{eso-pic} %%%%%%%%%%%%%%%%%% |