summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-pdfpages.sty
blob: beaa91264def65c92a302f3c090256b67f335969 (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
%%
%% This is file `lwarp-pdfpages.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lwarp.dtx  (with options: `pdfpages')
%% This is a generated file.
%% Copyright 2016-2022 Brian Dunn
%% 
%% 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.
\LWR@ProvidesPackagePass{pdfpages}[2024-01-21]
\define@key{pdfpages}{fitpaper}[false]{}
\define@key{pdfpages}{landscape}[false]{}
\define@key{pdfpages}{openright}[false]{}
\define@key{pdfpages}{signature}{}
\define@key{pdfpages}{signature*}{}
\define@key{pdfpages}{booklet}[false]{}
\define@key{pdfpages}{rotateoversize}[false]{}
\define@key{pdfpages}{doublepages}[false]{}
\define@key{pdfpages}{doublepagestwist}[false]{}
\define@key{pdfpages}{doublepagestwistodd}[false]{}
\define@key{pdfpages}{doublepagestwist*}[false]{}
\define@key{pdfpages}{doublepagestwistodd*}[false]{}
\define@key{pdfpages}{duplicatepages}[2]{}
\define@key{pdfpages}{thread}[false]{}
\define@key{pdfpages}{threadname}{}
\define@key{pdfpages}{linkfit}{}
\define@key{pdfpages}{linktodoc}[false]{}
\define@key{pdfpages}{linktodocfit}{}
\define@key{pdfpages}{linkfilename}{}
\define@key{pdfpages}{survey}[false]{}
\define@key{pdfpages}{survey-nolink}[false]{}
\define@key{pdfpages}{newwindow}[false]{}
\xpretocmd{\AM@getpagecount}{\LWR@restoreorigformatting}{}{}
\newif\ifESO@texcoord

\newcommand{\ESO@HookIIBG}{}

\renewcommand{\AM@AddToShipoutPicture}{\g@addto@macro\ESO@HookIIBG}

\renewcommand{\ClearShipoutPicture}{}
\newcommand*{\LWR@esopic@newpage}{%
\ifdefvoid{\ESO@HookIIBG}%
{}%
{%
    \ifAM@link%
        \hypertarget{\AM@linkname.\AM@page}{}%
    \fi%
    \begingroup%
    \setlength{\unitlength}{1in}%
    \begin{picture}(8,10.5)%
    \ESO@HookIIBG%
    \end{picture}%
    \endgroup%
    \global\let\ESO@HookIIBG\@empty%
}
}
\VerifyCommand[lwarp][pdfpages]{\AM@output@i}{A962EC58215FABF2447E4ADEEDC3D3D5}

\xpatchcmd{\AM@output@i}
    {\clearpage}%
    {\LWR@esopic@newpage}
    {}
    {\LWR@patcherror{pdfpages}{AM@output-1}}

\xpatchcmd{\AM@output@i}
    {\clearpage}%
    {\LWR@esopic@newpage}
    {}
    {\LWR@patcherror{pdfpages}{AM@output-2}}

\xpatchcmd{\AM@output@i}
    {\newpage}
    {\LWR@esopic@newpage}
    {}
    {\LWR@patcherror{pdfpages}{AM@output-3}}
\xpretocmd{\includepdf}{%
    \begingroup%
    \setlength{\paperwidth}{\LWR@userspaperwidth}%
    \setlength{\paperheight}{\LWR@userspaperheight}%
}{}{}

\xapptocmd{\includepdf}{%
    \endgroup%
}{}{}

\xpretocmd{\includepdfmerge}{%
    \begingroup%
    \setlength{\paperwidth}{\LWR@userspaperwidth}%
    \setlength{\paperheight}{\LWR@userspaperheight}%
}{}{}

\xapptocmd{\includepdfmerge}{%
    \endgroup%
}{}{}
\renewcommand{\AM@hyper@begin@i}{}

\endinput
%%
%% End of file `lwarp-pdfpages.sty'.