Debian Codegraph @

texmf-dist/tex/latex/hyperref/hdvips.def

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