[latex3-commits] [git/LaTeX3-latex3-pdfresources] reworking-annot: linktoc, linktocpage (9aa11b1)

Ulrike Fischer fischer at troubleshooting-tex.de
Fri Jan 29 17:05:41 CET 2021


Repository : https://github.com/latex3/pdfresources
On branch  : reworking-annot
Link       : https://github.com/latex3/pdfresources/commit/9aa11b18c97c669db8fe36caa23672a7d22521a4

>---------------------------------------------------------------

commit 9aa11b18c97c669db8fe36caa23672a7d22521a4
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Fri Jan 29 17:05:41 2021 +0100

    linktoc,linktocpage


>---------------------------------------------------------------

9aa11b18c97c669db8fe36caa23672a7d22521a4
 hyperref-generic.dtx         |  19 +++
 info/key-list.tex            |   4 +-
 testfiles/linktoc.luatex.tpf | 367 +++++++++++++++++++++++++++++++++++++++++++
 testfiles/linktoc.pvt        |  26 +++
 testfiles/linktoc.tpf        | 347 ++++++++++++++++++++++++++++++++++++++++
 testfiles/linktoc.xetex.tpf  | 320 +++++++++++++++++++++++++++++++++++++
 6 files changed, 1081 insertions(+), 2 deletions(-)

diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 4b88996..a74ff39 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -1956,6 +1956,25 @@
    ,hypertexnames .default:n = {true}
  }
 
