summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/hyperref/hdvips.def
blob: 8f4b8b748e1198cb3cc90d0a857c762c28d1480c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
%%
%% This is file `hdvips.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% hyperref.dtx  (with options: `dvips')
%% 
%% File: hyperref.dtx Copyright 1995-2001 Sebastian Rahtz,
%% with portions written by David Carlisle and Heiko Oberdiek,
%% 2001-2012 Heiko Oberdiek.
%% 2016-2018 Oberdiek Package Suport Group
%%      https://github.com/ho-tex/hyperref/issues
%%
%% This file is part of the `Hyperref Bundle'.
%% -------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainer of this work is Heiko Oberdiek.
%%
%% The list of all files belonging to the `Hyperref Bundle' is
%% given in the file `manifest.txt'.
%%
\ProvidesFile{hdvips.def}
  [2018/02/06 v6.86b %
  Hyperref driver for dvips]
\Hy@VersionCheck{hdvips.def}
\providecommand*{\XR@ext}{pdf}
\let\Hy@raisedlink\ltx@empty
\def\literalps@out#1{\special{ps:SDict begin #1 end}}%
\def\headerps@out#1{\special{! #1}}%
\input{pdfmark.def}%
\ifx\@pdfproducer\relax
  \def\@pdfproducer{dvips + Distiller}%
\fi
\providecommand*\@pdfborder{0 0 1}
\providecommand*\@pdfborderstyle{}
\providecommand*\@pdfview{XYZ}
\providecommand*\@pdfviewparams{ H.V}
\def\Hy@BorderArrayPatch{BorderArrayPatch}
\g@addto@macro\Hy@FirstPageHook{%
  \headerps@out{%
    /DvipsToPDF{72.27 mul Resolution div} def%
    /PDFToDvips{72.27 div Resolution mul} def%
    /BPToDvips{72 div Resolution mul}def%
    /BorderArrayPatch{%
      [exch{%
        dup dup type/integertype eq exch type/realtype eq or%
        {BPToDvips}if%
      }forall]%
    }def%
    /HyperBorder {1 PDFToDvips} def%
    /H.V {pdf@hoff pdf@voff null} def%
    /H.B {/Rect[pdf@llx pdf@lly pdf@urx pdf@ury]} def%
    /H.S {%
      currentpoint %
      HyperBorder add /pdf@lly exch def %
      dup DvipsToPDF 72 add /pdf@hoff exch def %
      HyperBorder sub /pdf@llx exch def%
    } def%
    /H.L {%
      2 sub dup%
      /HyperBasePt exch def %
      PDFToDvips /HyperBaseDvips exch def %
      currentpoint %
      HyperBaseDvips sub /pdf@ury exch def%
      /pdf@urx exch def%
    } def%
    /H.A {%
      H.L %
      currentpoint exch pop %
      vsize 72 sub exch DvipsToPDF %
      HyperBasePt sub % baseline skip
      sub /pdf@voff exch def%
    } def%
    /H.R {%
      currentpoint %
      HyperBorder sub /pdf@ury exch def %
      HyperBorder add /pdf@urx exch def %
      currentpoint exch pop vsize 72 sub %
      exch DvipsToPDF sub /pdf@voff exch def%
    } def%
  }%
}
\AtBeginShipoutFirst{%
  \ifHy@setpagesize
    \begingroup
      \@ifundefined{stockwidth}{%
        \ifdim\paperwidth>\z@
          \ifdim\paperheight>\z@
            \special{papersize=\the\paperwidth,\the\paperheight}%
          \fi
        \fi
      }{%
        \ifdim\stockwidth>\z@
          \ifdim\stockheight>\z@
            \special{papersize=\the\stockwidth,\the\stockheight}%
          \fi
        \fi
      }%
    \endgroup
  \fi
  \Hy@DisableOption{setpagesize}%
}
\def\setpdflinkmargin#1{%
  \begingroup
    \setlength{\dimen@}{#1}%
    \literalps@out{%
      /HyperBorder{\strip@pt\dimen@\space PDFToDvips}def%
    }%
  \endgroup
}
\endinput
%%
%% End of file `hdvips.def'.