summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-08-01 21:19:05 +0000
committerKarl Berry <karl@freefriends.org>2019-08-01 21:19:05 +0000
commitd6a94ab8b2dcf457167bae540c50d81abcf0073c (patch)
tree857d80b28b8cd5d4f3b2322bab2b8e48bd998574 /Master/texmf-dist/tex
parentc558d7ae8e74aff4271e2cf246d0245cb5c9e1c3 (diff)
hypdvips (1aug19)
git-svn-id: svn://tug.org/texlive/trunk@51798 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty90
1 files changed, 71 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty b/Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty
index 921afc58cd2..acbebd490e9 100644
--- a/Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty
+++ b/Master/texmf-dist/tex/latex/hypdvips/hypdvips.sty
@@ -1,6 +1,6 @@
%%
%% This is file `hypdvips.sty',
-%% Copyright 2008-2014 Raimund Niedrist
+%% Copyright 2008-2019 Raimund Niedrist
%%
%% With portions written by Donald Arsenau, David Carlisle, Steven
%% Douglas Cochran, Toby Cubitt, Geoffrey Keating, Heiko Oberdiek,
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hypdvips}
- [2014/06/22 v3.02
+ [2019/07/31 v3.03
Hyperref extensions for use with dvips]
\@ifpackageloaded{hyperref}
{
@@ -407,7 +407,7 @@
\pp@PScatcodes
\pp@HeaderPS{
true setglobal
- /pp.globaldict 8 dict def
+ /pp.globaldict 10 dict def
pp.globaldict /pp.gsborderwarning true put
pp.globaldict /pp.starttime realtime put
pp.globaldict /pp.warncount 0 put
@@ -782,6 +782,7 @@
} def
/pp.appendef {pop pop} def
/pp.putefnametree {} def
+ /pp.adddest {} def
%
% substitute for /EMBED-pdfmark:
%
@@ -817,6 +818,36 @@
/pp.appendef {pp.subst.appendef} def
/pp.putefnametree {pp.subst.putefnametree} def
} def
+%
+% substitute for /DEST-pdfmark:
+%
+ /pp.subst.adddest
+ {
+ true setglobal
+ View length 1 add array
+ false setglobal
+ dup 0 pp.globaldict /pp.currentpage get put
+ dup 1 View putinterval
+ pp.globaldict /pp.dests get exch Dest exch put
+ mark
+ {Catalog}
+ <<
+ /Dests pp.globaldict /pp.dests get
+ >>
+ /PUT pp.backup.pdfmark
+ } def
+ /pp.substDESTpdfmark
+ {
+ true setglobal
+ SDict /pp.globaldict get /pp.dests 65534 dict put
+ SDict /pp.globaldict get /pp.currentpage 0 put
+ false setglobal
+ userdict /eop-hook
+ {
+ SDict /pp.globaldict get dup /pp.currentpage get 1 add /pp.currentpage exch put
+ } put
+ /pp.adddest {pp.subst.adddest} def
+ } def
/pp.strippt % arguments: string
{
(pt) search
@@ -1107,6 +1138,14 @@
} def
/pp.writebrokenlink % arguments: /ANN-pdfmark with /Rect as last entry and without /ANN
{
+ counttomark 1 sub index /_objdef eq
+ {
+ counttomark -2 roll dup wcheck
+ {readonly counttomark 2 roll}
+ {pop pop}
+ ifelse
+ }
+ if
counttomark 1 add copy
pop pp.currentrect
/ANN pp.backup.pdfmark
@@ -1227,6 +1266,7 @@
ifelse
}
if
+ pp.adddest
end
currentdict /pp.pdfmarkcontent undef
}
@@ -1708,10 +1748,9 @@
{
dup 0 get 47 eq % /
{
- 1 1 index length 1 sub getinterval
+ 1 1 index length 1 sub getinterval cvn
}
if
- cvn
}
if
}
@@ -1869,10 +1908,11 @@
if
}
if
- product (AFPL Ghostscript) eq
- product (GPL Ghostscript) eq or
+ product (Ghostscript) search
{
- pp.substEMBEDpdfmark
+ pop pop pop
+ revision 914 lt {pp.substEMBEDpdfmark} if
+ revision 914 eq {pp.substDESTpdfmark} if
/BorderArrayPatch
{
[ exch
@@ -1897,7 +1937,10 @@
forall ]
} def
}
- if
+ {
+ pop
+ }
+ ifelse
<<
/DeferredMediaSelection true
/PageSize [\strip@pt\paperwidth\space pp.ptToBP \strip@pt\paperheight\space pp.ptToBP]
@@ -2287,8 +2330,16 @@
{\def\Hy@numberline#1{#1\autodot~}}
\bookmarkdefinestyle{pp@bmstyle@empty}{italic=false,bold=false,color={},rellevel=0,keeplevel=true}
-\let\pp@backup@@startsection\@startsection
-\def\@startsection#1#2#3#4#5#6{%
+\@ifundefined{scr@startsection}
+ {
+ \let\pp@backup@@startsection\@startsection
+ \def\@startsection{\pp@startsection}
+ }
+ {
+ \let\pp@backup@@startsection\scr@startsection
+ \def\scr@startsection{\pp@startsection}
+ }
+\def\pp@startsection#1#2#3#4#5#6{%
\bookmarksetup{style=pp@bmstyle@empty}%
\ifx\@M#2%
\xdef\BKM@currentlevel{1}%
@@ -3072,7 +3123,7 @@
\csname l@#1\endcsname{#2}{#3}%
\or % section
\csname l@#1\endcsname{%
- \hyper@@link{}{\Hy@tocdestname}{#2}
+ \hyper@@link{}{\Hy@tocdestname}{#2}%
}{#3}%
\or % page
\def\Hy@temp{#3}%
@@ -3080,20 +3131,20 @@
\csname l@#1\endcsname{#2}{#3}%
\else
\csname l@#1\endcsname{{#2}}{%
- \hyper@@link{}{\Hy@tocdestname}{#3}
+ \hyper@@link{}{\Hy@tocdestname}{#3}%
}%
\fi
\else % all
\def\Hy@temp{#3}%
\ifx\Hy@temp\ltx@empty
\csname l@#1\endcsname{%
- \hyper@@link{}{\Hy@tocdestname}{#2}
+ \hyper@@link{}{\Hy@tocdestname}{#2}%
}{}%
\else
\csname l@#1\endcsname{%
- \hyper@@link{}{\Hy@tocdestname}{#2}
+ \hyper@@link{}{\Hy@tocdestname}{#2}%
}{%
- \hyper@@link{}{\Hy@tocdestname}{#3}
+ \hyper@@link{}{\Hy@tocdestname}{#3}%
}%
\fi
\fi
@@ -3582,7 +3633,8 @@
\fi%
\else
\pp@tabbutton%
- \fi%
+ \fi%
+ \normalsize\hskip1pt%
}
\edef\@tablenotecolor{\@linkcolor}
@@ -3598,7 +3650,7 @@
pdfmark=/DEST,%
linktype=anchor,%
View={/\@pdfview \@pdfviewparams},%
- Dest={\@currentHlabel.note: \pp@string}%
+ Dest={\@currentHlabel.note:\pp@string}%
}%
}%
\renewcommand{\tnote}[1]{%
@@ -3618,7 +3670,7 @@
BorderStyle=\@pdfborderstyle,%
Color=\@tablenotebordercolor,%
View={/\@pdfview \@pdfviewparams},%
- Dest={\@currentHlabel.note: \pp@string}%
+ Dest={\@currentHlabel.note:\pp@string}%
}%
\fi}}%
}