+
+\keys_define:nn { hyp / setup }
+ {
+   ,linktoc .choices:nn = { none, section, all, page }
+     {
+       \cs_set_eq:Nc \Hy at linktoc { Hy at linktoc@#1 }
+     }
+   ,linktoc / unknown .code:n =
+     {
+       \msg_warning:nnxxx { hyp } { unknown-choice }
+         { linktoc }
+         { none, section, all, page }
+         { \exp_not:n {#1} }
+     }
+   ,linktocpage .choice:
+   ,linktocpage / true  .meta:n = {linktoc=page}
+   ,linktocpage / false .meta:n = {linktoc=section}
+   ,linktocpage .default:n = true
+ }
 %draft,final
 \keys_define:nn { hyp / setup }
   {
diff --git a/info/key-list.tex b/info/key-list.tex
index 8dbced7..8af00c4 100644
--- a/info/key-list.tex
+++ b/info/key-list.tex
@@ -45,8 +45,8 @@ done,package option & implicit           & \textit{true}          & redefine \La
 -- & latex2html         &                        & use \textsf{\LaTeX2HTML} backend \\
 done & linkbordercolor    & \textit{1 0 0}         & color of border around links \\
 done & linkcolor          & \textit{red}           & color of links \\
-??   &linktoc            & \textit{section}       & make text be link on TOC, LOF and LOT \\
-?? & linktocpage        & \textit{false}         & make page number, not text, be link on TOC, LOF and LOT \\
+done &linktoc            & \textit{section}       & make text be link on TOC, LOF and LOT \\
+done & linktocpage        & \textit{false}         & make page number, not text, be link on TOC, LOF and LOT \\
 done & menubordercolor    & \textit{1 0 0}         & color of border around menu links \\
 done & menucolor          & \textit{red}           & color for menu links \\
 -- & nativepdf          & \textit{false}         & an alias for \textsf{dvips} \\
diff --git a/testfiles/linktoc.luatex.tpf b/testfiles/linktoc.luatex.tpf
new file mode 100644
index 0000000..db79565
--- /dev/null
+++ b/testfiles/linktoc.luatex.tpf
@@ -0,0 +1,367 @@
+%PDF-1.5
+%ÌÕÁÔÅØÐÄÆ
+1 0 obj
+<< /opacity1 <</ca 1/CA 1>>  >>
+endobj
+11 0 obj
+<< /Length 1650 >>       
+stream
+/opacity1 gs
+/opacity1 gs
+/opacity1 gs
+BT
+/F23 9.96264 Tf
+1 0 0 1 271.621 700.101 Tm [<00360042003B006D00600032>-333<0052002C>-444<007D003B006D00600032>]TJ
+1 0 0 1 275.044 669.217 Tm [<0068>83<001C002300480032>-333<0052002C>-444<0069001C002300480032>]TJ
+/F25 14.3462 Tf
+1 0 0 1 133.768 639.169 Tm [<002A0051004D>31<00690032004D>31<00690062>]TJ
+/F26 9.96264 Tf
+1 0 0 1 133.768 617.251 Tm [<0052>-925<001C0023>-32<002B>-30684<0052>]TJ
+/F25 14.3462 Tf
+1 0 0 1 133.768 584.29 Tm [<0047004200620069>-375<00510037>-375<00360042003B006D006000320062>]TJ
+/F23 9.96264 Tf
+1 0 0 1 148.712 562.458 Tm [<0052>-1800<007D003B006D00600032>-1003<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-1575<0052>]TJ
+/F25 14.3462 Tf
+1 0 0 1 133.768 529.497 Tm [<0047004200620069>-375<00510037>-375<0068>94<001C0023004800320062>]TJ
+/F23 9.96264 Tf
+1 0 0 1 148.712 507.666 Tm [<0052>-1800<0069001C002300480032>-506<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-1575<0052>]TJ
+/F25 14.3462 Tf
+1 0 0 1 133.768 474.705 Tm [<0052>-1000<001C0023>-31<002B>]TJ
+/F23 9.96264 Tf
+1 0 0 1 303.133 139.255 Tm [<0052>]TJ
+ET
+endstream
+endobj
+5 0 obj
+<< /Type /Page /Contents 11 0 R /Resources 10 0 R /MediaBox [ 0 0 595.276 841.89 ] /Parent 23 0 R /Annots 24 0 R >>
+endobj
+24 0 obj
+[ 6 0 R 7 0 R 8 0 R 9 0 R ]
+endobj
+6 0 obj
+<< /Type /Annot /Subtype /Link /Border [0 0 1] /H /I /C [0.701176 0.4 0.414118]  /Rect [ 132.772 616.195 167.054 625.161 ]/A  << /S /GoTo /D (section.1) >> >>
+endobj
+7 0 obj
+<< /Type /Annot /Subtype /Link /Border [0 0 1] /H /I /C [0.701176 0.4 0.414118]  /Rect [ 471.502 561.462 478.476 570.09 ]/A  << /S /GoTo /D (figure.1) >> >>
+endobj
+8 0 obj
+<< /Type /Annot /Subtype /Link /Border [0 0 1] /H /I /C [0.701176 0.4 0.414118]  /Rect [ 147.716 506.56 194.212 515.576 ]/A  << /S /GoTo /D (table.1) >> >>
+endobj
+9 0 obj
+<< /Type /Annot /Subtype /Link /Border [0 0 1] /H /I /C [0.701176 0.4 0.414118]  /Rect [ 471.502 506.67 478.476 515.297 ]/A  << /S /GoTo /D (table.1) >> >>
+endobj
+12 0 obj
+<< /D [ 5 0 R /XYZ 132.768 754.95 null ] >>
+endobj
+14 0 obj
+<< /D [ 5 0 R /XYZ 315.238 712.057 null ] >>
+endobj
+15 0 obj
+<< /D [ 5 0 R /XYZ 314.615 681.172 null ] >>
+endobj
+16 0 obj
+<< /D [ 5 0 R /XYZ 133.768 649.182 null ] >>
+endobj
+17 0 obj
+<< /D [ 5 0 R /XYZ 133.768 657.102 null ] >>
+endobj
+20 0 obj
+<< /D [ 5 0 R /XYZ 133.768 602.222 null ] >>
+endobj
+21 0 obj
+<< /D [ 5 0 R /XYZ 133.768 547.43 null ] >>
+endobj
+22 0 obj
+<< /D [ 5 0 R /XYZ 133.768 492.528 null ] >>
+endobj
+10 0 obj
+<< /ExtGState 1 0 R /Font << /F23 13 0 R /F25 18 0 R /F26 19 0 R >> /ProcSet [ /PDF /Text ] >>
+endobj
+25 0 obj
+<< /S /GoTo /D (section.1) >>
+endobj
+27 0 obj
+(\376\377\000a\000b\000c)
+endobj
+28 0 obj
+[ 28 [ 559 ] 35 [ 639 ] 43 [ 511 ] 82 [ 575 ] ]
+endobj
+30 0 obj
+<< /Length 11 >>         
+[BINARY STREAM]
+endobj
+31 0 obj
+<< /Subtype /CIDFontType0C /Length 932 >>        
+[BINARY STREAM]
+endobj
+29 0 obj
+<< /Type /FontDescriptor /FontName /SKIBOF+LMRoman10-Bold /Flags 4 /FontBBox [ -486 -295 1607 1133 ] /Ascent 1133 /CapHeight 686 /Descent -295 /ItalicAngle 0 /StemV 106 /XHeight 444 /FontFile3 31 0 R /CIDSet 30 0 R >>
+endobj
+32 0 obj
+<< /Length 719 >>        
+stream
+%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-SKIBOF-LMRoman10-Bold-0)
+%%Title: (TeX-SKIBOF-LMRoman10-Bold-0 TeX SKIBOF-LMRoman10-Bold 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (SKIBOF-LMRoman10-Bold)
+/Supplement 0
+>> def
+/CMapName /TeX-Identity-SKIBOF-LMRoman10-Bold def
+/CMapType 2 def
+1 begincodespacerange
+<0000> <FFFF>
+endcodespacerange
+0 beginbfrange
+endbfrange
+4 beginbfchar
+<001C> <0061>
+<0023> <0062>
+<002B> <0063>
+<0052> <0031>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+endstream
+endobj
+19 0 obj
+<< /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont /SKIBOF+LMRoman10-Bold /DescendantFonts [ 33 0 R ] /ToUnicode 32 0 R >>
+endobj
+33 0 obj
+<< /Type /Font /Subtype /CIDFontType0 /BaseFont /SKIBOF+LMRoman10-Bold /FontDescriptor 29 0 R /W 28 0 R /CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >> >>
+endobj
+34 0 obj
+[ 28 [ 547 ] 35 [ 625 ] 42 [ 813 500 ] 50 [ 513 ] 54 [ 707 344 ] 59 [ 563 ] 66 [ 313 ] 71 [ 676 313 ] 77 [ 625 ] 81 [ 563 563 ] 96 [ 460 ] 98 [ 444 ] 104 [ 782 438 ] 109 [ 625 ] ]
+endobj
+36 0 obj
+<< /Length 14 >>         
+[BINARY STREAM]
+endobj
+37 0 obj
+<< /Subtype /CIDFontType0C /Length 2509 >>       
+[BINARY STREAM]
+endobj
+35 0 obj
+<< /Type /FontDescriptor /FontName /UDSYVA+LMRoman12-Bold /Flags 4 /FontBBox [ -476 -289 1577 1137 ] /Ascent 1137 /CapHeight 686 /Descent -289 /ItalicAngle 0 /StemV 104 /XHeight 444 /FontFile3 37 0 R /CIDSet 36 0 R >>
+endobj
+38 0 obj
+<< /Length 930 >>        
+stream
+%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-UDSYVA-LMRoman12-Bold-0)
+%%Title: (TeX-UDSYVA-LMRoman12-Bold-0 TeX UDSYVA-LMRoman12-Bold 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (UDSYVA-LMRoman12-Bold)
+/Supplement 0
+>> def
+/CMapName /TeX-Identity-UDSYVA-LMRoman12-Bold def
+/CMapType 2 def
+1 begincodespacerange
+<0000> <FFFF>
+endcodespacerange
+0 beginbfrange
+endbfrange
+19 beginbfchar
+<001C> <0061>
+<0023> <0062>
+<002A> <0043>
+<002B> <0063>
+<0032> <0065>
+<0036> <0046>
+<0037> <0066>
+<003B> <0067>
+<0042> <0069>
+<0047> <004C>
+<0048> <006C>
+<004D> <006E>
+<0051> <006F>
+<0052> <0031>
+<0060> <0072>
+<0062> <0073>
+<0068> <0054>
+<0069> <0074>
+<006D> <0075>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+endstream
+endobj
+18 0 obj
+<< /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont /UDSYVA+LMRoman12-Bold /DescendantFonts [ 39 0 R ] /ToUnicode 38 0 R >>
+endobj
+39 0 obj
+<< /Type /Font /Subtype /CIDFontType0 /BaseFont /UDSYVA+LMRoman12-Bold /FontDescriptor 35 0 R /W 34 0 R /CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >> >>
+endobj
+40 0 obj
+[ 28 [ 500 ] 35 [ 556 ] 44 [ 278 ] 50 [ 444 ] 54 [ 653 ] 59 [ 500 ] 66 [ 278 ] 72 [ 278 ] 82 [ 500 ] 88 [ 278 ] 96 [ 392 ] 104 [ 722 389 ] 109 [ 556 ] 125 [ 556 ] ]
+endobj
+42 0 obj
+<< /Length 16 >>         
+[BINARY STREAM]
+endobj
+43 0 obj
+<< /Subtype /CIDFontType0C /Length 2143 >>       
+[BINARY STREAM]
+endobj
+41 0 obj
+<< /Type /FontDescriptor /FontName /HLGZVS+LMRoman10-Regular /Flags 4 /FontBBox [ -430 -290 1417 1127 ] /Ascent 1127 /CapHeight 683 /Descent -290 /ItalicAngle 0 /StemV 93 /XHeight 431 /FontFile3 43 0 R /CIDSet 42 0 R >>
+endobj
+44 0 obj
+<< /Length 893 >>        
+stream
+%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-HLGZVS-LMRoman10-Regular-0)
+%%Title: (TeX-HLGZVS-LMRoman10-Regular-0 TeX HLGZVS-LMRoman10-Regular 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (HLGZVS-LMRoman10-Regular)
+/Supplement 0
+>> def
+/CMapName /TeX-Identity-HLGZVS-LMRoman10-Regular def
+/CMapType 2 def
+1 begincodespacerange
+<0000> <FFFF>
+endcodespacerange
+0 beginbfrange
+endbfrange
+15 beginbfchar
+<001C> <0061>
+<0023> <0062>
+<002C> <003A>
+<0032> <0065>
+<0036> <0046>
+<003B> <0067>
+<0042> <0069>
+<0048> <006C>
+<0052> <0031>
+<0058> <002E>
+<0060> <0072>
+<0068> <0054>
+<0069> <0074>
+<006D> <0075>
+<007D> <00660069>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+endstream
+endobj
+13 0 obj
+<< /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont /HLGZVS+LMRoman10-Regular /DescendantFonts [ 45 0 R ] /ToUnicode 44 0 R >>
+endobj
+45 0 obj
+<< /Type /Font /Subtype /CIDFontType0 /BaseFont /HLGZVS+LMRoman10-Regular /FontDescriptor 41 0 R /W 40 0 R /CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >> >>
+endobj
+23 0 obj
+<< /Type /Pages  /Count 1 /Kids [ 5 0 R ] >>
+endobj
+46 0 obj
+<< /Type /Outlines /First 26 0 R /Last 26 0 R /Count 1 >>
+endobj
+26 0 obj
+<< /Title 27 0 R /A 25 0 R /Parent 46 0 R >>
+endobj
+47 0 obj
+<< /Names [ (Doc-Start) 16 0 R (figure.1) 14 0 R (page.1) 12 0 R (section*.1) 17 0 R (section*.2) 20 0 R (section*.3) 21 0 R (section.1) 22 0 R (table.1) 15 0 R ] /Limits [ (Doc-Start) (table.1) ] >>
+endobj
+48 0 obj
+<< /Dests 47 0 R >>
+endobj
+49 0 obj
+<< /Type /Catalog /Pages 23 0 R /Outlines 46 0 R /Names 48 0 R /PageMode /UseOutlines/OpenAction [5 0 R /Fit]/PageLabels <</Nums[0<</S/D>>]>> >>
+endobj
+50 0 obj
+<< /Producer (LuaTeX)/Creator <FEFF004C006100540065005800200077006900740068002000680079007000650072007200650066> /Trapped /False >>
+endobj
+xref
+0 51
+0000000002 65535 f 
+0000000020 00000 n 
+0000000003 00000 f 
+0000000004 00000 f 
+0000000000 00000 f 
+0000001777 00000 n 
+0000001952 00000 n 
+0000002126 00000 n 
+0000002298 00000 n 
+0000002469 00000 n 
+0000003126 00000 n 
+0000000067 00000 n 
+0000002640 00000 n 
+0000013946 00000 n 
+0000002700 00000 n 
+0000002761 00000 n 
+0000002822 00000 n 
+0000002883 00000 n 
+0000009925 00000 n 
+0000005490 00000 n 
+0000002944 00000 n 
+0000003005 00000 n 
+0000003065 00000 n 
+0000014300 00000 n 
+0000001908 00000 n 
+0000003237 00000 n 
+0000014435 00000 n 
+0000003283 00000 n 
+0000003326 00000 n 
+0000004477 00000 n 
+0000003390 00000 n 
+0000003461 00000 n 
+0000004711 00000 n 
+0000005641 00000 n 
+0000005838 00000 n 
+0000008701 00000 n 
+0000006034 00000 n 
+0000006108 00000 n 
+0000008935 00000 n 
+0000010076 00000 n 
+0000010273 00000 n 
+0000012757 00000 n 
+0000010454 00000 n 
+0000010530 00000 n 
+0000012993 00000 n 
+0000014100 00000 n 
+0000014361 00000 n 
+0000014496 00000 n 
+0000014712 00000 n 
+0000014748 00000 n 
+0000014909 00000 n 
+trailer
+<< /Size 51 /Root 49 0 R /Info 50 0 R >>
+startxref
+15057
+%%EOF
diff --git a/testfiles/linktoc.pvt b/testfiles/linktoc.pvt
new file mode 100644
index 0000000..b52823f
--- /dev/null
+++ b/testfiles/linktoc.pvt
@@ -0,0 +1,26 @@
+\input{regression-test}
+\RequirePackage{pdfmanagement}
+\DeclareDocumentMetadata{uncompress}
+
+\documentclass{article}
+\usepackage{hyperref}
+\begin{document}
+
+\tableofcontents
+
+\hypersetup{linktoc=page}
+\listoffigures
+
+\hypersetup{linktoc=all}
+\listoftables
+
+\hypersetup{linktoc=blub}
+\section{abc}
+\begin{figure}
+  \centering
+  \caption{figure}
+\end{figure}
+\begin{table}
+  \caption{table}
+\end{table}
+\end{document}
\ No newline at end of file
diff --git a/testfiles/linktoc.tpf b/testfiles/linktoc.tpf
new file mode 100644
index 0000000..b60ff7f
--- /dev/null
+++ b/testfiles/linktoc.tpf
@@ -0,0 +1,347 @@
+%PDF-1.5
+%ÐÔÅØ
+1 0 obj
+<< /opacity1 <</ca 1/CA 1>>  >>
+endobj
+11 0 obj
+<<
+/Length 1103      
+>>
+stream
+/opacity1 gs
+/opacity1 gs
+/opacity1 gs
+BT
+/F19 9.9626 Tf 271.626 700.207 Td [(Figure)-333(1:)-445(\014gure)]TJ 3.418 -30.774 Td [(T)83(able)-333(1:)-444(table)]TJ/F29 14.3462 Tf -141.276 -29.888 Td [(Con)31(ten)31(ts)]TJ/F30 9.9626 Tf 0 -21.918 Td [(1)-925(ab)-32(c)-30684(1)]TJ/F29 14.3462 Tf 0 -32.945 Td [(List)-375(of)-375(Figures)]TJ/F19 9.9626 Tf 14.944 -21.821 Td [(1)-1800(\014gure)-1003(.)-500(.)-500(.)-500(.)-500(.)-499(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-1583(1)]TJ/F29 14.3462 Tf -14.944 -32.946 Td [(List)-375(of)-375(T)94(ables)]TJ/F19 9.9626 Tf 14.944 -21.821 Td [(1)-1800(table)-505(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-499(.)-500(.)-1584(1)]TJ/F29 14.3462 Tf -14.944 -32.946 Td [(1)-1125(ab)-31(c)]TJ/F19 9.9626 Tf 169.365 -335.893 Td [(1)]TJ
+ET
+endstream
+endobj
+5 0 obj
+<<
+/Type /Page
+/Contents 11 0 R
+/Resources 10 0 R
+/MediaBox [0 0 595.276 841.89]
+/Parent 23 0 R
+/Annots [ 6 0 R 7 0 R 8 0 R 9 0 R ]
+>>
+endobj
+6 0 obj
+<<
+/Type /Annot
+/Subtype /Link
+/Border [0 0 1] /H /I /C [0.701176 0.4 0.414118] 
+/Rect [132.772 616.631 167.053 625.542]
+/A << /S /GoTo /D (section.1) >>
+>>
+endobj
+7 0 obj
+<<
+/Type /Annot
+/Subtype /Link
+/Border [0 0 1] /H /I /C [0.701176 0.4 0.414118] 
+/Rect [471.502 561.864 478.476 570.277]
+/A << /S /GoTo /D (figure.1) >>
+>>
+endobj
+8 0 obj
+<<
+/Type /Annot
+/Subtype /Link
+/Border [0 0 1] /H /I /C [0.701176 0.4 0.414118] 
+/Rect [147.716 507.098 194.209 516.009]
+/A << /S /GoTo /D (table.1) >>
+>>
+endobj
+9 0 obj
+<<
+/Type /Annot
+/Subtype /Link
+/Border [0 0 1] /H /I /C [0.701176 0.4 0.414118] 
+/Rect [471.502 507.098 478.476 515.51]
+/A << /S /GoTo /D (table.1) >>
+>>
+endobj
+12 0 obj
+<<
+/D [5 0 R /XYZ 132.768 754.95 null]
+>>
+endobj
+14 0 obj
+<<
+/D [5 0 R /XYZ 315.241 712.162 null]
+>>
+endobj
+15 0 obj
+<<
+/D [5 0 R /XYZ 314.618 681.388 null]
+>>
+endobj
+16 0 obj
+<<
+/D [5 0 R /XYZ 133.768 649.508 null]
+>>
+endobj
+17 0 obj
+<<
+/D [5 0 R /XYZ 133.768 657.478 null]
+>>
+endobj
+20 0 obj
+<<
+/D [5 0 R /XYZ 133.768 602.614 null]
+>>
+endobj
+21 0 obj
+<<
+/D [5 0 R /XYZ 133.768 547.848 null]
+>>
+endobj
+22 0 obj
+<<
+/D [5 0 R /XYZ 133.768 493.081 null]
+>>
+endobj
+10 0 obj
+<<
+/ExtGState 1 0 R 
+/Font << /F19 13 0 R /F29 18 0 R /F30 19 0 R >>
+/ProcSet [ /PDF /Text ]
+>>
+endobj
+24 0 obj
+<< /S /GoTo /D (section.1) >>
+endobj
+26 0 obj
+(\376\377\000a\000b\000c)
+endobj
+27 0 obj
+[575 575 575 575 575 575 575 575 575 319.4 319.4 350 894.4 543.1 543.1 894.4 869.4 818.1 830.6 881.9 755.6 723.6 904.2 900 436.1 594.4 901.4 691.7 1091.7 900 863.9 786.1 863.9 862.5 638.9 800 884.7 869.4 1188.9 869.4 869.4 702.8 319.4 602.8 319.4 575 319.4 319.4 559 638.9 511.1]
+endobj
+28 0 obj
+[562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 312.5 312.5 342.6 875 531.2 531.2 875 849.5 799.8 812.5 862.3 738.4 707.2 884.3 879.6 419 581 880.8 675.9 1067.1 879.6 844.9 768.5 844.9 839.1 625 782.4 864.6 849.5 1162 849.5 849.5 687.5 312.5 581 312.5 562.5 312.5 312.5 546.9 625 500 625 513.3 343.7 562.5 625 312.5 343.7 593.7 312.5 937.5 625 562.5 625 593.7 459.5 443.8 437.5 625]
+endobj
+29 0 obj
+[555.6 555.6 833.3 833.3 277.8 305.6 500 500 500 500 500 750 444.4 500 722.2 777.8 500 902.8 1013.9 777.8 277.8 277.8 500 833.3 500 833.3 777.8 277.8 388.9 388.9 500 777.8 277.8 333.3 277.8 500 500 500 500 500 500 500 500 500 500 500 277.8 277.8 277.8 777.8 472.2 472.2 777.8 750 708.3 722.2 763.9 680.6 652.8 784.7 750 361.1 513.9 777.8 625 916.7 750 777.8 680.6 777.8 736.1 555.6 722.2 750 750 1027.8 750 750 611.1 277.8 500 277.8 500 277.8 277.8 500 555.6 444.4 555.6 444.4 305.6 500 555.6 277.8 305.6 527.8 277.8 833.3 555.6 500 555.6 527.8 391.7 394.4 388.9 555.6]
+endobj
+30 0 obj
+<<
+/Length1 1413
+/Length2 7523
+/Length3 0
+/Length 8936      
+>>
+[BINARY STREAM]
+endobj
+31 0 obj
+<<
+/Type /FontDescriptor
+/FontName /NIGLON+CMBX10
+/Flags 4
+/FontBBox [-56 -250 1164 750]
+/Ascent 694
+/CapHeight 686
+/Descent -194
+/ItalicAngle 0
+/StemV 114
+/XHeight 444
+/CharSet (/a/b/c/one)
+/FontFile 30 0 R
+>>
+endobj
+32 0 obj
+<<
+/Length1 1634
+/Length2 8622
+/Length3 0
+/Length 10256     
+>>
+[BINARY STREAM]
+endobj
+33 0 obj
+<<
+/Type /FontDescriptor
+/FontName /WRPZLI+CMBX12
+/Flags 4
+/FontBBox [-53 -251 1139 750]
+/Ascent 694
+/CapHeight 686
+/Descent -194
+/ItalicAngle 0
+/StemV 109
+/XHeight 444
+/CharSet (/C/F/L/T/a/b/c/e/f/g/i/l/n/o/one/r/s/t/u)
+/FontFile 32 0 R
+>>
+endobj
+34 0 obj
+<<
+/Length1 1578
+/Length2 10213
+/Length3 0
+/Length 11791     
+>>
+[BINARY STREAM]
+endobj
+35 0 obj
+<<
+/Type /FontDescriptor
+/FontName /NZQOTA+CMR10
+/Flags 4
+/FontBBox [-40 -250 1009 750]
+/Ascent 694
+/CapHeight 683
+/Descent -194
+/ItalicAngle 0
+/StemV 69
+/XHeight 431
+/CharSet (/F/T/a/b/colon/e/fi/g/i/l/one/period/r/t/u)
+/FontFile 34 0 R
+>>
+endobj
+19 0 obj
+<<
+/Type /Font
+/Subtype /Type1
+/BaseFont /NIGLON+CMBX10
+/FontDescriptor 31 0 R
+/FirstChar 49
+/LastChar 99
+/Widths 27 0 R
+>>
+endobj
+18 0 obj
+<<
+/Type /Font
+/Subtype /Type1
+/BaseFont /WRPZLI+CMBX12
+/FontDescriptor 33 0 R
+/FirstChar 49
+/LastChar 117
+/Widths 28 0 R
+>>
+endobj
+13 0 obj
+<<
+/Type /Font
+/Subtype /Type1
+/BaseFont /NZQOTA+CMR10
+/FontDescriptor 35 0 R
+/FirstChar 12
+/LastChar 117
+/Widths 29 0 R
+>>
+endobj
+23 0 obj
+<<
+/Type /Pages
+/Count 1
+/Kids [5 0 R]
+>>
+endobj
+36 0 obj
+<<
+/Type /Outlines
+/First 25 0 R
+/Last 25 0 R
+/Count 1
+>>
+endobj
+25 0 obj
+<<
+/Title 26 0 R
+/A 24 0 R
+/Parent 36 0 R
+>>
+endobj
+37 0 obj
+<<
+/Names [(Doc-Start) 16 0 R (figure.1) 14 0 R (page.1) 12 0 R (section*.1) 17 0 R (section*.2) 20 0 R (section*.3) 21 0 R]
+/Limits [(Doc-Start) (section*.3)]
+>>
+endobj
+38 0 obj
+<<
+/Names [(section.1) 22 0 R (table.1) 15 0 R]
+/Limits [(section.1) (table.1)]
+>>
+endobj
+39 0 obj
+<<
+/Kids [37 0 R 38 0 R]
+/Limits [(Doc-Start) (table.1)]
+>>
+endobj
+40 0 obj
+<<
+/Dests 39 0 R
+>>
+endobj
+41 0 obj
+<<
+/Type /Catalog
+/Pages 23 0 R
+/Outlines 36 0 R
+/Names 40 0 R
+/PageMode /UseOutlines/OpenAction [5 0 R /Fit]/PageLabels <</Nums[0<</S/D>>]>>
+>>
+endobj
+42 0 obj
+<<
+/Producer (pdfTeX)/Creator <FEFF004C006100540065005800200077006900740068002000680079007000650072007200650066>
+/Trapped /False
+>>
+endobj
+xref
+0 43
+0000000002 65535 f 
+0000000015 00000 n 
+0000000003 00000 f 
+0000000004 00000 f 
+0000000000 00000 f 
+0000001224 00000 n 
+0000001374 00000 n 
+0000001546 00000 n 
+0000001717 00000 n 
+0000001887 00000 n 
+0000002527 00000 n 
+0000000062 00000 n 
+0000002056 00000 n 
+0000036315 00000 n 
+0000002114 00000 n 
+0000002173 00000 n 
+0000002232 00000 n 
+0000002291 00000 n 
+0000036174 00000 n 
+0000036034 00000 n 
+0000002350 00000 n 
+0000002409 00000 n 
+0000002468 00000 n 
+0000036455 00000 n 
+0000002639 00000 n 
+0000036587 00000 n 
+0000002685 00000 n 
+0000002727 00000 n 
+0000003023 00000 n 
+0000003429 00000 n 
+0000004015 00000 n 
+0000013049 00000 n 
+0000013276 00000 n 
+0000023630 00000 n 
+0000023887 00000 n 
+0000035777 00000 n 
+0000036513 00000 n 
+0000036648 00000 n 
+0000036827 00000 n 
+0000036926 00000 n 
+0000037002 00000 n 
+0000037038 00000 n 
+0000037199 00000 n 
+trailer
+<< /Size 43
+/Root 41 0 R
+/Info 42 0 R
+ >>
+startxref
+37347
+%%EOF
diff --git a/testfiles/linktoc.xetex.tpf b/testfiles/linktoc.xetex.tpf
new file mode 100644
index 0000000..761dcd2
--- /dev/null
+++ b/testfiles/linktoc.xetex.tpf
@@ -0,0 +1,320 @@
+%PDF-1.5
+%äðíø
+15 0 obj
+<</Length 1825>>
+stream
+ q 1 0 0 1 72 769.89 cm 0 G 0 g 0 g 0 G BT /F1 9.9626 Tf 199.621 -69.788 Td[<00360042003b006d00600032>-333<0052002c>]TJ ET BT /F1 9.9626 Tf 243.238 -69.788 Td[<007d003b006d00600032>]TJ -40.194 -30.884 Td[<0068>83<001c002300480032>-332<0052002c>]TJ ET BT /F1 9.9626 Tf 242.615 -100.672 Td[<0069001c002300480032>]TJ ET BT /F3 14.3462 Tf 61.768 -130.721 Td[<002a0051004d>30<00690032004d>31<00690062>]TJ ET BT /F5 9.9626 Tf 61.768 -152.639 Td[<0052>-925<001c0023>-32<002b>]TJ ET BT /F5 9.9626 Tf 399.751 -152.639 Td[<0052>]TJ ET BT /F3 14.3462 Tf 61.768 -185.6 Td[<0047004200620069>-375<00510037>-375<00360042003b006d006000320062>]TJ /F1 9.9626 Tf 14.944 -21.831 Td[<0052>-1800<007d003b006d00600032>-1003<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>]TJ ET BT /F1 9.9626 Tf 400.498 -207.431 Td[<0052>]TJ ET BT /F3 14.3462 Tf 61.768 -240.393 Td[<0047004200620069>-375<00510037>-375<0068>93<001c0023004800320062>]TJ ET BT /F1 9.9626 Tf 76.712 -262.224 Td[<0052>-1800<0069001c002300480032>]TJ ET BT /F1 9.9626 Tf 126.265 -262.224 Td[<0058>-500<0058>-500<0058>-500<0058>-499<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>-500<0058>]TJ ET BT /F1 9.9626 Tf 400.498 -262.224 Td[<0052>]TJ ET BT /F3 14.3462 Tf 61.768 -295.185 Td[<0052>-1000<001c0023>-31<002b>]TJ ET BT /F1 9.9626 Tf 231.133 -630.635 Td[<0052>]TJ ET Q
+endstream
+endobj
+16 0 obj
+<</ExtGState 4 0 R/Font<</F1 5 0 R/F3 7 0 R/F5 9 0 R>>/ProcSet[/PDF/Text/ImageC/ImageB/ImageI]>>
+endobj
+11 0 obj
+<</Type/Annot/Border[0 0 1]/H/I/C[.701176 .4 .414118]/Subtype/Link/A<</S/GoTo/D(section.1)>>/Rect[132.772
+613.316 167.054 629.535]>>
+endobj
+12 0 obj
+<</Type/Annot/Border[0 0 1]/H/I/C[.701176 .4 .414118]/Subtype/Link/A<</S/GoTo/D(figure.1)>>/Rect[471.502
+558.573 478.476 574.683]>>
+endobj
+13 0 obj
+<</Type/Annot/Border[0 0 1]/H/I/C[.701176 .4 .414118]/Subtype/Link/A<</S/GoTo/D(table.1)>>/Rect[147.716
+503.781 194.212 519.89]>>
+endobj
+14 0 obj
+<</Type/Annot/Border[0 0 1]/H/I/C[.701176 .4 .414118]/Subtype/Link/A<</S/GoTo/D(table.1)>>/Rect[471.502
+503.781 478.476 519.89]>>
+endobj
+4 0 obj
+<</opacity1<</ca 1/CA 1>>>>
+endobj
+25 0 obj
+<</Names[(Doc-Start)17 0 R(figure.1)18 0 R(page.1)19 0 R(section*.1)20 0 R(section*.2)21 0 R(section*.3)22 0 R(section.1)23 0 R(table.1)24 0 R]>>
+endobj
+18 0 obj
+[3 0 R/XYZ 315.24 712.06 null]
+endobj
+17 0 obj
+[3 0 R/XYZ 133.77 649.18 null]
+endobj
+20 0 obj
+[3 0 R/XYZ 133.77 657.1 null]
+endobj
+21 0 obj
+[3 0 R/XYZ 133.77 602.22 null]
+endobj
+22 0 obj
+[3 0 R/XYZ 133.77 547.43 null]
+endobj
+19 0 obj
+[3 0 R/XYZ 132.77 754.95 null]
+endobj
+24 0 obj
+[3 0 R/XYZ 314.62 681.17 null]
+endobj
+23 0 obj
+[3 0 R/XYZ 133.77 492.53 null]
+endobj
+26 0 obj
+<</Dests 25 0 R>>
+endobj
+28 0 obj
+<</Title<feff006100620063>/A<</S/GoTo/D(section.1)>>/Parent 27 0 R>>
+endobj
+27 0 obj
+<</First 28 0 R/Last 28 0 R/Count 1>>
+endobj
+30 0 obj
+[11 0 R 12 0 R 13 0 R 14 0 R]
+endobj
+3 0 obj
+<</Resources 16 0 R/Type/Page/Parent 29 0 R/Contents[15 0 R]/Annots 30 0 R>>
+endobj
+29 0 obj
+<</Type/Pages/Count 1/Kids[3 0 R]/MediaBox[0 0 595.28 841.89]>>
+endobj
+2 0 obj
+<</Creator<feff004c006100540065005800200077006900740068002000680079007000650072007200650066>/Producer(xdvipdfmx)/CreationDate(D:20160520090000-00'00')>>
+endobj
+1 0 obj
+<</PageMode/UseOutlines/OpenAction[3 0 R/Fit]/PageLabels<</Nums[0<</S/D>>]>>/Names
+26 0 R/Outlines 27 0 R/Pages 29 0 R/Type/Catalog>>
+endobj
+31 0 obj
+<</Length 557>>
+stream
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CMapName /EXQIVM+LMRoman10-Regular-UTF16 def
+/CMapType 2 def
+/CIDSystemInfo <<
+  /Registry (Adobe)
+  /Ordering (UCS)
+  /Supplement 0
+>> def
+1 begincodespacerange
+<0000> <FFFF>
+endcodespacerange
+15 beginbfchar
+<001C> <0061>
+<0023> <0062>
+<002C> <003A>
+<0032> <0065>
+<0036> <0046>
+<003B> <0067>
+<0042> <0069>
+<0048> <006C>
+<0052> <0031>
+<0058> <002E>
+<0060> <0072>
+<0068> <0054>
+<0069> <0074>
+<006D> <0075>
+<007D> <00660069>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+endstream
+endobj
+32 0 obj
+<</Length 606>>
+stream
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CMapName /XUUPUX+LMRoman12-Bold-UTF16 def
+/CMapType 2 def
+/CIDSystemInfo <<
+  /Registry (Adobe)
+  /Ordering (UCS)
+  /Supplement 0
+>> def
+1 begincodespacerange
+<0000> <FFFF>
+endcodespacerange
+19 beginbfchar
+<001C> <0061>
+<0023> <0062>
+<002A> <0043>
+<002B> <0063>
+<0032> <0065>
+<0036> <0046>
+<0037> <0066>
+<003B> <0067>
+<0042> <0069>
+<0047> <004C>
+<0048> <006C>
+<004D> <006E>
+<0051> <006F>
+<0052> <0031>
+<0060> <0072>
+<0062> <0073>
+<0068> <0054>
+<0069> <0074>
+<006D> <0075>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+endstream
+endobj
+33 0 obj
+<</Length 395>>
+stream
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CMapName /POGXIQ+LMRoman10-Bold-UTF16 def
+/CMapType 2 def
+/CIDSystemInfo <<
+  /Registry (Adobe)
+  /Ordering (UCS)
+  /Supplement 0
+>> def
+1 begincodespacerange
+<0000> <FFFF>
+endcodespacerange
+4 beginbfchar
+<001C> <0061>
+<0023> <0062>
+<002B> <0063>
+<0052> <0031>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+endstream
+endobj
+35 0 obj
+<</Subtype/CIDFontType0C/Length 2122>>
+[BINARY STREAM]
+endobj
+36 0 obj
+[28[500]35[556]44[278]50[444]54[653]59[500]66[278]72[278]82[500]88[278]96[392]104[722
+389]109[556]125[556]]
+endobj
+37 0 obj
+<</Length 16>>
+[BINARY STREAM]
+endobj
+39 0 obj
+<</Subtype/CIDFontType0C/Length 2488>>
+[BINARY STREAM]
+endobj
+40 0 obj
+[28[547]35[625]42[813 500]50[513]54[707 344]59[563]66[313]71[676 313]77[625]81[563
+563]96[460]98[444]104[782 438]109[625]]
+endobj
+41 0 obj
+<</Length 14>>
+[BINARY STREAM]
+endobj
+43 0 obj
+<</Subtype/CIDFontType0C/Length 911>>
+[BINARY STREAM]
+endobj
+44 0 obj
+[28[559]35[639]43[511]82[575]]
+endobj
+45 0 obj
+<</Length 11>>
+[BINARY STREAM]
+endobj
+6 0 obj
+<</Type/Font/Subtype/CIDFontType0/BaseFont/EXQIVM+LMRoman10-Regular/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement
+0>>/FontDescriptor 34 0 R/DW 280/W 36 0 R>>
+endobj
+34 0 obj
+<</Type/FontDescriptor/Ascent 806/Descent -194/StemV 69/CapHeight 806/AvgWidth 549/FontBBox[-430
+-290 1417 1127]/ItalicAngle 0/Flags 6/Style<</Panose<000000000500000000000000>>>/FontName/EXQIVM+LMRoman10-Regular/FontFile3
+35 0 R/CIDSet 37 0 R>>
+endobj
+5 0 obj
+<</Type/Font/Subtype/Type0/BaseFont/EXQIVM+LMRoman10-Regular-Identity-H/Encoding/Identity-H/DescendantFonts[6 0 R]/ToUnicode
+31 0 R>>
+endobj
+8 0 obj
+<</Type/Font/Subtype/CIDFontType0/BaseFont/XUUPUX+LMRoman12-Bold/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement
+0>>/FontDescriptor 38 0 R/DW 280/W 40 0 R>>
+endobj
+38 0 obj
+<</Type/FontDescriptor/Ascent 806/Descent -194/StemV 109/CapHeight 806/AvgWidth 618/FontBBox[-476
+-289 1577 1137]/ItalicAngle 0/Flags 262150/Style<</Panose<000000000800000000000000>>>/FontName/XUUPUX+LMRoman12-Bold/FontFile3
+39 0 R/CIDSet 41 0 R>>
+endobj
+7 0 obj
+<</Type/Font/Subtype/Type0/BaseFont/XUUPUX+LMRoman12-Bold-Identity-H/Encoding/Identity-H/DescendantFonts[8 0 R]/ToUnicode
+32 0 R>>
+endobj
+10 0 obj
+<</Type/Font/Subtype/CIDFontType0/BaseFont/POGXIQ+LMRoman10-Bold/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement
+0>>/FontDescriptor 42 0 R/DW 280/W 44 0 R>>
+endobj
+42 0 obj
+<</Type/FontDescriptor/Ascent 806/Descent -194/StemV 114/CapHeight 806/AvgWidth 632/FontBBox[-486
+-295 1607 1133]/ItalicAngle 0/Flags 262150/Style<</Panose<000000000800000000000000>>>/FontName/POGXIQ+LMRoman10-Bold/FontFile3
+43 0 R/CIDSet 45 0 R>>
+endobj
+9 0 obj
+<</Type/Font/Subtype/Type0/BaseFont/POGXIQ+LMRoman10-Bold-Identity-H/Encoding/Identity-H/DescendantFonts[10 0 R]/ToUnicode
+33 0 R>>
+endobj
+xref
+0 46
+0000000000 65535 f 
+0000003732 00000 n 
+0000003564 00000 n 
+0000003392 00000 n 
+0000002593 00000 n 
+0000012276 00000 n 
+0000011826 00000 n 
+0000012875 00000 n 
+0000012425 00000 n 
+0000013472 00000 n 
+0000013021 00000 n 
+0000002004 00000 n 
+0000002153 00000 n 
+0000002301 00000 n 
+0000002447 00000 n 
+0000000015 00000 n 
+0000001891 00000 n 
+0000002845 00000 n 
+0000002798 00000 n 
+0000003032 00000 n 
+0000002892 00000 n 
+0000002938 00000 n 
+0000002985 00000 n 
+0000003126 00000 n 
+0000003079 00000 n 
+0000002636 00000 n 
+0000003173 00000 n 
+0000003292 00000 n 
+0000003207 00000 n 
+0000003484 00000 n 
+0000003346 00000 n 
+0000003881 00000 n 
+0000004488 00000 n 
+0000005144 00000 n 
+0000012015 00000 n 
+0000005589 00000 n 
+0000007784 00000 n 
+0000007908 00000 n 
+0000012611 00000 n 
+0000007973 00000 n 
+0000010534 00000 n 
+0000010673 00000 n 
+0000013208 00000 n 
+0000010736 00000 n 
+0000011719 00000 n 
+0000011766 00000 n 
+trailer
+<</ID[<ID-STRING><ID-STRING>]/Root
+1 0 R/Info 2 0 R/Size 46>>
+startxref
+13619
+%%EOF





More information about the latex3-commits mailing list.