summaryrefslogtreecommitdiff
path: root/support/TeX4ht/source
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-03-12 03:01:58 +0000
committerNorbert Preining <norbert@preining.info>2023-03-12 03:01:58 +0000
commitb3d8df92a44aa1df24a0869d728b45b0baeaa54c (patch)
treee29b1629fe0120f4d75acc0c72e9470ba7587b88 /support/TeX4ht/source
parent6d29701d91e7deb368e3829e1ff11dcf483cd2fb (diff)
CTAN sync 202303120301
Diffstat (limited to 'support/TeX4ht/source')
-rw-r--r--support/TeX4ht/source/ChangeLog7
-rw-r--r--support/TeX4ht/source/tex4ht-4ht.tex18
2 files changed, 20 insertions, 5 deletions
diff --git a/support/TeX4ht/source/ChangeLog b/support/TeX4ht/source/ChangeLog
index f172361dba..474e3c98d6 100644
--- a/support/TeX4ht/source/ChangeLog
+++ b/support/TeX4ht/source/ChangeLog
@@ -1,3 +1,10 @@
+2023-03-10 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (xr.4ht, xr-hyper.4ht, cleveref.4ht): fixed clash
+ between Cleveref and Xr.
+ https://github.com/michal-h21/make4ht/issues/113
+ https://tex.stackexchange.com/q/678730/2891
+
2023-03-07 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-4ht.tex (physics.4ht): fixed MathML issues with the Physics
diff --git a/support/TeX4ht/source/tex4ht-4ht.tex b/support/TeX4ht/source/tex4ht-4ht.tex
index 4d36f3a472..ffc1469088 100644
--- a/support/TeX4ht/source/tex4ht-4ht.tex
+++ b/support/TeX4ht/source/tex4ht-4ht.tex
@@ -1,4 +1,4 @@
-% $Id: tex4ht-4ht.tex 1304 2023-03-07 12:50:09Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1305 2023-03-10 16:01:24Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
% Copyright 2009-2023 TeX Users Group
@@ -3631,7 +3631,7 @@ definitions.
\<cleveref.4ht\><<<
% cleveref.4ht (|version), generated from |jobname.tex
-% Copyright 2018-2022 TeX Users Group
+% Copyright 2018-2023 TeX Users Group
|<TeX4ht license text|>
|<cleveref refstepcounter|>
@@ -3692,6 +3692,7 @@ Support for links from the \Verb|\cref| command.
\fi
\def\:tempa#1#2{\bgroup%
\def\rEfLiNK##1##2{\Link{##1}{}}%
+ \def\XRrEfLiNK[##1]##2##3{\Link[##1]{##2}{}}% handle links from Xr and Xr-hyper
\expandafter\expandafter\expandafter\@firstoffive\csname r@#2\endcsname{}{}{}{}{}%
\cref@getlabel{#2}{\@templabel}%
#1{\@templabel}{}{}%
@@ -3845,7 +3846,7 @@ before \''\begin{document}'.
\<xr.4ht\><<<
% xr.4ht (|version), generated from |jobname.tex
-% Copyright |CopyYear.1997. Eitan M. Gurari
+% Copyright 1997-2023 TeX Users Group
|<TeX4ht copywrite|>
|<fix xr|>
|<fix xr-nonhyper|>
@@ -3933,11 +3934,17 @@ For xref file
\`'-'. The if acts on \`')F1F-' to get the file name. Where the \`'x'
got into the picture? Did \''\aXrefFile' introduced it? where?
+We must also test for references with the @cref suffix - these are automatically
+created by Cleveref and contain meta info about reference types.
+
\<xr newlabel\><<<
-\expandafter\xdef\csname r@\XR@prefix#2\endcsname{\XR:rEfLiNK #3}%
+\regex_match:nnTF{@cref}{#2}% we must handle cleveref meta references
+{\expandafter\xdef\csname r@\XR@prefix#2\endcsname{#3}}%
+{\expandafter\xdef\csname r@\XR@prefix#2\endcsname{\XR:rEfLiNK #3}}%
>>>
\<fix xr\><<<
+\ExplSyntaxOn
\long\def\XR@test#1#2#3#4\XR@{%
\ifx#1\newlabel
|<xr newlabel|>%
@@ -3946,6 +3953,7 @@ got into the picture? Did \''\aXrefFile' introduced it? where?
\fi\fi
\ifeof\@inputcheck\expandafter\XR@aux
\else\expandafter\XR@read\fi}
+\ExplSyntaxOff
>>>
%%%%%%%%%%%%%%%%%%%%%
@@ -3954,7 +3962,7 @@ got into the picture? Did \''\aXrefFile' introduced it? where?
\<xr-hyper.4ht\><<<
% xr-hyper.4ht (|version), generated from |jobname.tex
-% Copyright |CopyYear.2003. Eitan M. Gurari
+% Copyright 2003-2023 TeX Users Group
|<TeX4ht copywrite|>
|<fix xr|>
|<fix xr-hyper|>