diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-04-01 22:18:12 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-04-01 22:18:12 +0000 |
commit | f44341da2268b46c80eae3b9f0b0fcda4901e336 (patch) | |
tree | 4a529583b314ae396da6813bc3f529ea56549bc0 /Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty | |
parent | 2b114ee4fca0cefdc1df4d7baae0db2dbfa2172b (diff) |
pdfpages v0.4c (2008-04-01)
git-svn-id: svn://tug.org/texlive/trunk@7280 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty | 120 |
1 files changed, 78 insertions, 42 deletions
diff --git a/Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty b/Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty index fdcd7dc8439..72ba894904c 100644 --- a/Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty +++ b/Master/texmf-dist/tex/latex/pdfpages/pdfpages.sty @@ -10,25 +10,26 @@ %% %% Copyright (C) 2001-2006 Andreas MATTHIAS %% -%% This work may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either -%% version 1.3c of this license or (at your option) any -%% later version. The latest version of this license is in +%% 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.3c or later is part of all distributions of -%% LaTeX version 2005/12/01 or later. +%% 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 Andreas Matthias <amat@kabsi.at>. +%% The Current Maintainer of this work is +%% Andreas Matthias <andreas.matthias@gmail.com>. %% %% Please send error reports and suggestions for improvements to -%% Andreas MATTHIAS <amat@kabsi.at>. +%% Andreas MATTHIAS <andreas.matthias@gmail.com>. %% -\def\AM@fileversion{v0.4a} +\def\AM@fileversion{v0.4c} \def\AM@SVN@Date@i#1-#2-#3\END{\def\AM@filedate{#1/#2/#3}} \def\AM@SVN@Date$Date: #1 #2${\AM@SVN@Date@i#1\END} -\AM@SVN@Date$Date: 2006-08-12 01:13:35 +0200 (Sat, 12 Aug 2006) $ +\AM@SVN@Date$Date: 2008-04-01 17:31:14 +0200 (Tue, 01 Apr 2008) $ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{pdfpages} [\AM@filedate\space\AM@fileversion\space @@ -39,15 +40,25 @@ \DeclareOption{final}{\AM@pkg@draftfalse} \DeclareOption{enable-survey}{\AM@pkg@surveytrue} \DeclareOption{disable-survey}{\AM@pkg@surveyfalse} -\ProcessOptions \def\AM@ifdriverlater{\@ifl@ter{def}} -\begingroup -\@ifundefined{pdfoutput}{% - \@ifundefined{OpMode}{% - \def\AM@driver{null} - }{\gdef\AM@driver{vtex}}% -}{\gdef\AM@driver{pdftex}} -\endgroup +\InputIfFileExists{pdfpages.cfg}{% + \PackageInfo{pdfpages}{Loading configuration file `pdfpages.cfg'}}{} +\DeclareOption{pdftex}{\def\AM@driver{pdftex}} +\DeclareOption{vtex}{\def\AM@driver{vtex}} +\DeclareOption{null}{\def\AM@driver{null}} +\DeclareOption{xetex}{\def\AM@driver{xetex}} +\ProcessOptions +\@ifundefined{AM@driver}{ + \begingroup + \@ifundefined{pdftexversion}{% + \@ifundefined{XeTeXversion}{% + \@ifundefined{OpMode}{% + \def\AM@driver{null} + }{\gdef\AM@driver{vtex}}% + }{\gdef\AM@driver{xetex}}% + }{\gdef\AM@driver{pdftex}} + \endgroup +}{} \RequirePackage{ifthen, graphicx, calc, eso-pic} \newif\ifAM@DVIoutput\AM@DVIoutputfalse \input{pp\AM@driver.def} @@ -98,13 +109,14 @@ \newcommand*{\AM@lscape@rot}{0} \newcommand*{\AM@threadname}{}\newcommand*{\AM@linkname}{} \newcommand*{\AM@linkname@option}{} -\newcommand*{\AM@linkfit}{fit}\newcommand*{\AM@linktodocfit}{/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}{} +\newcommand*{\AM@picturecommand}{} +\newcommand*{\AM@picturecommandstar}{} \newsavebox{\AM@pagebox} \newif\ifAM@thumbpdf \newif\ifAM@pdflscape @@ -134,17 +146,17 @@ } \newcommand*{\AM@findfile@i}[2]{% \let\AM@currentdocname\relax - \IfFileExists{#1.#2}{\edef\AM@currentdocname{#1.#2}}{% - \IfFileExists{#1}{\edef\AM@currentdocname{#1}}{% + \AM@IfFileExists{#1.#2}{\edef\AM@currentdocname{#1.#2}}{% + \AM@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}{% + \AM@IfFileExists{\AM@dir#1.#2}{% \ifx\AM@currentdocname\relax \edef\AM@currentdocname{\AM@dir#1.#2}% \fi }{% - \IfFileExists{\AM@dir#1}{% + \AM@IfFileExists{\AM@dir#1}{% \ifx\AM@currentdocname\relax \edef\AM@currentdocname{\AM@dir#1}% \fi @@ -312,11 +324,16 @@ \AM@split@options{Gin@noscale}{#1}% \let\AM@filelist@save\@filelist \ifAM@DVIoutput - \setbox\@tempboxa=\hbox{\rule{597pt}{845pt}} + \setbox\@tempboxa=\hbox{\rule{597pt}{845pt}}% \else - \setbox\@tempboxa=\hbox{% - \expandafter\includegraphics\expandafter[\the\@temptokena, + \ifAM@templatesize + \setbox\@tempboxa=\hbox{% + \rotatebox{\AM@lscape@rot}{\copy\AM@templatesizebox}}% + \else + \setbox\@tempboxa=\hbox{% + \expandafter\includegraphics\expandafter[\the\@temptokena, page=\AM@page, angle=\AM@lscape@rot]{\AM@docname}}% + \fi \fi \ifthenelse{\boolean{AM@fitpaper}} {\setlength{\AM@pagewidth}{\the\wd\@tempboxa}% @@ -372,13 +389,20 @@ \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}}% + \ifAM@templatesize + \setbox\@tempboxa=\hbox{% + \scalebox{\AM@globalscale}{\copy\AM@templatesizebox}}% + \setbox\@tempboxa=\hbox{% + \rotatebox{\AM@lscape@rot}{\copy\@tempboxa}}% + \else + \setbox\@tempboxa=\hbox{% + \expandafter\includegraphics\expandafter[\the\@temptokena, + page=\AM@page, scale=\AM@globalscale, + angle=\AM@lscape@rot]{\AM@docname}}% + \fi \let\@filelist\AM@filelist@save \edef\AM@templatewidth{\the\wd\@tempboxa}% - \setlength{\@tempdima}{\the\ht\@tempboxa + \the\dp\@tempboxa}% + \setlength{\@tempdima}{\ht\@tempboxa + \dp\@tempboxa}% \edef\AM@templateheight{\the\@tempdima}% \setlength{\@tempdimb}{\ht\@tempboxa + \dp\@tempboxa}% \def\AM@xmargin{% @@ -550,11 +574,7 @@ \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}% - \let\AM@linkfit\AM@linkfit@special - \fi + \AM@region@calc \ifAM@phantompage \def\AM@shippage{}% \else @@ -640,8 +660,8 @@ \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}% + \edef\AM@doclist{\expandafter\@gobble\AM@doclist\@empty}% + \edef\AM@pagelist{\expandafter\@gobble\AM@pagelist\@empty}% } \newcommand{\AM@readlisti}{} \def\AM@readlisti#1,{% @@ -987,7 +1007,8 @@ \newcommand{\AM@split@optionsii}{} \def\AM@split@optionsii#1=#2\END{% \edef\AM@temp{\AM@trim@space{#1}}% - \ifthenelse{\equal{pages}{\AM@temp}\or + \ifthenelse{\equal{page}{\AM@temp}\or + \equal{pages}{\AM@temp}\or \equal{nup}{\AM@temp}\or \equal{deltax}{\AM@temp}\or \equal{deltay}{\AM@temp}\or @@ -1025,6 +1046,7 @@ \equal{signature*}{\AM@temp}\or \equal{booklet}{\AM@temp}\or \equal{pagetemplate}{\AM@temp}\or + \equal{templatesize}{\AM@temp}\or \equal{rotateoversize}{\AM@temp}\or \equal{picturecommand}{\AM@temp}\or \equal{picturecommand*}{\AM@temp}\or @@ -1053,7 +1075,6 @@ \AM@phantompagefalse \fi } - \newcommand{\AM@hyper@begin@i}{% \ifAM@link \AM@dest@special\fi } @@ -1185,6 +1206,7 @@ \AM@sort \edef\AM@pagelist{\expandafter\@gobble\AM@newpagelist}% \edef\AM@doclist{\expandafter\@gobble\AM@newdoclist}% + \AM@pagesize@boogie \ifdim\AM@pagewidth<\AM@pageheight \def\AM@xnup{\@ne}\def\AM@ynup{\tw@}% \else @@ -1382,6 +1404,12 @@ {Option `#1' must have a non-empty value}% \fi } +\define@key{pdfpages}{page}{\PackageWarningNoLine{pdfpages}{% + Option `page' is unknow to \string\includepdf.\MessageBreak + Did you mean `pages'? (Note the `s'!)\MessageBreak + OK, I'll proceed as if it were `pages'}% + \AM@CheckValue{pages}{#1}% + \def\AM@pagestemp{#1}} \define@key{pdfpages}{pages}{\AM@CheckValue{pages}{#1}% \def\AM@pagestemp{#1}} \define@key{pdfpages}{nup}{\AM@parse@nup#1x\END} @@ -1402,7 +1430,7 @@ \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}{linkfit}{\AM@convert@dest{#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}} @@ -1446,6 +1474,7 @@ \def\AM@signature{x}} \define@key{pdfpages}{pagetemplate}{\AM@CheckValue{pagetemplate}{#1}% \def\AM@pagetemplate{#1}} +\define@key{pdfpages}{templatesize}{\AM@parse@templatesize#1\END} \define@key{pdfpages}{rotateoversize}[true]% {\setboolean{AM@rotateoversize}{#1}} \define@key{pdfpages}{picturecommand}{\def\AM@picturecommand{#1}} @@ -1474,6 +1503,13 @@ \fi } \def\AM@parse@nupi#1x{\def\AM@ynup{#1}} +\newcommand{\AM@parse@templatesize}{} +\def\AM@parse@templatesize#1#2\END{% + \setbox\AM@templatesizebox=\hbox{\rule{#1}{#2}} + \AM@templatesizetrue +} +\newbox\AM@templatesizebox +\newif\ifAM@templatesize\AM@templatesizefalse \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\\{% |