summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pdfpages
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:02:08 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:02:08 +0000
commit70fb8feff4d21234cebf9df20ed61f6d0d46d9b1 (patch)
tree4cd0d985aab6316bbc6d0b064a54a6ea1f4e64d3 /Master/texmf-dist/tex/latex/pdfpages
parent78da9f1923091ad6519e0e89ac2c0bfb2a4e374d (diff)
pdfpages
git-svn-id: svn://tug.org/texlive/trunk@1181 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdfpages')
-rw-r--r--Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty1443
-rw-r--r--Master/texmf-dist/tex/latex/pdfpages/pppdftex.def108
-rw-r--r--Master/texmf-dist/tex/latex/pdfpages/ppvtex.def82
3 files changed, 1633 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty b/Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty
new file mode 100644
index 00000000000..3dd1d0cc26b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty
@@ -0,0 +1,1443 @@
+%%
+%% This is file `pdfpages.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% pdfpages.dtx (with options: `package')
+%%
+%% This is a package for PDFLaTeX, which makes it
+%% easy to insert pages of external PDF documents.
+%%
+%% This file is part of the pdfpages package.
+%%
+%% Copyright (C) 2001-2003 Andreas MATTHIAS.
+%%
+%% This program may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% 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.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%% Please send error reports and suggestions for improvements to
+%% Andreas MATTHIAS <amat@kabsi.at>.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{pdfpages}
+ [2004/01/31 v0.3e
+ Insert pages of external PDF documents (AM)]
+\def\AM@version{0.3e}
+\newif\ifAM@pkg@draft \AM@pkg@draftfalse
+\newif\ifAM@pkg@survey \AM@pkg@surveyfalse
+\DeclareOption{draft}{\AM@pkg@drafttrue}
+\DeclareOption{final}{\AM@pkg@draftfalse}
+\DeclareOption{enable-survey}{\AM@pkg@surveytrue}
+\DeclareOption{disable-survey}{\AM@pkg@surveyfalse}
+\ProcessOptions
+\def\AM@ifdriverlater{\@ifl@ter{def}}
+\def\AM@driver{pdftex}
+\begingroup
+\@ifundefined{pdfoutput}{%
+ \@ifundefined{OpMode}{%
+ \PackageError{pdfpages}
+ {You are using neither pdfTeX nor VTeX.\MessageBreak
+ Package pdfpages does not work with other\MessageBreak
+ TeX implementations}
+ {Please, change to pdfTeX or VTeX to use this
+ package!}%
+ \aftergroup\endinput
+ }{\gdef\AM@driver{vtex}}%
+}{}
+\endgroup
+\RequirePackage{ifthen, graphicx, calc, eso-pic}
+\input{pp\AM@driver.def}
+\ifx\AM@endinput\relax\endinput\fi
+\ifAM@pkg@survey
+ \let\AM@setanchor\AM@anchor@special
+ \RequirePackage{count1to}%
+ \AddToShipoutPicture{\AM@setanchor}%
+\fi
+\@ifpackagelater{eso-pic}{2001/07/20}
+ {\def\AM@AddToShipoutPicture{\AddToShipoutPicture*}%
+ \def\AM@ClearShipoutPicture{\relax}}
+ {\def\AM@AddToShipoutPicture{\AddToShipoutPicture}%
+ \def\AM@ClearShipoutPicture{\ClearShipoutPicture}}
+\newif\ifAM@openright\AM@openrightfalse
+\newif\ifAM@frame\AM@framefalse
+\newif\ifAM@landscape\AM@landscapefalse
+\newif\ifAM@turn\AM@turntrue
+\newif\ifAM@thread\AM@threadfalse
+\newif\ifAM@link\AM@linkfalse
+\newif\ifAM@linktodoc\AM@linktodocfalse
+\newif\ifAM@survey\AM@surveyfalse
+\newif\ifAM@surveynolink\AM@surveynolinkfalse
+\newif\ifAM@output\AM@outputtrue
+\newif\ifAM@column\AM@columnfalse
+\newif\ifAM@columnstrict\AM@columnstrictfalse
+\newif\ifAM@noautoscale\AM@noautoscalefalse
+\newif\ifAM@fitpaper\AM@fitpaperfalse
+\newif\ifAM@doublepages\AM@doublepagesfalse
+\newif\ifAM@doublepagestwist\AM@doublepagestwistfalse
+\newif\ifAM@doublepagestwistx\AM@doublepagestwistxfalse
+\newif\ifAM@doublepagestmp\AM@doublepagestmpfalse
+\newif\ifAM@doublepagestmpi\AM@doublepagestmpifalse
+\newif\ifAM@linkfilename\AM@linkfilenamefalse
+\newif\ifAM@signature\AM@signaturefalse
+\newif\ifAM@sigrotate\AM@sigrotatefalse
+\newif\ifAM@newwindow\AM@newwindowtrue
+\newif\ifAM@rescale\AM@rescalefalse
+\newif\ifAM@rotateoversize\AM@rotateoversizefalse
+\newif\ifAM@firstpage\AM@firstpagefalse
+\newif\ifAM@reflect\AM@reflectfalse
+\newif\ifAM@reflectall\AM@reflectallfalse
+\newcommand*{\AM@pagestemp}{1}
+\newcommand*{\AM@pagecommand}{\thispagestyle{empty}}
+\newcommand*{\AM@lscape@rot}{0}
+\newcommand*{\AM@threadname}{}\newcommand*{\AM@linkname}{}
+\newcommand*{\AM@linkname@option}{}
+\newcommand*{\AM@linkfit}{fit}\newcommand*{\AM@linktodocfit}{/Fit}
+\newcommand*{\threadinfodict}{}
+\newcommand*{\AM@toclist}{}\newcommand*{\AM@loflist}{}
+\newcommand*{\AM@signature}{}
+\newcommand*{\AM@ARBug@hook}{}
+\newcommand*{\AM@xrprefix}{}
+\newcommand*{\AM@picturecommand}{}\newcommand*{\AM@picturecommandstar}{}
+
+\newsavebox{\AM@pagebox}
+
+\newif\ifAM@thumbpdf
+\newif\ifAM@pdflscape
+\AtBeginDocument{%
+ \@ifpackageloaded{thumbpdf}{\AM@thumbpdftrue}{\AM@thumbpdffalse}%
+ \@ifpackageloaded{pdflscape}{\AM@pdflscapetrue}{\AM@pdflscapefalse}%
+ \ifAM@thumbpdf
+ \ifAM@pdflscape
+ \def\AM@setlscape{\PLS@Rotate{90}}%
+ \else
+ \PackageWarningNoLine{pdfpages}{%
+ You are using `thumbpdf.sty' but not\MessageBreak
+ `pdflscape.sty'.\MessageBreak
+ Please, insert `pdflscape.sty' in your document\MessageBreak
+ to get a pleasant PDF document with thumbs}%
+ \fi
+ \fi
+}
+\newif\ifAM@integer
+\newcommand{\AM@checkinteger}{}
+\def\AM@checkinteger#1{%
+ \ifcat _\ifnum9<1#1_\else A\fi
+ \AM@integertrue
+ \else
+ \AM@integerfalse
+ \fi
+}
+\newcommand*{\AM@findfile@i}[2]{%
+ \let\AM@currentdocname\relax
+ \IfFileExists{#1.#2}{\edef\AM@currentdocname{#1.#2}}{%
+ \IfFileExists{#1}{\edef\AM@currentdocname{#1}}{%
+ \ifx\Ginput@path\@undefined\else
+ \expandafter\@tfor\expandafter\AM@dir\expandafter
+ :\expandafter=\Ginput@path\do{%
+ \IfFileExists{\AM@dir#1.#2}{%
+ \ifx\AM@currentdocname\relax
+ \edef\AM@currentdocname{\AM@dir#1.#2}%
+ \fi
+ }{%
+ \IfFileExists{\AM@dir#1}{%
+ \ifx\AM@currentdocname\relax
+ \edef\AM@currentdocname{\AM@dir#1}%
+ \fi
+ }%
+ }%
+ }% \@tfor
+ \fi
+ }%
+ }%
+}
+\newcommand*{\AM@findfile@ii}[1]{%
+ \ifx\AM@currentdocname\relax
+ \PackageError{pdfpages}{Cannot find file `#1'}{}%
+ \fi
+}
+\newcommand*{\includepdfset}[1]{%
+ \AM@split@options{pdfpages}{#1}%
+ \edef\AM@temp{{pdfpages}{\the\@temptokena}}%
+ \expandafter\setkeys\AM@temp
+}
+\newcommand*{\includepdf}[2][]{%
+ \begingroup
+ \let\AM@threadname\relax
+ \AM@split@options{pdfpages}{#1}%
+ \edef\AM@temp{{pdfpages}{\the\@temptokena}}%
+ \expandafter\setkeys\AM@temp
+ \ifthenelse{\boolean{AM@pkg@draft} \and \boolean{AM@survey}}{%
+ \let\AM@currentdocname\relax
+ \renewcommand\includegraphics[2][]{Survey in draft-mode}%
+ \def\AM@pagecount{0}%
+ }{%
+ \AM@findfile{#2}%
+ \if\AM@threadname\relax
+ \def\AM@threadname{\AM@currentdocname}%
+ \fi
+ }%
+ \ifAM@survey
+ \def\AM@pagestemp{}%
+ \@tempcnta=0
+ \def\foo{%
+ \@ifundefined{r@\AM@xrprefix pdfpages@page\the\@tempcnta}%
+ {\let\foo\relax}
+ {\expandafter\ifx\expandafter\\\AM@pagestemp\\
+ \edef\AM@pagestemp{%
+ \AM@pageref{\AM@xrprefix pdfpages@page\the\@tempcnta}}%
+ \else
+ \edef\AM@pagestemp{\AM@pagestemp,%
+ \AM@pageref{\AM@xrprefix pdfpages@page\the\@tempcnta}}%
+ \fi
+ \advance\@tempcnta 1\relax
+ }%
+ \foo
+ }%
+ \foo
+ \expandafter\ifx\expandafter\\\AM@pagestemp\\
+ \def\AM@pagestemp{1}%
+ \fi
+ \fi
+ \ifAM@output
+ \expandafter\AM@readlist\expandafter{\AM@pagestemp}%
+ \AM@output{#1}%
+ \fi
+ \AM@CheckAtEnd
+ \endgroup
+ \AM@ClearShipoutPicture
+}
+\newcommand*{\includepdfmerge}[2][]{%
+ \begingroup
+ \let\AM@currentdocname\relax
+ \AM@readlist{#2}%
+ \AM@split@options{pdfpages}{#1}%
+ \edef\AM@temp{{pdfpages}{\the\@temptokena}}%
+ \expandafter\setkeys\AM@temp
+ \AM@output{#1}%
+ \AM@CheckAtEnd
+ \endgroup
+ \AM@ClearShipoutPicture
+}
+\newcommand{\AM@CheckAtEnd}{%
+ \ifx\@empty\AM@toclist\else
+ \PackageWarning{pdfpages}{%
+ There's something wrong with the entries\MessageBreak
+ of `addtotoc'. Not all entries were\MessageBreak
+ processed. Check `addtotoc'}%
+ \fi
+ \ifx\@empty\AM@loflist\else
+ \PackageWarning{pdfpages}{%
+ There's something wrong with the entries\MessageBreak
+ of `addtolist'. Not all entries were\MessageBreak
+ processed. Check `addtolist'}%
+ \fi
+}
+\newcommand{\AM@output}[1]{%
+ \c@totalnumber=0
+ \if@twocolumn\let\AM@twocolumn\relax \onecolumn \fi
+ \@ifundefined{AM@xnup}
+ {\def\AM@xnup{\@ne}\def\AM@ynup{\@ne}%
+ \def\AM@xnupminusi{\z@}\def\AM@ynupminusi{\z@}}{}%
+ \@ifundefined{AM@deltax}
+ {\def\AM@deltax{-\fboxrule}\def\AM@deltay{-\fboxrule}}{}%
+ \@ifundefined{AM@xoffset}
+ {\def\AM@xoffset{\z@}\def\AM@yoffset{\z@}}{}%
+ \def\AM@xpos{\z@}\def\AM@ypos{\z@}%
+ \ifAM@pkg@draft \setkeys{Gin}{draft=true}%
+ \else \setkeys{Gin}{draft=false}%
+ \fi
+ \ifthenelse{\boolean{AM@pkg@draft} \and \boolean{AM@survey}}
+ {}{\AM@getpagecount}
+ \ifthenelse{\boolean{AM@landscape}}
+ {\def\AM@lscape@rot{90}%
+ \@ifundefined{AM@shortnupsyntax}{}
+ {\let\AM@temp\AM@xnup
+ \let\AM@xnup\AM@ynup
+ \let\AM@ynup\AM@temp}%
+ }{}%
+ \AM@setphantom
+ \ifthenelse{\boolean{AM@openright}}
+ {\AM@openright}{}%
+ \ifx\AM@signature\@empty\AM@filluppagelist
+ \else\AM@prepare@signature\AM@signaturetrue\AM@turnfalse\fi
+ \@tempcnta=\AM@xnup\relax \advance\@tempcnta\m@ne
+ \edef\AM@xnupminusi{\the\@tempcnta}%
+ \@tempcnta=\AM@ynup\relax \advance\@tempcnta\m@ne
+ \edef\AM@ynupminusi{\the\@tempcnta}%
+ \ifthenelse{\boolean{AM@column}%
+ \and\not\boolean{AM@columnstrict}}
+ {\AM@getlastn{\AM@doclist}{\AM@nup}%
+ \edef\AM@lastndocs{\AM@lastnitems}%
+ \AM@getlastn{\AM@pagelist}{\AM@nup}%
+ \edef\AM@lastnpages{\AM@lastnitems}%
+ \AM@resort
+ \AM@count{\AM@pagelist}%
+ \expandafter\ifx\expandafter\\\AM@pagelist\\%
+ \edef\AM@pagelist{\AM@resortedpagelist}%
+ \edef\AM@doclist{\AM@resorteddoclist}%
+ \else
+ \edef\AM@pagelist{\AM@pagelist,\AM@resortedpagelist}%
+ \edef\AM@doclist{\AM@doclist,\AM@resorteddoclist}%
+ \fi}{}%
+ \ifthenelse{\boolean{AM@frame}}
+ {\let\AM@fbox\fbox}
+ {\let\AM@fbox\relax
+ \setlength{\fboxrule}{\z@}}%
+ \ifthenelse{\boolean{AM@reflect}}
+ {\let\AM@reflectbox\reflectbox}
+ {\let\AM@reflectbox\relax}%
+\setbox\AM@pagebox\null
+ \ifthenelse{\boolean{AM@column}}
+ {\def\AM@xnupi{\@ne}%
+ \def\AM@ynupi{\z@}}
+ {\def\AM@xnupi{\z@}%
+ \def\AM@ynupi{\@ne}}%
+ \AM@firstpagetrue
+ \setlength{\fboxsep}{\z@}%
+ \@ifundefined{AM@pagetemplate}
+ {\AM@readfirst{\AM@pagelist}%
+ \edef\AM@page{\the\toks@}}
+ {\edef\AM@page{\AM@pagetemplate}}%
+ \AM@readfirst{\AM@doclist}%
+ \edef\AM@docname{\the\toks@}%
+ \newpage
+ \AM@isphantom
+ \ifAM@noautoscale
+ \def\AM@globalscale{1}%
+ \else
+ \AM@split@options{Gin@noscale}{#1}%
+ \let\AM@filelist@save\@filelist
+ \setbox\@tempboxa=\hbox{%
+ \expandafter\includegraphics\expandafter[\the\@temptokena,
+ page=\AM@page, angle=\AM@lscape@rot]{\AM@docname}}%
+ \ifthenelse{\boolean{AM@fitpaper}}
+ {\setlength{\AM@pagewidth}{\the\wd\@tempboxa}%
+ \setlength{\AM@pageheight}{\the\ht\@tempboxa}%
+ \setlength{\paperwidth}{\the\wd\@tempboxa}%
+ \setlength{\paperheight}{\the\ht\@tempboxa}%
+ \AM@fitpaper@special
+ \AM@setpagedimen
+ \@ifundefined{stockwidth}{}{%
+ \setlength{\stockwidth}{\AM@pagewidth}%
+ \setlength{\stockheight}{\AM@pageheight}%
+ \setlength{\trimtop}{0pt}%
+ \setlength{\trimedge}{0pt}}%
+ }{}%
+ \ifdim\AM@pagewidth=\z@
+ \AM@pagewidth=210mm
+ \PackageWarningNoLine{pdfpages}{%
+ Erroneous page width of 0.0pt is corrected}%
+ \fi
+ \ifdim\AM@pageheight=\z@
+ \AM@pageheight=297mm
+ \PackageWarningNoLine{pdfpages}{%
+ Erroneous page height of 0.0pt is corrected}%
+ \fi
+ \ifdim\paperwidth=\z@
+ \let\paperwidth\AM@pagewidth
+ \fi
+ \ifdim\paperheight=\z@
+ \let\paperheight\AM@pageheight
+ \fi
+ \def\AM@xscale{%
+ (\paperwidth - \tw@\fboxrule*\AM@xnup
+ - \AM@deltax * \AM@xnupminusi) /
+ (\AM@xnup * \real{\strip@pt\wd\@tempboxa})
+ }%
+ \setlength{\@tempdima}{\AM@xscale}%
+ \edef\AM@xscale{\strip@pt\@tempdima}%
+ \setlength{\@tempdimb}{\ht\@tempboxa + \dp\@tempboxa}%
+ \def\AM@yscale{
+ (\paperheight - \tw@\fboxrule*\AM@ynup
+ - \AM@deltay *\AM@ynupminusi) /
+ (\AM@ynup * \real{\strip@pt\@tempdimb})
+ }%
+ \setlength{\@tempdima}{\AM@yscale}%
+ \edef\AM@yscale{\strip@pt\@tempdima}%
+ \@tempdima=\AM@xscale\p@
+ \@tempdimb=\AM@yscale\p@
+ \ifdim\@tempdima<\@tempdimb
+ \let\AM@globalscale\AM@xscale
+ \else
+ \let\AM@globalscale\AM@yscale
+ \fi
+ \fi
+ \let\AM@filelist@save\@filelist
+ \AM@split@options{Gin}{#1}%
+ \setbox\@tempboxa=\hbox{%
+ \expandafter\includegraphics\expandafter[\the\@temptokena,
+ page=\AM@page, scale=\AM@globalscale,
+ angle=\AM@lscape@rot]{\AM@docname}}%
+ \let\@filelist\AM@filelist@save
+ \edef\AM@templatewidth{\the\wd\@tempboxa}%
+ \setlength{\@tempdima}{\the\ht\@tempboxa + \the\dp\@tempboxa}%
+ \edef\AM@templateheight{\the\@tempdima}%
+ \setlength{\@tempdimb}{\ht\@tempboxa + \dp\@tempboxa}%
+ \def\AM@xmargin{%
+ (\paperwidth - (\wd\@tempboxa+\tw@\fboxrule)*\AM@xnup
+ - \AM@deltax * \AM@xnupminusi) * \real{.5}%
+ }%
+ \def\AM@ymargin{%
+ (\paperheight - (\@tempdimb+\tw@\fboxrule)*\AM@ynup
+ - \AM@deltay * \AM@ynupminusi) * \real{.5}%
+ }%
+ \setlength{\@tempdima}{\AM@xmargin}%
+ \edef\AM@xmargin{\the\@tempdima}%
+ \setlength{\@tempdima}{\AM@ymargin}%
+ \edef\AM@ymargin{\the\@tempdima}%
+ \ifthenelse{\boolean{AM@landscape}}
+ {\edef\AM@temp{\AM@xnup}%
+ \edef\AM@xnup{\AM@ynup}%
+ \edef\AM@ynup{\AM@temp}}
+ {}%
+ \ifAM@signature
+ \ifAM@landscape\AM@sigrotatefalse\else\AM@sigrotatetrue\fi
+ \fi
+ \setboolean{AM@endoflist}{false}%
+ \whiledo{\not\boolean{AM@endoflist}}{%
+ \AM@getfirst{\AM@pagelist}%
+ \edef\AM@page{\the\toks@}%
+ \AM@isphantom
+ \@tempcnta=\AM@page\relax
+ \edef\AM@linktodoc@page{\the\@tempcnta}%
+ \advance\@tempcnta\m@ne
+ \edef\AM@linktodoc@page@m@ne{\the\@tempcnta}%
+ \AM@getfirst{\AM@doclist}%
+ \edef\AM@docname{\the\toks@}%
+ \ifAM@linkfilename
+ \else
+ \let\AM@linkfilename\AM@docname
+ \fi
+ \ifx\@empty\AM@linkname@option \edef\AM@linkname{\the\toks@}%
+ \else \edef\AM@linkname{\AM@linkname@option} \fi
+ \ifthenelse{\boolean{AM@column}}
+ {\@tempcnta=\AM@ynupi\relax
+ \@tempcntb=\AM@ynup\relax
+ \advance\@tempcnta\@ne
+ \ifnum\@tempcnta>\@tempcntb
+ \@tempcnta=\@ne
+ \@tempcntb=\AM@xnupi\relax
+ \advance\@tempcntb\@ne
+ \edef\AM@xnupi{\the\@tempcntb}%
+ \fi
+ \edef\AM@ynupi{\the\@tempcnta}%
+ \@tempcnta=\AM@xnupi\relax
+ \@tempcntb=\AM@xnup\relax
+ \ifnum\@tempcnta>\@tempcntb
+ \def\AM@xnupi{\@ne}%
+ \fi
+ }
+ {\@tempcnta=\AM@xnupi\relax
+ \@tempcntb=\AM@xnup\relax
+ \advance\@tempcnta\@ne
+ \ifnum\@tempcnta>\@tempcntb
+ \@tempcnta=\@ne
+ \@tempcntb=\AM@ynupi\relax
+ \advance\@tempcntb\@ne
+ \edef\AM@ynupi{\the\@tempcntb}%
+ \fi
+ \edef\AM@xnupi{\the\@tempcnta}%
+ \@tempcnta=\AM@ynupi\relax
+ \@tempcntb=\AM@ynup\relax
+ \ifnum\@tempcnta>\@tempcntb
+ \def\AM@ynupi{\@ne}%
+ \fi
+ }%
+ \setbox\@tempboxa=\hbox{%
+ \expandafter\includegraphics\expandafter[\the\@temptokena,
+ page=\AM@page, scale=\AM@globalscale,
+ angle=\AM@lscape@rot]{\AM@docname}}%
+ \edef\AM@localwd{\the\wd\@tempboxa}%
+ \setlength{\@tempdima}{\the\ht\@tempboxa + \the\dp\@tempboxa}%
+ \edef\AM@localht{\the\@tempdima}%
+ \AM@rescalefalse
+ \ifdim\AM@localwd=\AM@templatewidth \else \AM@rescaletrue \fi
+ \ifdim\AM@localht=\AM@templateheight \else \AM@rescaletrue \fi
+ \def\AM@localxoff{\z@}%
+ \def\AM@localyoff{\z@}%
+ \def\AM@rotateoversize{0}%
+ \def\AM@localscale{\p@}%
+ \ifAM@rescale
+ \ifthenelse{\lengthtest{\AM@localwd<\AM@templatewidth} \and
+ \lengthtest{\AM@localht<\AM@templateheight}}{%
+ \setlength{\@tempdima}{(\AM@templatewidth - \AM@localwd)
+ * \real{.5}}%
+ \edef\AM@localxoff{\the\@tempdima}%
+ \setlength{\@tempdima}{(\AM@templateheight - \AM@localht)
+ * \real{.5}}%
+ \edef\AM@localyoff{\the\@tempdima}%
+ }{%
+ \ifAM@rotateoversize
+ \def\AM@rotateoversize{90}%
+ \let\AM@filelist@save\@filelist
+ \setbox\@tempboxa=\hbox{%
+ \expandafter\includegraphics\expandafter
+ [\the\@temptokena, page=\AM@page,
+ scale=\AM@globalscale,
+ angle=\AM@lscape@rot, angle=90]{\AM@docname}}%
+ \let\@filelist\AM@filelist@save
+ \edef\AM@localwd{\the\wd\@tempboxa}%
+ \setlength{\@tempdima}{\the\ht\@tempboxa + \the\dp\@tempboxa}%
+ \edef\AM@localht{\the\@tempdima}%
+ \fi
+ \setlength{\@tempdima}
+ {\p@ * \ratio{\AM@templatewidth}{\AM@localwd}}%
+ \edef\AM@localxscale{\the\@tempdima}%
+ \setlength{\@tempdima}
+ {\p@ * \ratio{\AM@templateheight}{\AM@localht}}%
+ \edef\AM@localyscale{\the\@tempdima}%
+ \ifdim\AM@localxscale<\AM@localyscale
+ \let\AM@localscale\AM@localxscale
+ \setlength{\@tempdima}{\AM@localxscale}%
+ \setlength{\@tempdima}{(\AM@templateheight -
+ \AM@localht * \real{\strip@pt\@tempdima}) * \real{.5}}%
+ \edef\AM@localyoff{\the\@tempdima}%
+ \else
+ \let\AM@localscale\AM@localyscale
+ \setlength{\@tempdima}{\AM@localyscale}%
+ \setlength{\@tempdima}{(\AM@templatewidth -
+ \AM@localwd * \real{\strip@pt\@tempdima}) * \real{.5}}%
+ \edef\AM@localxoff{\the\@tempdima}%
+ \fi
+ }%
+ \fi
+ \setlength{\@tempdima}{\AM@localscale}%
+ \edef\AM@localscale{\strip@pt\@tempdima}%
+ \let\AM@filelist@save\@filelist
+ \AM@split@options{Gin}{#1}%
+ \setbox\@tempboxa=\hbox{%
+ \expandafter\includegraphics\expandafter[\the\@temptokena,
+ page=\AM@page, scale=\AM@globalscale,
+ angle=\AM@lscape@rot]{\AM@docname}}%
+ \let\@filelist\AM@filelist@save
+ \setlength{\@tempdimc}{\ht\@tempboxa + \dp\@tempboxa}%
+ \def\AM@add{+}%
+ \if@twoside\ifodd\c@page\else\def\AM@add{-}\fi\fi
+ \setlength{\@tempdimb}{\ht\@tempboxa + \dp\@tempboxa}%
+ \ifthenelse{\boolean{AM@landscape}}
+ {\def\AM@xpos{%
+ \AM@xmargin \AM@add\AM@xoffset + \AM@localxoff +
+ (\AM@templatewidth + \AM@deltax + \tw@\fboxrule) *
+ (\AM@ynupi - 1)
+ }%
+ \def\AM@ypos{%
+ \AM@ymargin + \AM@yoffset + \AM@localyoff +
+ (\AM@templateheight + \AM@deltay + \tw@\fboxrule) *
+ (\AM@xnupi - 1)
+ }%
+ }
+ {\def\AM@xpos{%
+ \AM@xmargin \AM@add\AM@xoffset + \AM@localxoff +
+ (\AM@templatewidth + \AM@deltax + \tw@\fboxrule) *
+ (\AM@xnupi - 1)
+ }%
+ \def\AM@ypos{%
+ \AM@ymargin + \AM@yoffset + \AM@localyoff +
+ (\AM@templateheight + \AM@deltay + \tw@\fboxrule) *
+ (\AM@ynup-\AM@ynupi)
+ }%
+ }%
+ \setlength{\@tempdima}{\AM@xpos}%
+ \edef\AM@xpos{\strip@pt\@tempdima}%
+ \setlength{\@tempdima}{\AM@ypos}%
+ \edef\AM@ypos{\strip@pt\@tempdima}%
+ \setlength{\fboxsep}{\z@}%
+ \def\AM@region{region}%
+ \ifx\AM@linkfit\AM@region
+ \setlength{\@tempdima}{\the\ht\@tempboxa + \the\dp\@tempboxa}%
+ \edef\AM@linkfit{fitr width\the\wd\@tempboxa\space
+ height0pt depth\the\@tempdima}%
+ \fi
+ \ifAM@phantompage
+ \def\AM@shippage{}%
+ \else
+ \AM@split@options{Gin}{#1}%
+ \edef\AM@shippage{%
+ \noexpand\put(\AM@xpos,\AM@ypos){%
+ \noexpand\raisebox{\dp\@tempboxa}{%
+ \noexpand\raise \ht\@tempboxa \hbox{\AM@hyper@begin@i}%
+ \AM@hyper@begin@ii\noexpand\AM@fbox{%
+ \noexpand\AM@ARBug@hook
+ \noexpand\AM@reflectbox{%
+ \noexpand\includegraphics[\the\@temptokena,
+ page=\AM@page, scale=\AM@globalscale,
+ scale=\AM@localscale,
+ \ifAM@sigrotate angle=180,\fi
+ \ifAM@doublepagestwist\ifAM@doublepagestmp
+ angle=180,\fi\fi
+ angle=\AM@rotateoversize,
+ angle=\AM@lscape@rot]{\AM@docname}}}%
+ \AM@hyper@end}}%
+ }%
+ \fi
+ \ifAM@doublepagestwist
+ \ifAM@doublepagestmpi
+ \ifAM@doublepagestwistx\AM@doublepagestmpifalse\fi
+ \ifAM@doublepagestmp\AM@doublepagestmpfalse
+ \else\AM@doublepagestmptrue\fi
+ \else\AM@doublepagestmpitrue\fi
+ \fi
+ \AM@AddToShipoutPicture{\setlength{\unitlength}{\p@}%
+ \global\let\AM@filelist@save\@filelist}%
+ \ifAM@reflectall
+ \begin{lrbox}{\AM@pagebox}
+ \global\let\AM@filelist@save\@filelist
+ \usebox{\AM@pagebox}\AM@shippage
+ \global\let\@filelist\AM@filelist@save
+ \end{lrbox}
+ \else
+ \expandafter\AM@AddToShipoutPicture\expandafter{%
+ \AM@shippage
+ \global\let\@filelist\AM@filelist@save
+ }%
+ \fi
+ \AM@toclof{\AM@page}%
+ \ifnum\AM@xnupi=\AM@xnup\relax
+ \ifnum\AM@ynupi=\AM@ynup\relax
+ \begingroup\AM@pagecommand\endgroup
+ \hskip\z@
+ \ifthenelse{\boolean{AM@turn}}
+ {\ifthenelse{\boolean{AM@landscape}}
+ {\AM@setlscape}{}}
+ {}%
+ \AM@AddToShipoutPicture{\begingroup\AM@picturecommand\endgroup}%
+ \ifAM@firstpage
+ \AM@AddToShipoutPicture{%
+ \begingroup\AM@picturecommandstar\endgroup}%
+ \AM@firstpagefalse
+ \fi
+ \ifAM@reflectall
+ \AM@AddToShipoutPicture{%
+ \hskip\AM@pagewidth
+ \reflectbox{\usebox\AM@pagebox}%
+ \global\let\@filelist\AM@filelist@save
+ }%
+ \AM@ClearShipoutPicture
+ \fi
+ \newpage
+ \ifAM@reflectall \setbox\AM@pagebox\null \fi
+ \ifAM@pdflscape\PLS@Rotate{0}\fi
+ \AM@ClearShipoutPicture
+ \ifAM@signature
+ \ifAM@sigrotate\AM@sigrotatefalse\else\AM@sigrotatetrue\fi
+ \fi
+ \fi
+ \fi
+ }% whiledo
+ \ifx\AM@twocolumn\relax\twocolumn\fi
+}% AM@output
+\newif\ifAM@defaultone
+\newcommand*{\AM@readlist}[1]{%
+ \AM@defaultonefalse
+ \def\AM@pagelist{}%
+ \def\AM@doclist{}%
+ \AM@readlisti#1,\END,
+ \ifAM@defaultone\AM@append{1}\fi
+ \edef\AM@doclist{\expandafter\@gobble\AM@doclist}%
+ \edef\AM@pagelist{\expandafter\@gobble\AM@pagelist}%
+}
+\newcommand{\AM@readlisti}{}
+\def\AM@readlisti#1,{%
+ \ifx\AM@currentdocname\relax
+ \else
+ \AM@getpagecount
+ \fi
+ \def\AM@temp{#1}%
+ \ifx\END#1
+ \else
+ \AM@checkrange#1-\END
+ \expandafter\AM@readlisti
+ \fi
+}
+\newcommand{\AM@checkrange}{}
+\def\AM@checkrange#1-#2\END{%
+ \edef\AM@tempi{\AM@trim@space{#1}}%
+ \ifx\\#2\\%
+ \AM@checkinteger{\AM@tempi}%
+ \ifAM@integer
+ \AM@checkpagenumber{\AM@tempi}%
+ \AM@append{\AM@tempi}%
+ \else
+ \expandafter\ifx\expandafter\\\AM@tempi\\\AM@append{}%
+ \else\AM@setnewdocname{\AM@tempi}\fi
+ \fi
+ \else
+ \expandafter\ifx\expandafter\\\AM@tempi\\%
+ \@tempcnta=1\relax
+ \AM@checklast#2\END
+ \else
+ \def\AM@cmp{last}%
+ \ifx\AM@cmp\AM@tempi
+ \@tempcnta=\AM@pagecount\relax
+ \AM@checklast#2\END
+ \else
+ \AM@checkinteger{\AM@tempi}%
+ \ifAM@integer
+ \@tempcnta=\AM@tempi\relax
+ \AM@checkpagenumber{\the\@tempcnta}%
+ \AM@checklast#2\END
+ \else
+ \AM@setnewdocname{\AM@temp}%
+ \fi
+ \fi
+ \fi
+ \fi
+}
+\newcommand{\AM@checklast}{}
+\def\AM@checklast#1-\END{%
+ \edef\AM@tempii{\AM@trim@space{#1}}%
+ \expandafter\ifx\expandafter\\\AM@tempii\\
+ \@tempcntb=\AM@pagecount\relax
+ \advance\@tempcntb\@ne
+ \whiledo{\@tempcnta<\@tempcntb}{%
+ \AM@append{\the\@tempcnta}%
+ \advance\@tempcnta\@ne
+ }%
+ \else
+ \def\AM@cmp{last}%
+ \ifx\AM@cmp\AM@tempii
+ \let\AM@tempii\AM@pagecount
+ \fi
+ \AM@checkinteger{\AM@tempii}%
+ \ifAM@integer
+ \@tempcntb=\AM@tempii\relax
+ \AM@checkpagenumber{\the\@tempcntb}%
+ \ifnum\@tempcnta<\@tempcntb \def\AM@rel{<}\def\AM@inc{\@ne}%
+ \else \def\AM@rel{>}\def\AM@inc{\m@ne}\fi
+ \advance\@tempcntb\AM@inc
+ \whiledo{\@tempcnta\AM@rel\@tempcntb}{%
+ \AM@append{\the\@tempcnta}%
+ \advance\@tempcnta\AM@inc
+ }%
+ \else
+ \AM@setnewdocname{\AM@temp}%
+ \fi
+ \fi
+}
+\newcommand*{\AM@checkpagenumber}[1]{%
+ \ifnum#1>\AM@pagecount\relax
+ \ifthenelse{\boolean{AM@pkg@draft} \and \boolean{AM@survey}}{%
+ }{%
+ \PackageError{pdfpages}
+ {page number #1 of `\AM@currentdocname' does not exist}
+ {You have set a wrong page number in the `pages' option.
+ Document \MessageBreak `\AM@currentdocname' does not
+ have #1 pages.}%
+ }%
+ \fi
+}
+\newcommand*{\AM@setnewdocname}[1]{%
+ \ifAM@defaultone
+ \AM@append{1}%
+ \fi
+ \edef\AM@temp{\AM@trim@space{#1}}%
+ \AM@findfile{\AM@temp}%
+ \AM@defaultonetrue
+}
+\newcommand*{\AM@append}[1]{%
+ \edef\AM@doclist{\AM@doclist,\AM@currentdocname}%
+ \edef\AM@pagelist{\AM@pagelist,#1}%
+ \ifAM@doublepages
+ \edef\AM@doclist{\AM@doclist,\AM@currentdocname}%
+ \edef\AM@pagelist{\AM@pagelist,#1}%
+ \fi
+ \AM@defaultonefalse
+}
+\newif\ifAM@endoflist\AM@endoflistfalse
+\newcommand{\AM@getfirst}{}
+\def\AM@getfirst#1{\expandafter\AM@getfirsti#1,\END#1\END}
+\newcommand{\AM@getfirsti}{}
+\def\AM@getfirsti#1,#2\END#3\END{%
+ \edef#3{#2}%
+ \ifx\\#2\\%
+ \setboolean{AM@endoflist}{true}%
+ \def#3{}%
+ \else
+ \edef#3{\AM@getfirstii#2\END}%
+ \fi
+ \toks@{#1}%
+}
+\newcommand{\AM@getfirstii}{}
+\def\AM@getfirstii#1,\END{#1}
+\newcommand{\AM@readfirst}{}
+\newcommand{\AM@readfirsti}{}
+\def\AM@readfirst#1{\expandafter\AM@readfirsti#1,\END}
+\def\AM@readfirsti#1,#2\END{\toks@{#1}}
+\newcommand{\AM@getlast}{}
+\def\AM@getlast#1{%
+ \let\AM@temp\relax
+ \expandafter\AM@getlasti#1,\END
+ \@ifundefined{AM@temp}{\def#1{}}{\edef#1{\AM@temp}}%
+}
+\def\AM@ReturnAfterFi#1\fi{\fi#1}
+\newcommand{\AM@getlasti}{}
+\def\AM@getlasti#1,#2\END{%
+ \ifx\\#2\\%
+ \def\AM@lastitem{#1}%
+ \else
+ \@ifundefined{AM@temp}
+ {\edef\AM@temp{#1}}
+ {\edef\AM@temp{\AM@temp,#1}}%
+ \AM@ReturnAfterFi{\AM@getlasti#2\END}%
+ \fi
+}
+\newcommand{\AM@getlastn}{}
+\def\AM@getlastn#1#2{%
+ \let\AM@templist\relax
+ \@tempcnta=\z@
+ \loop
+ \ifnum\@tempcnta<#2
+ \AM@getlast{#1}%
+ \@ifundefined{AM@templist}
+ {\edef\AM@templist{\AM@lastitem}}
+ {\edef\AM@templist{\AM@lastitem,\AM@templist}}%
+ \advance\@tempcnta\@ne
+ \repeat
+ \edef\AM@lastnitems{\AM@templist}%
+}
+\newif\ifAM@again\AM@againtrue
+\newcommand{\AM@count}{}
+\def\AM@count#1{%
+ \edef\AM@templist{#1}%
+ \loop
+ \AM@getlast{\AM@templist}%
+ \expandafter\ifx\expandafter\\\AM@lastitem\\%
+ \else
+ \AM@againfalse
+ \expandafter\ifx\expandafter\\\AM@templist\\%
+ \edef\AM@templist{\AM@lastitem}%
+ \else
+ \edef\AM@templist{\AM@templist,\AM@lastitem}%
+ \fi
+ \@tempcnta=\z@
+ \expandafter\AM@counti\AM@templist,\END,
+ \fi
+ \ifAM@again
+ \repeat
+}
+\newcommand{\AM@counti}{}
+\def\AM@counti#1,{%
+ \ifx\END#1
+ \else
+ \advance\@tempcnta\@ne
+ \expandafter\AM@counti
+ \fi
+}
+\newif\ifAM@resort@end\AM@resort@endfalse
+\newcommand{\AM@resort}{}
+\def\AM@resort{%
+ \def\AM@resortedpagelist{}%
+ \def\AM@resorteddoclist{}%
+ \def\AM@xnupi{\@ne}%
+ \def\AM@ynupi{\@ne}%
+ \AM@count{\AM@lastnpages}%
+ \def\AM@xnuplast{%
+ \the\@tempcnta - (\the\@tempcnta / \AM@xnup * \AM@xnup) + 1}%
+ \def\AM@ynuplast{1 + (\the\@tempcnta / \AM@xnup)}%
+ \setlength{\@tempdima}{\p@*(\AM@xnuplast)}%
+ \edef\AM@xnuplast{\strip@pt\@tempdima}%
+ \setlength{\@tempdima}{\p@*(\AM@ynuplast)}%
+ \edef\AM@ynuplast{\strip@pt\@tempdima}%
+ \whiledo{\not\boolean{AM@resort@end}}{%
+ \@tempcnta=\AM@ynupi\relax
+ \@tempcntb=\AM@ynuplast\relax
+ \ifnum\@tempcnta=\@tempcntb
+ \@tempcnta=\AM@xnupi\relax
+ \@tempcntb=\AM@xnuplast\relax
+ \ifnum\@tempcnta<\@tempcntb
+ \AM@getfirst{\AM@lastndocs}%
+ \edef\AM@firstdocitem{\the\toks@}%
+ \AM@getfirst{\AM@lastnpages}%
+ \edef\AM@resortedpagelist{\AM@resortedpagelist,\the\toks@}%
+ \edef\AM@resorteddoclist{%
+ \AM@resorteddoclist,\AM@firstdocitem}%
+ \else
+ \edef\AM@resortedpagelist{\AM@resortedpagelist,}%
+ \edef\AM@resorteddoclist{\AM@resorteddoclist,\AM@phantomdoc}%
+ \fi
+ \else
+ \ifnum\@tempcnta<\@tempcntb
+ \AM@getfirst{\AM@lastndocs}%
+ \edef\AM@firstdocitem{\the\toks@}%
+ \AM@getfirst{\AM@lastnpages}%
+ \edef\AM@resortedpagelist{\AM@resortedpagelist,\the\toks@}%
+ \edef\AM@resorteddoclist{\AM@resorteddoclist,\AM@firstdocitem}%
+ \else
+ \edef\AM@resortedpagelist{\AM@resortedpagelist,}%
+ \edef\AM@resorteddoclist{\AM@resorteddoclist,\AM@phantomdoc}%
+ \fi
+ \fi
+ \@tempcnta=\AM@ynupi\relax
+ \advance\@tempcnta\@ne
+ \edef\AM@ynupi{\the\@tempcnta}%
+ \@tempcntb=\AM@ynup\relax
+ \ifnum\@tempcnta>\@tempcntb
+ \@tempcntb=\AM@xnupi\relax
+ \advance\@tempcntb\@ne
+ \edef\AM@xnupi{\the\@tempcntb}%
+ \def\AM@ynupi{\@ne}%
+ \@tempcnta=\AM@xnup\relax
+ \ifnum\@tempcntb>\@tempcnta
+ \setboolean{AM@resort@end}{true}%
+ \fi
+ \fi
+ }%
+ \edef\AM@resortedpagelist{\expandafter\@gobble\AM@resortedpagelist}%
+ \edef\AM@resorteddoclist{\expandafter\@gobble\AM@resorteddoclist}%
+}
+\newif\ifAM@scale
+\newcommand{\AM@remove@scale}{}
+\def\AM@remove@scale#1{%
+ \def\AM@options{}%
+ \AM@remove@scalei#1,\END,
+}
+\newcommand{\AM@remove@scalei}{}
+\def\AM@remove@scalei#1,{%
+ \ifx\END#1
+ \else
+ \AM@scalefalse
+ \AM@remove@scaleii#1=\END
+ \ifAM@scale
+ \else
+ \ifx\empty\AM@options
+ \edef\AM@options{#1}%
+ \else
+ \toks@\expandafter{\AM@options,#1}%
+ \edef\AM@options{\the\toks@}%
+ \fi
+ \fi
+ \expandafter\AM@remove@scalei
+ \fi
+}
+\newcommand{\AM@remove@scaleii}{}
+\def\AM@remove@scaleii#1=#2\END{%
+ \ifx\\#2\\%
+ \else
+ \def\AM@temp{#1}%
+ \edef\AM@temp{\AM@trim@space{\AM@temp}}%
+ \ifthenelse{\equal{scale}{\AM@temp}}{\AM@scaletrue}{}%
+ \fi
+}
+\newif\ifAM@pdfpages@options
+\newcommand{\AM@split@options}{}
+\def\AM@split@options#1#2{%
+ \def\AM@param{#1}%
+ \@temptokena{}%
+ \AM@split@optionsi#2,\END,
+}
+\def\AM@split@optionsi#1,{%
+ \ifx\END#1
+ \else
+ \AM@pdfpages@optionsfalse \AM@scalefalse
+ \AM@split@optionsii#1=\END
+ \ifthenelse{\equal{\AM@param}{pdfpages}}
+ {\ifAM@pdfpages@options
+ \@temptokena\expandafter{\the\@temptokena,#1}%
+ \fi}{}%
+ \ifthenelse{\equal{\AM@param}{Gin}}
+ {\ifAM@pdfpages@options\else
+ \@temptokena\expandafter{\the\@temptokena,#1}%
+ \fi}{}%
+ \ifthenelse{\equal{\AM@param}{Gin@noscale}}
+ {\ifAM@pdfpages@options\else
+ \ifAM@scale\else
+ \@temptokena\expandafter{\the\@temptokena,#1}%
+ \fi
+ \fi}{}%
+ \expandafter\AM@split@optionsi
+ \fi
+}
+\newcommand{\AM@split@optionsii}{}
+\def\AM@split@optionsii#1=#2\END{%
+ \edef\AM@temp{\AM@trim@space{#1}}%
+ \ifthenelse{\equal{pages}{\AM@temp}\or
+ \equal{nup}{\AM@temp}\or
+ \equal{deltax}{\AM@temp}\or
+ \equal{deltay}{\AM@temp}\or
+ \equal{delta}{\AM@temp}\or
+ \equal{offset}{\AM@temp}\or
+ \equal{frame}{\AM@temp}\or
+ \equal{openright}{\AM@temp}\or
+ \equal{pagecommand}{\AM@temp}\or
+ \equal{landscape}{\AM@temp}\or
+ \equal{turn}{\AM@temp}\or
+ \equal{column}{\AM@temp}\or
+ \equal{columnstrict}{\AM@temp}\or
+ \equal{noautoscale}{\AM@temp}\or
+ \equal{thread}{\AM@temp}\or
+ \equal{threadname}{\AM@temp}\or
+ \equal{link}{\AM@temp}\or
+ \equal{linkfit}{\AM@temp}\or
+ \equal{linkname}{\AM@temp}\or
+ \equal{linktodoc}{\AM@temp}\or
+ \equal{linktodocfit}{\AM@temp}\or
+ \equal{linkfilename}{\AM@temp}\or
+ \equal{survey}{\AM@temp}\or
+ \equal{survey-nolink}{\AM@temp}\or
+ \equal{output}{\AM@temp}\or
+ \equal{xr-prefix}{\AM@temp}\or
+ \equal{fitpaper}{\AM@temp}\or
+ \equal{addtotoc}{\AM@temp}\or
+ \equal{addtolist}{\AM@temp}\or
+ \equal{doublepages}{\AM@temp}\or
+ \equal{doublepagestwist}{\AM@temp}\or
+ \equal{doublepagestwistodd}{\AM@temp}\or
+ \equal{doublepagestwist*}{\AM@temp}\or
+ \equal{doublepagestwistodd*}{\AM@temp}\or
+ \equal{signature}{\AM@temp}\or
+ \equal{pagetemplate}{\AM@temp}\or
+ \equal{rotateoversize}{\AM@temp}\or
+ \equal{picturecommand}{\AM@temp}\or
+ \equal{picturecommand*}{\AM@temp}\or
+ \equal{newwindow}{\AM@temp}\or
+ \equal{reflect}{\AM@temp}\or
+ \equal{reflect*}{\AM@temp}}
+ {\AM@pdfpages@optionstrue}{}%
+ \ifthenelse{\equal{scale}{\AM@temp}}{\AM@scaletrue}{}%
+}
+\newcommand{\AM@trim@space}{}\newcommand{\AM@trim@spacei}{}
+\newcommand{\AM@trim@spaceii}{}
+\def\AM@trim@space#1{%
+ \expandafter\AM@trim@spacei\expandafter{\ifdim\z@=0pt#1}\fi}
+\def\AM@trim@spacei#1{\AM@trim@spaceii#1 \END}
+\def\AM@trim@spaceii#1 #2\END{#1}
+\def\AM@trim@leadingspace#1{\ifdim\z@=0pt#1\fi}
+\newif\ifAM@phantompage
+\newcommand*{\AM@isphantom}{%
+ \expandafter\ifx\expandafter\\\AM@page\\%
+ \let\AM@page\AM@phantompage
+ \let\AM@ph\phantom
+ \AM@phantompagetrue
+ \else
+ \let\AM@ph\relax
+ \AM@phantompagefalse
+ \fi
+}
+
+\newcommand{\AM@hyper@begin@i}{%
+ \ifAM@link \AM@dest@special\fi
+}
+\newcommand{\AM@hyper@begin@ii}{%
+ \ifAM@survey \ifAM@surveynolink\else
+ \AM@survey@special@begin
+ \fi\fi
+ \ifAM@linktodoc\AM@linktodoc@special@begin\fi
+ \ifAM@thread\AM@thread@special@begin\fi
+}
+\newcommand{\AM@hyper@end}{%
+ \ifAM@survey \ifAM@surveynolink\else
+ \AM@survey@special@end
+ \fi \fi
+ \ifAM@linktodoc\AM@linktodoc@special@end\fi
+ \ifAM@thread\AM@thread@special@end\fi
+}
+\newcommand{\AM@openright}{}
+\def\AM@openright{%
+ \edef\AM@pagelist{,\AM@pagelist}%
+ \edef\AM@doclist{\AM@phantomdoc,\AM@doclist}%
+}
+\newcommand{\AM@countpagelist}{}
+\def\AM@countpagelist{%
+ \@tempcnta=\z@
+ \expandafter\AM@countpagelisti\AM@pagelist,\END,
+}
+\newcommand{\AM@countpagelisti}{}
+\def\AM@countpagelisti#1,{%
+ \ifx\END#1
+ \else
+ \advance\@tempcnta\@ne
+ \expandafter\AM@countpagelisti
+ \fi
+}
+\newcommand{\AM@filluppagelist}{}
+\def\AM@filluppagelist{%
+ \@tempcnta=\AM@xnup\relax
+ \@tempcntb=\AM@ynup\relax
+ \multiply\@tempcnta\@tempcntb
+ \edef\AM@nup{\the\@tempcnta}%
+ \AM@countpagelist
+ \@tempcntb=\@tempcnta
+ \divide\@tempcntb\AM@nup
+ \multiply\@tempcntb\AM@nup
+ \advance\@tempcnta-\@tempcntb
+ \ifnum\@tempcnta=\z@
+ \else
+ \advance\@tempcnta-\AM@nup
+ \multiply\@tempcnta\m@ne
+ \fi
+ \whiledo{\@tempcnta > \z@}{%
+ \let\saveAM@pagelist\AM@pagelist
+ \edef\AM@pagelist{\saveAM@pagelist,}%
+ \advance\@tempcnta\m@ne
+ \let\saveAM@doclist\AM@doclist
+ \edef\AM@doclist{\saveAM@doclist,\AM@phantomdoc}%
+ }%
+}
+\newcommand{\AM@prepare@signature}{}
+\def\AM@prepare@signature{%
+ \def\AM@newpagelist{}%
+ \def\AM@newdoclist{}%
+ \@tempcnta=\AM@signature\relax
+ \divide\@tempcnta by 4
+ \multiply\@tempcnta by 4
+ \ifnum\@tempcnta=0\@tempcnta=4\fi
+ \edef\AM@signature{\the\@tempcnta}%
+ \AM@countpagelist
+ \count@=\@tempcnta
+ \@tempcntb=\AM@signature\relax
+ \divide\count@\@tempcntb
+ \multiply\count@\@tempcntb
+ \advance\@tempcnta-\count@
+ \ifnum\@tempcnta=0 \@tempcntb=0
+ \else\advance\@tempcntb-\@tempcnta
+ \fi
+ \whiledo{\@tempcntb>\z@}{%
+ \edef\AM@pagelist{\AM@pagelist,}%
+ \edef\AM@doclist{\AM@doclist,\AM@phantomdoc}%
+ \advance\@tempcntb\m@ne
+ }%
+ \def\AM@sort{%
+ \def\AM@sigpagelist{}%
+ \def\AM@sigdoclist{}%
+ \@tempcntb=\AM@signature\relax
+ \AM@getlastn{\AM@pagelist}{\@tempcntb}%
+ \edef\AM@lastnpages{\AM@lastnitems}%
+ \AM@getlastn{\AM@doclist}{\@tempcntb}%
+ \edef\AM@lastndocs{\AM@lastnitems}%
+ \@tempcnta=0
+ \def\AM@first{%
+ \AM@getfirst{\AM@lastnpages}%
+ \edef\AM@sigpagelist{\AM@sigpagelist,\the\toks@}%
+ \AM@getfirst{\AM@lastndocs}%
+ \edef\AM@sigdoclist{\AM@sigdoclist,\the\toks@}%
+ }%
+ \def\AM@last{%
+ \AM@getlast{\AM@lastnpages}%
+ \edef\AM@sigpagelist{\AM@sigpagelist,\AM@lastitem}%
+ \AM@getlast{\AM@lastndocs}%
+ \edef\AM@sigdoclist{\AM@sigdoclist,\AM@lastitem}%
+ }%
+ \whiledo{\@tempcnta<\@tempcntb}{%
+ \ifAM@landscape
+ \AM@last\AM@first\AM@last\AM@first
+ \else
+ \AM@first\AM@last\AM@first\AM@last
+ \fi
+ \advance\@tempcnta by 4
+ }%
+ \edef\AM@newpagelist{\AM@sigpagelist\AM@newpagelist}%
+ \edef\AM@newdoclist{\AM@sigdoclist\AM@newdoclist}%
+ \ifx\AM@pagelist\@empty
+ \else\expandafter\AM@sort
+ \fi
+ }%
+ \AM@sort
+ \edef\AM@pagelist{\expandafter\@gobble\AM@newpagelist}%
+ \edef\AM@doclist{\expandafter\@gobble\AM@newdoclist}%
+ \ifdim\AM@pagewidth<\AM@pageheight
+ \def\AM@xnup{\@ne}\def\AM@ynup{\tw@}%
+ \else
+ \def\AM@xnup{\tw@}\def\AM@ynup{\@ne}%
+ \fi
+}
+\newcommand*{\AM@setphantom}{%
+ \@ifundefined{AM@pagetemplate}
+ {\expandafter\AM@setphantompage\AM@pagelist,\END,}
+ {\edef\AM@phantompage{\AM@pagetemplate}}%
+ \expandafter\AM@setphantomdoc\AM@doclist,\END
+}
+\newcommand{\AM@setphantompage}{}
+\def\AM@setphantompage#1,{%
+ \def\AM@gobble##1\END,{}%
+ \ifx\\#1\\%
+ \expandafter\AM@setphantompage
+ \else
+ \def\AM@phantompage{#1}%
+ \expandafter\AM@gobble
+ \fi
+}
+\newcommand{\AM@setphantomdoc}{}
+\def\AM@setphantomdoc#1,#2\END{\edef\AM@phantomdoc{#1}}
+\newcommand{\AM@addtotoc@hook}{\relax}
+\newcommand{\AM@addtotoc}{}
+\def\AM@addtotoc{%
+ \begingroup
+ \def\@seccntformat##1{}\def\@makechapterhead##1{}%
+ \def\@endpart{}\def\partname{}%
+ \def\autodot{}% KOMA classes
+ \let\AM@addcontentsline\addcontentsline
+ \def\addcontentsline##1##2##3{%
+ \AM@addcontentsline{##1}{##2}{##3}%
+ \def\thepart{}}%
+ \AM@addtotoc@hook
+ \edef\AM@temp{{\AM@toc@section}{\AM@toc@level}%
+ {\z@}{\z@}{\z@}{}[\the\AM@toc@title]{}}%
+ \edef\AM@tempi{\noexpand\csname @\AM@toc@section\noexpand\endcsname%
+ [\the\AM@toc@title]{}}%
+ \@ifundefined{@\AM@toc@section}
+ {\expandafter\@sect\AM@temp
+ \hskip\z@\par\vskip-\parskip\vskip-\baselineskip\hskip\z@}
+ {\AM@tempi}%
+ \xdef\@currentlabel{\@currentlabel}%
+ \label{\AM@toc@label}%
+ \endgroup
+}
+\newcommand{\AM@parse@toclist}{}
+\def\AM@parse@toclist{%
+ \ifx\AM@toclist\empty \def\AM@toc@page{0}%
+ \else \expandafter\AM@parse@toclisti\AM@toclist\END
+ \fi
+}
+\newtoks\AM@toc@title
+\newcommand{\AM@parse@toclisti}{}
+\def\AM@parse@toclisti#1,#2,#3,#4,#5,#6\END{%
+ \def\AM@toc@page{\AM@trim@space{#1}}%
+ \def\AM@toc@section{\AM@trim@space{#2}}%
+ \def\AM@toc@level{\AM@trim@space{#3}}%
+ \AM@toc@title\expandafter{\ifdim\z@=0pt#4}\fi
+ \def\AM@toc@label{\AM@trim@space{#5}}%
+ \AM@checkinteger{\AM@toc@page}%
+ \ifAM@integer\else
+ \PackageError{pdfpages}
+ {Missing number.\MessageBreak
+ Page number in option `addtotoc' is not a number}
+ {See the pdfpages manual for explanation.}%
+ \fi
+}
+\newcommand{\AM@rm@from@toclist}{}
+\def\AM@rm@from@toclist{%
+ \expandafter\AM@rm@from@toclisti\AM@toclist\END
+}
+\newcommand{\AM@rm@from@toclisti}{}
+\def\AM@rm@from@toclisti#1,#2,#3,#4,#5,#6\END{%
+ \def\AM@toclist{#6}%
+}
+\newcommand{\AM@addtolist@hook}{\relax}
+\newcommand{\AM@addtolist}{}
+\def\AM@addtolist{
+ \def\@captype{\AM@lof@list}%
+ \long\def\@makecaption##1##2{}%
+ \let\@fs@capt\relax% float.sty
+ \caption{\AM@lof@heading}%
+ \AM@addtolist@hook
+ \@ifundefined{hyper@@anchor}{}{%
+ \@ifundefined{float@caption}{%
+ \hyper@@anchor{\@currentHref}{\relax}%
+ }{}}%
+ \label{\AM@lof@label}%
+ \vskip-\baselineskip
+}
+\newcommand{\AM@parse@loflist}{}
+\def\AM@parse@loflist{%
+ \ifx\AM@loflist\empty \def\AM@lof@page{0}%
+ \else \expandafter\AM@parse@loflisti\AM@loflist\END
+ \fi
+}
+\newcommand{\AM@parse@loflisti}{}
+\def\AM@parse@loflisti#1,#2,#3,#4,#5\END{%
+ \def\AM@lof@page{\AM@trim@space{#1}}%
+ \def\AM@lof@list{\AM@trim@space{#2}}%
+ \def\AM@lof@heading{#3}%
+ \def\AM@lof@label{\AM@trim@space{#4}}%
+ \AM@checkinteger{\AM@lof@page}%
+ \ifAM@integer\else
+ \PackageError{pdfpages}
+ {Missing number.\MessageBreak
+ Page number in option `addtolist' is not a number}
+ {See the pdfpages manual for explanation.}%
+ \fi
+}
+\newcommand{\AM@rm@fromloflist}{}
+\def\AM@rm@from@loflist{%
+ \expandafter\AM@rm@from@loflisti\AM@loflist\END
+}
+\newcommand{\AM@rm@from@loflisti}{}
+\def\AM@rm@from@loflisti#1,#2,#3,#4,#5\END{%
+ \def\AM@loflist{#5}%
+}
+\newcommand{\AM@toclof}{}
+\def\AM@toclof#1{%
+ \AM@parse@toclist
+ \whiledo{#1=\AM@toc@page}{%
+ \ifx\AM@toclist\empty
+ \else
+ \AM@addtotoc
+ \AM@rm@from@toclist
+ \def\AM@toc@page{0}%
+ \AM@parse@toclist
+ \fi
+ }%
+ \AM@parse@loflist
+ \whiledo{#1=\AM@lof@page}{%
+ \ifx\AM@loflist\empty
+ \else
+ \AM@addtolist
+ \AM@rm@from@loflist
+ \def\AM@lof@page{0}%
+ \AM@parse@loflist
+ \fi
+ }%
+}
+\ifAM@pkg@survey
+ \newcommand{\AddToSurvey}{%
+ \protected@write\@auxout{\let\AM@abs@page\relax}
+ {\string\newlabel{\AM@xrprefix pdfpages@page\the\c@AM@survey}%
+ {{}{\AM@abs@page}}}%
+ \stepcounter{AM@survey}%
+ }%
+ \let\r@TotalPages\undefined
+\else
+ \newcommand{\AddToSurvey}{}
+\fi
+\newcounter{AM@survey}
+\def\AM@abs@page{\the\count1}
+\newcommand{\AM@pageref}{}
+\newcommand{\AM@@pageref}{}
+\newcommand{\AM@secondarg}{}
+\def\AM@pageref#1{\expandafter\AM@@pageref\csname r@#1\endcsname}
+\def\AM@@pageref#1{\expandafter\AM@secondarg#1\@nil}
+\def\AM@secondarg#1#2#3\@nil{#2}
+\def\AM@TeXpower@hook{%
+ \ifAM@pkg@survey
+ \@ifpackageloaded{texpower}{%
+ \releasecounter{AM@survey}%
+ \let\AM@SetLabel\relax
+ \g@addto@macro\do@insert@firstanchor@TP{%
+ \AM@SetLabel\AM@SetTarget}%
+ \g@addto@macro\dont@insert@firstanchor@TP{%
+ \AM@SetLabel\AM@SetTarget}%
+ \let\AM@setanchor\relax
+ \def\AM@SetTarget{%
+ \begingroup
+ \advance\count1\m@ne
+ \AM@anchor@special
+ \endgroup
+ }%
+ \let\OrigAddToSurvey\AddToSurvey
+ \def\AddToSurvey{%
+ \ifthenelse{\boolean{instepwise@TP}}
+ {\ifthenelse{\boolean{firstactivation}}{\AM@AddLabel}{}}
+ {\AM@AddLabel}%
+ }%
+ \def\AM@AddLabel{\global\let\AM@SetLabel\OrigAddToSurvey
+ \AtShipout{\AM@KillLabel}}%
+ \def\AM@KillLabel{\global\let\AM@SetLabel\relax}%
+ }{}%
+ \fi
+}
+\AtBeginDocument{\AM@TeXpower@hook}
+\define@key{pdfpages}{pages}{\def\AM@pagestemp{#1}}
+\define@key{pdfpages}{nup}{\AM@parse@nup#1x\END}
+\define@key{pdfpages}{deltax}{\AM@parse@deltax#1 \\}
+\define@key{pdfpages}{deltay}{\AM@parse@deltay#1 \\}
+\define@key{pdfpages}{delta}{\AM@parse@delta#1 \\}
+\define@key{pdfpages}{offset}{\AM@parse@offset#1 \\}
+\define@key{pdfpages}{frame}[true]{\setboolean{AM@frame}{#1}}
+\define@key{pdfpages}{openright}[true]{\setboolean{AM@openright}{#1}}
+\define@key{pdfpages}{pagecommand}{\def\AM@pagecommand{#1}}
+\define@key{pdfpages}{landscape}[true]{\setboolean{AM@landscape}{#1}}
+\define@key{pdfpages}{turn}[true]{\setboolean{AM@turn}{#1}}
+\define@key{pdfpages}{column}[true]{\setboolean{AM@column}{#1}}
+\define@key{pdfpages}{columnstrict}[true]%
+ {\setboolean{AM@columnstrict}{#1}}
+\define@key{pdfpages}{noautoscale}[true]%
+ {\setboolean{AM@noautoscale}{#1}}
+\define@key{pdfpages}{thread}[true]{\setboolean{AM@thread}{#1}}
+\define@key{pdfpages}{threadname}{\def\AM@threadname{#1}}
+\define@key{pdfpages}{link}[true]{\setboolean{AM@link}{#1}}
+\define@key{pdfpages}{linkfit}{\def\AM@linkfit{#1}}
+\define@key{pdfpages}{linkname}{\def\AM@linkname@option{#1}}
+\define@key{pdfpages}{linktodoc}[true]{\setboolean{AM@linktodoc}{#1}}
+\define@key{pdfpages}{linktodocfit}{\def\AM@linktodocfit{#1}}
+\define@key{pdfpages}{linkfilename}{\pdfstringdef\AM@linkfilename{#1}%
+ \AM@linkfilenametrue}
+\define@key{pdfpages}{survey}[true]{%
+ \ifAM@pkg@survey\setboolean{AM@survey}{#1}%
+ \else\AM@outputfalse\fi}
+\define@key{pdfpages}{survey-nolink}[true]{%
+ \ifAM@pkg@survey\setboolean{AM@surveynolink}{#1}%
+ \setboolean{AM@survey}{#1}
+ \else\AM@outputfalse\fi}
+\define@key{pdfpages}{xr-prefix}{\def\AM@xrprefix{#1}}
+\define@key{pdfpages}{fitpaper}[true]{\setboolean{AM@fitpaper}{#1}}
+\define@key{pdfpages}{addtotoc}{\def\AM@toclist{#1,}}
+\define@key{pdfpages}{addtolist}{\def\AM@loflist{#1,}}
+\define@key{pdfpages}{doublepages}[true]%
+ {\setboolean{AM@doublepages}{#1}}
+\define@key{pdfpages}{doublepagestwist}[true]%
+ {\setboolean{AM@doublepages}{#1}%
+ \setboolean{AM@doublepagestwist}{#1}%
+ \AM@doublepagestmptrue\AM@doublepagestmpitrue}
+\define@key{pdfpages}{doublepagestwistodd}[true]%
+ {\setboolean{AM@doublepages}{#1}%
+ \setboolean{AM@doublepagestwist}{#1}%
+ \AM@doublepagestmpfalse\AM@doublepagestmpitrue}
+\define@key{pdfpages}{doublepagestwist*}[true]%
+ {\setboolean{AM@doublepages}{#1}%
+ \setboolean{AM@doublepagestwist}{#1}%
+ \AM@doublepagestmptrue\AM@doublepagestmpitrue
+ \AM@doublepagestwistxtrue}
+\define@key{pdfpages}{doublepagestwistodd*}[true]%
+ {\setboolean{AM@doublepages}{#1}%
+ \setboolean{AM@doublepagestwist}{#1}%
+ \AM@doublepagestmpfalse\AM@doublepagestmpitrue
+ \AM@doublepagestwistxtrue}
+\define@key{pdfpages}{signature}{\def\AM@signature{#1}}
+\define@key{pdfpages}{pagetemplate}{\def\AM@pagetemplate{#1}}
+\define@key{pdfpages}{rotateoversize}[true]%
+ {\setboolean{AM@rotateoversize}{#1}}
+\define@key{pdfpages}{picturecommand}{\def\AM@picturecommand{#1}}
+\define@key{pdfpages}{picturecommand*}{\def\AM@picturecommandstar{#1}}
+\define@key{pdfpages}{newwindow}[true]{\setboolean{AM@newwindow}{#1}}
+\define@key{pdfpages}{reflect*}[true]{\setboolean{AM@reflect}{#1}}
+\define@key{pdfpages}{reflect}[true]{\setboolean{AM@reflectall}{#1}}
+\newcommand{\AM@parse@nup}{}
+\def\AM@parse@nup#1x#2\END{%
+ \ifx\\#2\\%
+ \def\AM@shortnupsyntax{}%
+ \def\AM@xnup{\@ne}%
+ \def\AM@ynup{\@ne}%
+ \ifnum#1=\tw@
+ \def\AM@xnup{\tw@}%
+ \def\AM@ynup{\@ne}%
+ \fi
+ \ifnum#1=4
+ \def\AM@xnup{\tw@}%
+ \def\AM@ynup{\tw@}%
+ \fi
+ \else
+ \def\AM@xnup{#1}%
+ \AM@parse@nupi#2%
+ \fi
+}
+\def\AM@parse@nupi#1x{\def\AM@ynup{#1}}
+\def\AM@parse@deltax#1 #2\\{\AMGin@defaultbp\AM@deltax{#1}}
+\def\AM@parse@deltay#1 #2\\{\AMGin@defaultbp\AM@deltay{#1}}
+\def\AM@parse@delta#1 #2 #3\\{%
+ \AMGin@defaultbp\AM@deltax{#1}%
+ \AMGin@defaultbp\AM@deltay{#2}}
+\def\AM@parse@offset#1 #2 #3\\{%
+ \AMGin@defaultbp\AM@xoffset{#1}%
+ \AMGin@defaultbp\AM@yoffset{#2}}
+\def\AMGin@defaultbp#1#2{%
+ \afterassignment\AMGin@def@bp\dimen@#2bp\relax{#1}{#2}}
+\def\AMGin@def@bp#1\relax#2#3{%
+ \if!#1!%
+ \def#2{#3bp}%
+ \else
+ \dimen@.99626\dimen@
+ \edef#2{\strip@pt\dimen@ bp}%
+ \fi
+}
+\InputIfFileExists{pdfpages.fix}{%
+ \PackageInfo{pdfpages}{Loading patch file `pdfpages.fix'}}{}
+
+\endinput
+%%
+%% End of file `pdfpages.sty'.
diff --git a/Master/texmf-dist/tex/latex/pdfpages/pppdftex.def b/Master/texmf-dist/tex/latex/pdfpages/pppdftex.def
new file mode 100644
index 00000000000..18fc3c62ac5
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pdfpages/pppdftex.def
@@ -0,0 +1,108 @@
+%%
+%% This is file `pppdftex.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% pdfpages.dtx (with options: `pppdftexdef')
+%%
+%% This is a package for PDFLaTeX, which makes it
+%% easy to insert pages of external PDF documents.
+%%
+%% This file is part of the pdfpages package.
+%%
+%% Copyright (C) 2001-2003 Andreas MATTHIAS.
+%%
+%% Please send error reports and suggestions for improvements to
+%% Andreas MATTHIAS <amat@kabsi.at>.
+%%
+\ProvidesFile{pppdftex.def}
+ [2004/01/31 v0.3e
+ Pdfpages driver for pdfTeX (AM)]
+\ifnum\pdftexversion<100
+ \PackageError{pdfpages}
+ {Package pdfpages requires at least\MessageBreak
+ pdfTeX version 1.00}
+ {Update your TeX distribution.}
+ \let\AM@endinput\relax
+ \expandafter\endinput
+\fi
+\ifcase\pdfoutput
+ \PackageError{pdfpages}
+ {You produce DVI output but PDF output\MessageBreak
+ is needed for package pdfpages}
+ {Set output to PDF. (use: \pdfoutput = 1)}
+ \let\AM@endinput\relax
+ \expandafter\endinput
+\fi
+\begingroup
+\@ifundefined{ver@pdftex.def}{%
+ \PackageError{pdfpages}
+ {The graphics package was loaded with driver\MessageBreak
+ `\Gin@driver', which cannot be used with pdfTeX}
+ {Check the driver option of the graphics package.}
+ \global\let\AM@endinput\relax
+ \aftergroup\endinput}{}
+\endgroup
+\AM@ifdriverlater{pdftex}{2000/05/12}{}{%
+ \PackageError{pdfpages}
+ {Your version of `pdftex.def' is too old.\MessageBreak
+ There is no multipage support\MessageBreak
+ in `pdftex.def' < 0.02u}
+ {Please, update your `pdftex.def'!}}
+\AM@ifdriverlater{pdftex}{2000/09/14}{}{%
+ \PackageWarningNoLine{pdfpages}{%
+ Your version of `pdftex.def' is too old.\MessageBreak
+ There might be problems with\MessageBreak
+ the `trim' and `clip' options.\MessageBreak
+ Please, update your `pdftex.def'}}
+\def\AM@getpagecount{%
+ \pdfximage{\AM@currentdocname}%
+ \edef\AM@pagecount{\the\pdflastximagepages}%
+}
+\let\AM@pagewidth\pdfpagewidth
+\let\AM@pageheight\pdfpageheight
+\def\AM@setpagedimen{%
+ \setlength{\pdfpagewidth}{\the\wd\@tempboxa}%
+ \setlength{\pdfpageheight}{\the\ht\@tempboxa}%
+}
+\let\AM@fitpaper@special\relax
+\def\AM@findfile#1{%
+ \AM@findfile@i{#1}{pdf}%
+ \AM@findfile@ii{#1}%
+}
+\def\AM@setlscape{\pdfpageattr{/Rotate 90}}
+\def\AM@linktodoc@special@begin{%
+ \pdfannot width \wd\@tempboxa
+ height \ht\@tempboxa
+ depth \dp\@tempboxa
+ {/Subtype /Link /Border [0 0 0]
+ /A << /S /GoToR
+ /F (\AM@linkfilename)
+ /D [\AM@linktodoc@page@m@ne \AM@linktodocfit]
+ \ifAM@newwindow/NewWindow true\fi >>}%
+}
+\let\AM@linktodoc@special@end\relax
+\def\AM@survey@special@begin{%
+ \pdfannot width \wd\@tempboxa
+ height \ht\@tempboxa
+ depth \dp\@tempboxa
+ {/Subtype /Link /Border [0 0 0]
+ /A << /S /GoTo
+ /D (pdfpages.\AM@linktodoc@page@m@ne) >>}%
+}
+\let\AM@survey@special@end\relax
+\def\AM@thread@special@begin{%
+ \pdfthread width \wd\@tempboxa
+ height \ht\@tempboxa
+ depth \dp\@tempboxa
+ attr {/I <<\threadinfodict>>}%
+ name {\AM@threadname}%
+}
+\let\AM@thread@special@end\relax
+\def\AM@dest@special{\pdfdest name {\AM@linkname.\AM@page} \AM@linkfit}
+\def\AM@anchor@special{\pdfdest name {pdfpages.\the\count1} fit}
+
+\endinput
+%%
+%% End of file `pppdftex.def'.
diff --git a/Master/texmf-dist/tex/latex/pdfpages/ppvtex.def b/Master/texmf-dist/tex/latex/pdfpages/ppvtex.def
new file mode 100644
index 00000000000..a47ec1f4572
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/pdfpages/ppvtex.def
@@ -0,0 +1,82 @@
+%%
+%% This is file `ppvtex.def',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% pdfpages.dtx (with options: `ppvtexdef')
+%%
+%% This is a package for PDFLaTeX, which makes it
+%% easy to insert pages of external PDF documents.
+%%
+%% This file is part of the pdfpages package.
+%%
+%% Copyright (C) 2001-2003 Andreas MATTHIAS.
+%%
+%% Please send error reports and suggestions for improvements to
+%% Andreas MATTHIAS <amat@kabsi.at>.
+%%
+\ProvidesFile{ppvtex.def}
+ [2004/01/31 v0.3e
+ Pdfpages driver for VTeX (AM)]
+\ifnum\VTeXversion<822
+ \PackageError{pdfpages}
+ {Package pdfpages requires at least\MessageBreak
+ VTeX version 8.22}
+ {Update your VTeX distribution.}%
+ \let\AM@endinput\relax
+\fi
+\AM@ifdriverlater{vtex}{2003/06/16}{}{%
+ \PackageError{pdfpages}{%
+ Your version of `vtex.def' is too old}
+ {Please, update your `vtex.def'!}%
+ \let\AM@endinput\relax
+ \expandafter\endinput
+}
+\def\AM@getpagecount{%
+ \getpagecount\count@ \AM@currentdocname\relax
+ \edef\AM@pagecount{\the\count@}%
+}
+\let\AM@pagewidth\mediawidth
+\let\AM@pageheight\mediaheight
+\def\AM@setpagedimen{%
+ \setlength{\mediawidth}{\the\wd\@tempboxa}%
+ \setlength{\mediaheight}{\the\ht\@tempboxa}%
+}
+\def\AM@setlscape{\special{pS:
+ [{ThisPage}\string<\string</Rotate 90\string>\string>%]
+ /PUT pdfmark}%
+}
+\def\AM@fitpaper@special{%
+ \immediate\xspecial{option updatemediasizes="on"}}
+\def\AM@findfile#1{%
+ \AM@findfile@i{#1}{pdf}%
+ \ifx\AM@currentdocname\relax
+ \AM@findfile@i{#1}{ps}%
+ \fi
+ \AM@findfile@ii{#1}%
+}
+\def\AM@linktodoc@special@begin{%
+ \special{!aref <\ifAM@newwindow n\fi
+ f=\AM@linkfilename>!\AM@linktodoc@page;
+ a=</Border [0 0 0]>}%
+}
+\def\AM@linktodoc@special@end{%
+ \special{!endaref}%
+}
+\def\AM@survey@special@begin{%
+ \special{!aref pdfpages.\AM@linktodoc@page@m@ne; a=</Border [0 0 0]>}%
+}
+\def\AM@survey@special@end{%
+ \special{!endaref}%
+}
+\def\AM@thread@special@begin{%
+ \special{!thread <\threadinfodict> \AM@threadname}%
+}
+\def\AM@thread@special@end{\special{!endthread}}
+\def\AM@dest@special{\special{!aname \AM@linkname.\AM@page}}
+\def\AM@anchor@special{\special{!aname pdfpages.\the\count1}}
+
+\endinput
+%%
+%% End of file `ppvtex.def'.