[latex3-commits] [latex3/hyperref] develop: xr-hyper: always store url/file name (c50689b)
github at latex-project.org
github at latex-project.org
Sun Nov 26 12:43:30 CET 2023
Repository : https://github.com/latex3/hyperref
On branch : develop
Link : https://github.com/latex3/hyperref/commit/c50689b615d7a2691592363d7e79cd39927a8345
>---------------------------------------------------------------
commit c50689b615d7a2691592363d7e79cd39927a8345
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Nov 26 12:43:30 2023 +0100
xr-hyper: always store url/file name
>---------------------------------------------------------------
c50689b615d7a2691592363d7e79cd39927a8345
ChangeLog.txt | 6 +++++-
testfiles/gh118-xr-hyper.etex.tlg | 30 +++++++++++++++++-------------
testfiles/gh118-xr-hyper.luatex.tlg | 5 +++--
testfiles/gh118-xr-hyper.tlg | 5 +++--
testfiles/xr-newlabel-1.etex.tlg | 16 ++++++++--------
testfiles/xr-newlabel-1.luatex.tlg | 16 ++++++++--------
testfiles/xr-newlabel-1.tlg | 16 ++++++++--------
testfiles/xr-newlabel-2.etex.tlg | 18 +++++++++---------
testfiles/xr-newlabel-2.luatex.tlg | 18 +++++++++---------
testfiles/xr-newlabel-2.tlg | 18 +++++++++---------
testfiles/xr-newlabel-3.etex.tlg | 18 +++++++++---------
testfiles/xr-newlabel-3.luatex.tlg | 18 +++++++++---------
testfiles/xr-newlabel-3.tlg | 18 +++++++++---------
testfiles/xr-newlabel-4.etex.tlg | 18 +++++++++---------
testfiles/xr-newlabel-4.luatex.tlg | 18 +++++++++---------
testfiles/xr-newlabel-4.tlg | 18 +++++++++---------
testfiles/xr-newlabel-5.etex.tlg | 4 ++--
testfiles/xr-newlabel-5.luatex.tlg | 4 ++--
testfiles/xr-newlabel-5.tlg | 4 ++--
xr-hyper.sty | 24 ++++++++++--------------
20 files changed, 149 insertions(+), 143 deletions(-)
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 4b39f62..366aeeb 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,6 +1,10 @@
+2023-11-26 Ulrike Fischer
+ * xr-hyper.sty: store URL/file name of external documents always to
+ allow file links even without destinations.
+
2023-11-14 Ulrike Fischer
* remove ltxcmds dependency in hluatex.dtx
- * remove ltxcmds dependency in nameref.dtx (v2.55)
+ * remove ltxcmds dependency in nameref.dtx (v2.56)
* remove ltxcmds dependency in backref.dtx (v1.44)
2023-11-11 David Carlisle
diff --git a/testfiles/gh118-xr-hyper.etex.tlg b/testfiles/gh118-xr-hyper.etex.tlg
index 45cc218..48ffa06 100644
--- a/testfiles/gh118-xr-hyper.etex.tlg
+++ b/testfiles/gh118-xr-hyper.etex.tlg
@@ -1,8 +1,7 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
-Package hyperref Warning: Suppressing link with empty target on input line ....
> \r at sec-no-hyper=macro:
-->{1}{1}{}{}{}.
+->{1}{1}{}{}{test-xr-nohyper.pdf}.
<recently read> \r at sec-no-hyper
l. ......after\show\csname r at sec-no-hyper\endcsname
> \r at sec-hyper=macro:
@@ -50,17 +49,22 @@ Completed box being shipped out [1]
....\glue(\topskip) 3.32141
....\hbox(6.67859+0.0)x345.0, glue set 249.88878fil
.....\hbox(0.0+0.0)x15.0
-.....\OT1/cmr/m/n/10 s
-.....\OT1/cmr/m/n/10 e
-.....\OT1/cmr/m/n/10 c
-.....\OT1/cmr/m/n/10 t
-.....\OT1/cmr/m/n/10 i
-.....\OT1/cmr/m/n/10 o
-.....\OT1/cmr/m/n/10 n
-.....\penalty 10000
-.....\glue 3.33333 plus 1.66666 minus 1.11111
-.....\OT1/cmr/m/n/10 1
-.....\hbox(0.0+0.0)x0.0
+.....\special{ps:SDict begin H.S end}
+.....\hbox(6.67859+0.0)x38.38895
+......\OT1/cmr/m/n/10 s
+......\OT1/cmr/m/n/10 e
+......\OT1/cmr/m/n/10 c
+......\OT1/cmr/m/n/10 t
+......\OT1/cmr/m/n/10 i
+......\OT1/cmr/m/n/10 o
+......\OT1/cmr/m/n/10 n
+......\penalty 10000
+......\glue 3.33333 plus 1.66666 minus 1.11111
+......\OT1/cmr/m/n/10 1
+......\hbox(0.0+0.0)x0.0
+.....\hbox(0.0+0.0)x0.0, shifted -6.67859
+......\special{ps:SDict begin H.R end}
+.....\special{ps:SDict begin [/Subtype /Link/H /I/Border [0 0 1]BorderArrayPatch/Color [0 .5 .5]/Action <</S/GoToR/F(test-xr-nohyper.pdf)/D[0/Fit]>> H.B /ANN pdfmark end}
.....\glue 3.33333 plus 1.66666 minus 1.11111
.....\special{ps:SDict begin H.S end}
.....\hbox(6.67859+0.0)x38.38895
diff --git a/testfiles/gh118-xr-hyper.luatex.tlg b/testfiles/gh118-xr-hyper.luatex.tlg
index 1dad7df..29ee174 100644
--- a/testfiles/gh118-xr-hyper.luatex.tlg
+++ b/testfiles/gh118-xr-hyper.luatex.tlg
@@ -1,8 +1,7 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
-Package hyperref Warning: Suppressing link with empty target on input line ....
> \r at sec-no-hyper=macro:
-->{1}{1}{}{}{}.
+->{1}{1}{}{}{test-xr-nohyper.pdf}.
<recently read> \r at sec-no-hyper
l. ......ndafter\show\csname r at sec-no-hyper\endcsname
> \r at sec-hyper=macro:
@@ -45,6 +44,7 @@ Completed box being shipped out [1]
......\localleftbox=null
......\localrightbox=null
.....\hbox(0.0+0.0)x15.0, direction TLT
+.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 .5 .5]} action user{/Subtype/Link/A<</F(test-xr-nohyper.pdf)/S/GoToR/D[0/Fit]>>}
.....\TU/lmr/m/n/10 s
.....\TU/lmr/m/n/10 e
.....\TU/lmr/m/n/10 c
@@ -58,6 +58,7 @@ Completed box being shipped out [1]
.....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.....\TU/lmr/m/n/10 1
.....\hbox(0.0+0.0)x0.0, direction TLT
+.....\pdfendlink
.....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 .5 .5]} action user{/Subtype/Link/A<</F(test-xr-hyper.pdf)/S/GoToR/D(section.1)>>}
.....\TU/lmr/m/n/10 s
diff --git a/testfiles/gh118-xr-hyper.tlg b/testfiles/gh118-xr-hyper.tlg
index 663c5ef..4dbbc92 100644
--- a/testfiles/gh118-xr-hyper.tlg
+++ b/testfiles/gh118-xr-hyper.tlg
@@ -1,8 +1,7 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
-Package hyperref Warning: Suppressing link with empty target on input line ....
> \r at sec-no-hyper=macro:
-->{1}{1}{}{}{}.
+->{1}{1}{}{}{test-xr-nohyper.pdf}.
<recently read> \r at sec-no-hyper
l. ......after\show\csname r at sec-no-hyper\endcsname
> \r at sec-hyper=macro:
@@ -40,6 +39,7 @@ Completed box being shipped out [1]
....\glue(\topskip) 3.32141
....\hbox(6.67859+0.0)x345.0, glue set 249.88878fil
.....\hbox(0.0+0.0)x15.0
+.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 .5 .5]} action user{/Subtype/Link/A<</F(test-xr-nohyper.pdf)/S/GoToR/D[0/Fit]>>}
.....\OT1/cmr/m/n/10 s
.....\OT1/cmr/m/n/10 e
.....\OT1/cmr/m/n/10 c
@@ -51,6 +51,7 @@ Completed box being shipped out [1]
.....\glue 3.33333 plus 1.66666 minus 1.11111
.....\OT1/cmr/m/n/10 1
.....\hbox(0.0+0.0)x0.0
+.....\pdfendlink
.....\glue 3.33333 plus 1.66666 minus 1.11111
.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 .5 .5]} action user{/Subtype/Link/A<</F(test-xr-hyper.pdf)/S/GoToR/D(section.1)>>}
.....\OT1/cmr/m/n/10 s
diff --git a/testfiles/xr-newlabel-1.etex.tlg b/testfiles/xr-newlabel-1.etex.tlg
index 72a00b2..3198ccc 100644
--- a/testfiles/xr-newlabel-1.etex.tlg
+++ b/testfiles/xr-newlabel-1.etex.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0
diff --git a/testfiles/xr-newlabel-1.luatex.tlg b/testfiles/xr-newlabel-1.luatex.tlg
index a4dd17b..b6a16dd 100644
--- a/testfiles/xr-newlabel-1.luatex.tlg
+++ b/testfiles/xr-newlabel-1.luatex.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......a \show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0, direction TLT
diff --git a/testfiles/xr-newlabel-1.tlg b/testfiles/xr-newlabel-1.tlg
index 7fcdc82..e00aaa5 100644
--- a/testfiles/xr-newlabel-1.tlg
+++ b/testfiles/xr-newlabel-1.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0
diff --git a/testfiles/xr-newlabel-2.etex.tlg b/testfiles/xr-newlabel-2.etex.tlg
index d07532e..637f80c 100644
--- a/testfiles/xr-newlabel-2.etex.tlg
+++ b/testfiles/xr-newlabel-2.etex.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0
@@ -79,7 +79,7 @@ Completed box being shipped out [1]
......\OT1/cmr/m/n/10 1
.....\hbox(0.0+0.0)x0.0, shifted -6.44444
......\special{ps:SDict begin H.R end}
-.....\special{ps:SDict begin [/Color [1 0 0]/H /I/Border [0 0 1]BorderArrayPatch/Subtype /Link/Dest (section.title) cvn H.B /ANN pdfmark end}
+.....\special{ps:SDict begin [/Subtype /Link/H /I/Border [0 0 1]BorderArrayPatch/Color [0 .5 .5]/Action <</S/GoToR/F(test-aux3.pdf)/D(section.title)cvn>> H.B /ANN pdfmark end}
.....\penalty 10000
.....\glue(\parfillskip) 0.0 plus 1.0fil
.....\glue(\rightskip) 0.0
diff --git a/testfiles/xr-newlabel-2.luatex.tlg b/testfiles/xr-newlabel-2.luatex.tlg
index d261913..b110a24 100644
--- a/testfiles/xr-newlabel-2.luatex.tlg
+++ b/testfiles/xr-newlabel-2.luatex.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......a \show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0, direction TLT
@@ -67,7 +67,7 @@ Completed box being shipped out [1]
......\localleftbox=null
......\localrightbox=null
.....\hbox(0.0+0.0)x15.0, direction TLT
-.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.title}
+.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 .5 .5]} action user{/Subtype/Link/A<</F(test-aux3.pdf)/S/GoToR/D(section.title)>>}
.....\TU/lmr/m/n/10 1
.....\TU/lmr/m/n/10 .
.....\TU/lmr/m/n/10 1
diff --git a/testfiles/xr-newlabel-2.tlg b/testfiles/xr-newlabel-2.tlg
index 0d17f69..29a5daf 100644
--- a/testfiles/xr-newlabel-2.tlg
+++ b/testfiles/xr-newlabel-2.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0
@@ -62,7 +62,7 @@ Completed box being shipped out [1]
....\glue(\topskip) 3.55556
....\hbox(6.44444+0.0)x345.0, glue set 317.22218fil
.....\hbox(0.0+0.0)x15.0
-.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.title}
+.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 .5 .5]} action user{/Subtype/Link/A<</F(test-aux3.pdf)/S/GoToR/D(section.title)>>}
.....\OT1/cmr/m/n/10 1
.....\OT1/cmr/m/n/10 .
.....\OT1/cmr/m/n/10 1
diff --git a/testfiles/xr-newlabel-3.etex.tlg b/testfiles/xr-newlabel-3.etex.tlg
index ddb7aea..7c1a889 100644
--- a/testfiles/xr-newlabel-3.etex.tlg
+++ b/testfiles/xr-newlabel-3.etex.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0
@@ -79,7 +79,7 @@ Completed box being shipped out [1]
......\OT1/cmr/m/n/10 1
.....\hbox(0.0+0.0)x0.0, shifted -6.44444
......\special{ps:SDict begin H.R end}
-.....\special{ps:SDict begin [/Color [1 0 0]/H /I/Border [0 0 1]BorderArrayPatch/Subtype /Link/Dest (section.title) cvn H.B /ANN pdfmark end}
+.....\special{ps:SDict begin [/Subtype /Link/H /I/Border [0 0 1]BorderArrayPatch/Color [0 .5 .5]/Action <</S/GoToR/F(test-aux3.pdf)/D(section.title)cvn>> H.B /ANN pdfmark end}
.....\penalty 10000
.....\glue(\parfillskip) 0.0 plus 1.0fil
.....\glue(\rightskip) 0.0
diff --git a/testfiles/xr-newlabel-3.luatex.tlg b/testfiles/xr-newlabel-3.luatex.tlg
index 3b3d961..1ca8b21 100644
--- a/testfiles/xr-newlabel-3.luatex.tlg
+++ b/testfiles/xr-newlabel-3.luatex.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......a \show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0, direction TLT
@@ -67,7 +67,7 @@ Completed box being shipped out [1]
......\localleftbox=null
......\localrightbox=null
.....\hbox(0.0+0.0)x15.0, direction TLT
-.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.title}
+.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 .5 .5]} action user{/Subtype/Link/A<</F(test-aux3.pdf)/S/GoToR/D(section.title)>>}
.....\TU/lmr/m/n/10 1
.....\TU/lmr/m/n/10 .
.....\TU/lmr/m/n/10 1
diff --git a/testfiles/xr-newlabel-3.tlg b/testfiles/xr-newlabel-3.tlg
index ad4ed38..eed8f8f 100644
--- a/testfiles/xr-newlabel-3.tlg
+++ b/testfiles/xr-newlabel-3.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0
@@ -62,7 +62,7 @@ Completed box being shipped out [1]
....\glue(\topskip) 3.55556
....\hbox(6.44444+0.0)x345.0, glue set 317.22218fil
.....\hbox(0.0+0.0)x15.0
-.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.title}
+.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 .5 .5]} action user{/Subtype/Link/A<</F(test-aux3.pdf)/S/GoToR/D(section.title)>>}
.....\OT1/cmr/m/n/10 1
.....\OT1/cmr/m/n/10 .
.....\OT1/cmr/m/n/10 1
diff --git a/testfiles/xr-newlabel-4.etex.tlg b/testfiles/xr-newlabel-4.etex.tlg
index 96a867f..c9dc04b 100644
--- a/testfiles/xr-newlabel-4.etex.tlg
+++ b/testfiles/xr-newlabel-4.etex.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0
@@ -79,7 +79,7 @@ Completed box being shipped out [1]
......\OT1/cmr/m/n/10 1
.....\hbox(0.0+0.0)x0.0, shifted -6.44444
......\special{ps:SDict begin H.R end}
-.....\special{ps:SDict begin [/Color [1 0 0]/H /I/Border [0 0 1]BorderArrayPatch/Subtype /Link/Dest (section.title) cvn H.B /ANN pdfmark end}
+.....\special{ps:SDict begin [/Subtype /Link/H /I/Border [0 0 1]BorderArrayPatch/Color [0 .5 .5]/Action <</S/GoToR/F(test-aux3.pdf)/D(section.title)cvn>> H.B /ANN pdfmark end}
.....\penalty 10000
.....\glue(\parfillskip) 0.0 plus 1.0fil
.....\glue(\rightskip) 0.0
diff --git a/testfiles/xr-newlabel-4.luatex.tlg b/testfiles/xr-newlabel-4.luatex.tlg
index bdfd3b2..792d3e2 100644
--- a/testfiles/xr-newlabel-4.luatex.tlg
+++ b/testfiles/xr-newlabel-4.luatex.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......a \show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0, direction TLT
@@ -67,7 +67,7 @@ Completed box being shipped out [1]
......\localleftbox=null
......\localrightbox=null
.....\hbox(0.0+0.0)x15.0, direction TLT
-.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.title}
+.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 .5 .5]} action user{/Subtype/Link/A<</F(test-aux3.pdf)/S/GoToR/D(section.title)>>}
.....\TU/lmr/m/n/10 1
.....\TU/lmr/m/n/10 .
.....\TU/lmr/m/n/10 1
diff --git a/testfiles/xr-newlabel-4.tlg b/testfiles/xr-newlabel-4.tlg
index c4727fa..bb5b3a4 100644
--- a/testfiles/xr-newlabel-4.tlg
+++ b/testfiles/xr-newlabel-4.tlg
@@ -1,33 +1,33 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at Ia=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia
\show\r at Ib \show\r at Icspecial
> \r at Ib=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib
\show\r at Icspecial
> \r at Icspecial=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux1.pdf}.
l. ... \show\r at Ia \show\r at Ib \show\r at Icspecial
> \r at IIa=macro:
-->{1.1}{1}{}{}{}.
+->{1.1}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa
\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIb=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb
\show\r at IIbspecial \show\r at IIc
> \r at IIbspecial=macro:
-->{1.2}{1}{}{}{}.
+->{1.2}{1}{}{}{test-aux2.pdf}.
l. ... \show\r at IIa \show\r at IIb \show\r at IIbspecial
\show\r at IIc
> \r at IIc=macro:
-->{1.3}{1}{}{}{}.
+->{1.3}{1}{}{}{test-aux2.pdf}.
l. ......\show\r at IIb \show\r at IIbspecial \show\r at IIc
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0
@@ -62,7 +62,7 @@ Completed box being shipped out [1]
....\glue(\topskip) 3.55556
....\hbox(6.44444+0.0)x345.0, glue set 317.22218fil
.....\hbox(0.0+0.0)x15.0
-.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[1 0 0]} action goto name{section.title}
+.....\pdfstartlink(*+*)x* attr{/Border[0 0 1]/H/I/C[0 .5 .5]} action user{/Subtype/Link/A<</F(test-aux3.pdf)/S/GoToR/D(section.title)>>}
.....\OT1/cmr/m/n/10 1
.....\OT1/cmr/m/n/10 .
.....\OT1/cmr/m/n/10 1
diff --git a/testfiles/xr-newlabel-5.etex.tlg b/testfiles/xr-newlabel-5.etex.tlg
index 7476e54..77a5cf6 100644
--- a/testfiles/xr-newlabel-5.etex.tlg
+++ b/testfiles/xr-newlabel-5.etex.tlg
@@ -1,7 +1,7 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
\show\r at IVa \show\r at Va
> \r at IVa=macro:
@@ -9,7 +9,7 @@ l. ... \show\r at IIIa
l. ... \show\r at IIIa \show\r at IVa
\show\r at Va
> \r at Va=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux5.pdf}.
l. ... \show\r at IIIa \show\r at IVa \show\r at Va
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0
diff --git a/testfiles/xr-newlabel-5.luatex.tlg b/testfiles/xr-newlabel-5.luatex.tlg
index 50b2e40..a6fa366 100644
--- a/testfiles/xr-newlabel-5.luatex.tlg
+++ b/testfiles/xr-newlabel-5.luatex.tlg
@@ -1,7 +1,7 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
\show\r at IVa \show\r at Va
> \r at IVa=macro:
@@ -9,7 +9,7 @@ l. ... \show\r at IIIa
l. ... \show\r at IIIa \show\r at IVa
\show\r at Va
> \r at Va=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux5.pdf}.
l. ... \show\r at IIIa \show\r at IVa \show\r at Va
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0, direction TLT
diff --git a/testfiles/xr-newlabel-5.tlg b/testfiles/xr-newlabel-5.tlg
index d67da4b..b85bc32 100644
--- a/testfiles/xr-newlabel-5.tlg
+++ b/testfiles/xr-newlabel-5.tlg
@@ -1,7 +1,7 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \r at IIIa=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux3.pdf}.
l. ... \show\r at IIIa
\show\r at IVa \show\r at Va
> \r at IVa=macro:
@@ -9,7 +9,7 @@ l. ... \show\r at IIIa
l. ... \show\r at IIIa \show\r at IVa
\show\r at Va
> \r at Va=macro:
-->{1.1}{1}{title}{section.title}{}.
+->{1.1}{1}{title}{section.title}{test-aux5.pdf}.
l. ... \show\r at IIIa \show\r at IVa \show\r at Va
Completed box being shipped out [1]
\vbox(627.36243+0.0)x380.0
diff --git a/xr-hyper.sty b/xr-hyper.sty
index 84c9611..e77824e 100644
--- a/xr-hyper.sty
+++ b/xr-hyper.sty
@@ -50,8 +50,9 @@
%%
%% In the case of \ref, if the external document has not used
%% hyperref, this package will work like xr and produce the correct
-%% text, but can not produce a well formed link as the target document
-%% is not set up. In this case you may prefer to use \ref* rather than
+%% text, but it can only produce a file link and
+%% not target the exact location as the target document has no destinations
+%% In this case you may prefer to use \ref* rather than
%% \ref to avoid generating a hyperlink.
%%
%%
@@ -73,7 +74,6 @@
\else
\let\XR at bibcite\bibcite
\fi
- \def\XR at useURL{}%
\def\XR at URL{#4}%
\filename at parse{#3}%
\XR at next#3.aux\relax\\}}
@@ -94,12 +94,7 @@
% XR at addURL:
\def\XR at addURL#1{\XR@@dURL#1{}{}{}{}\\}
\def\XR@@dURL#1#2#3#4#5\\{%
- {#1}{#2}%
- \if!#4!%
- {#3}{#4}{}% new perhaps this could use \XR at URL too?
- \else
- {#3}{#4}{\XR at useURL}%
- \fi
+ {#1}{#2}{#3}{#4}{\XR at URL}%
}%
\def\XR at explist{\expandafter\XR at next\XR at list\\}
@@ -118,11 +113,6 @@
% 2019 update to match xr
\long\def\XR at test#1#2#3#4\XR@{%
\let\XR at tempa\@gobblethree
-% we set the file name only if the target has actually destinations.
-% for this we test if hyperref has been used.
- \ifx#1\HyperFirstAtBeginDocument
- \let\XR at useURL\XR at URL
- \fi
\ifx#1\newlabel
\let\XR at tempa\@firstofthree
\else\ifx#1\XR at bibcite
@@ -168,3 +158,9 @@
%% unified and simplified the brace handling: all defined references have now
%% five brace groups. Together with the planed change in LaTeX 2023-06-01 this
%% will improve the combination of hyperref/non-hyperref documents.
+%%
+%% 2023-11-26
+%%
+%% Always store the URL/file name of the external document to allow file links
+%% even if it has no destinations.
+%%
More information about the latex3-commits
mailing list.