summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pdfpages
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-11-20 10:36:19 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2009-11-20 10:36:19 +0000
commit64e6072a5dad1d9eb63e27bbb1a00ff4278e49fe (patch)
tree8f4c38e72cb5ce88cf0275227d508f0769ed1fe1 /Master/texmf-dist/source/latex/pdfpages
parent971a4c28d717ab58e5bd3394f497e1cede329128 (diff)
pdfpages update: v0.4i
git-svn-id: svn://tug.org/texlive/trunk@16101 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/pdfpages')
-rw-r--r--Master/texmf-dist/source/latex/pdfpages/pdfpages.dtx413
-rw-r--r--Master/texmf-dist/source/latex/pdfpages/pdfpages.ins6
2 files changed, 377 insertions, 42 deletions
diff --git a/Master/texmf-dist/source/latex/pdfpages/pdfpages.dtx b/Master/texmf-dist/source/latex/pdfpages/pdfpages.dtx
index 6db69898b5c..f1986b20084 100644
--- a/Master/texmf-dist/source/latex/pdfpages/pdfpages.dtx
+++ b/Master/texmf-dist/source/latex/pdfpages/pdfpages.dtx
@@ -1,7 +1,7 @@
%
% \iffalse
%
-%<*(package,pppdftexdef,ppvtexdef,ppnulldef)>
+%<*(package,pppdftexdef,ppvtexdef,ppxetexdef,ppdvipsdef,ppdvipdfmdef,ppnulldef)>
%% Copyright (C) 2001-2006 Andreas MATTHIAS
%%
%% This work may be distributed and/or modified under the conditions
@@ -15,7 +15,7 @@
%% The Current Maintainer of this work is
%% Andreas Matthias <andreas.matthias@gmail.com>.
%
-%</(package,pppdftexdef,ppvtexdef,ppnulldef)>
+%</(package,pppdftexdef,ppvtexdef,ppxetexdef,ppdvipsdef,ppdvipdfmdef,ppnulldef)>
%<*!installer>
%%
%% Please send error reports and suggestions for improvements to
@@ -27,10 +27,10 @@
%<*dtx>
\makeatletter
%</dtx>
-\def\AM@fileversion{v0.4g}
+\def\AM@fileversion{v0.4i}
\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: 2009-02-07 21:46:53 +0100 (Sat, 07 Feb 2009) $
+\AM@SVN@Date$Date: 2009-10-31 13:40:37 +0100 (Sat, 31 Oct 2009) $
%</!(example1,example2,example3,installer)>
%
%
@@ -42,6 +42,8 @@
%<pppdftexdef>\ProvidesFile{pppdftex.def}
%<ppvtexdef>\ProvidesFile{ppvtex.def}
%<ppxetexdef>\ProvidesFile{ppxetex.def}
+%<ppdvipsdef>\ProvidesFile{ppdvips.def}
+%<ppdvipdfmdef>\ProvidesFile{ppdvipdfm.def}
%<ppnulldef>\ProvidesFile{ppnull.def}
%<driver>\ProvidesFile{pdfpages.drv}
%<*!(example1,example2,example3,installer)>
@@ -69,6 +71,8 @@
%<pppdftexdef> Pdfpages driver for pdfTeX (AM)]
%<ppvtexdef> Pdfpages driver for VTeX (AM)]
%<ppxetexdef> Pdfpages driver for XeTeX (AM)]
+%<ppdvipsdef> Pdfpages driver for dvips (AM)]
+%<ppdvipdfmdef> Pdfpages driver for dvipdfm (AM)]
%<ppnulldef> Pdfpages dummy driver (AM)]
%
%
@@ -76,7 +80,7 @@
%
% \GetFileInfo{pdfpages.dtx}
%
-% \CheckSum{4268}
+% \CheckSum{4623}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -122,6 +126,8 @@
% \def\pdfLaTeX{pdfLaTeX}
% \def\VTeX{VTeX}
% \def\XeTeX{XeTeX}
+% \def\dvips{dvips}
+% \def\dvipdfm{dvipdfm}
% \def\PDF{{\small PDF}}
% \def\PS{{\small PS}}
% \def\DVI{{\small DVI}}
@@ -174,6 +180,19 @@
% empty pages. This feature is important when using packages like
% |pst-pdf|, which need to produce \DVI\ output at the first run.
%
+% \paragraph{Links and other interactive features of PDF documents}
+% Note that it is only possible to copy the contents stream of a PDF
+% document. Up to now there are no TeX-engines (\pdfTeX, \XeTeX,
+% \ldots) available that can copy links or other interactive features of
+% a PDF document, too. Thus, all kinds of links\footnote{Actually not
+% only links but all kinds of \emph{PDF annotations} will get lossed.}
+% will get lossed during inclusion. (Using |\includepdf|,
+% |\includegraphics|, or other low-level commands.)
+%
+% However, there's a gleam of hope. Some links may be extracted and later
+% reinserted by a package called \emph{pax} which can be downloaded from
+% CTAN \cite{pax}. Have a look at it!
+%
%
% \section{Usage}
% \subsection{Package Options}
@@ -400,8 +419,7 @@
% \item[templatesize] This option is similar to the |pagetemplate|
% option, but its arguments specify the size of
% the template directly. Its syntax is:
-% |templatesize={|\meta{width}|}{|\meta{height}|}|, e.g.
-% |templatesize={615pt}{846pt}|.
+% |templatesize={|\meta{width}|}{|\meta{height}|}|
% Note: The two lengths should be a bit larger than
% desired, to keep away from rounding errors.\par
% \df{templatesize=\meta{size of the first inserted page}}
@@ -1000,14 +1018,23 @@
%
%
% \StopEventually{
-% \begin{thebibliography}{1}
+% \begin{thebibliography}{9}
+%
% \bibitem{pdftex}
% H\`an Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh,
% Sebastian Rahtz, Hans Hagen,
% \textit{The \pdfTeX\ user manual},
% \url{http://www.tug.org/applications/pdftex}
-% \bibitem{PDFRef} \textit{PDF Reference}, Adobe Systems Incorporated,\\
+%
+% \bibitem{PDFRef}
+% \textit{PDF Reference}, Adobe Systems Incorporated,\\
% \url{http://www.adobe.com/devnet/pdf/pdf_reference.html}
+%
+% \bibitem{pax}
+% Heiko Oberdiek,
+% \textit{pax: Extract and reinsert PDF annotations with pdfTeX}
+% \url{http://www.ctan.org/tex-archive/macros/latex/contrib/pax/}
+%
% \end{thebibliography}
% }
%
@@ -1040,10 +1067,18 @@
% \end{macrocode}
% These options overrule the automatic detection of the \TeX-engine.
% \begin{macrocode}
-\DeclareOption{pdftex}{\def\AM@driver{pdftex}}
-\DeclareOption{vtex}{\def\AM@driver{vtex}}
+\def\AM@graphics@driver{}
+\DeclareOption{pdftex}{%
+ \def\AM@driver{pdftex}\let\AM@graphics@driver\AM@driver}
+\DeclareOption{vtex}{%
+ \def\AM@driver{vtex}\let\AM@graphics@driver\AM@driver}
+\DeclareOption{xetex}{%
+ \def\AM@driver{xetex}\let\AM@graphics@driver\AM@driver}
+\DeclareOption{dvips}{%
+ \def\AM@driver{dvips}\let\AM@graphics@driver\AM@driver}
+\DeclareOption{dvipdfm}{%
+ \def\AM@driver{dvipdfm}\let\AM@graphics@driver\AM@driver}
\DeclareOption{null}{\def\AM@driver{null}}
-\DeclareOption{xetex}{\def\AM@driver{xetex}}
% \end{macrocode}
% \begin{macrocode}
\ProcessOptions
@@ -1071,7 +1106,8 @@
% \subsection{Required Packages and Version Checking}
%
% \begin{macrocode}
-\RequirePackage{ifthen, graphicx, calc, eso-pic}
+\RequirePackage{ifthen, calc, eso-pic}
+\RequirePackage[\AM@graphics@driver]{graphicx}
\newif\ifAM@DVIoutput\AM@DVIoutputfalse
\input{pp\AM@driver.def}
\ifx\AM@endinput\relax\expandafter\endinput\fi
@@ -1447,10 +1483,10 @@
% Adjust the paper size.
% \begin{macrocode}
\ifthenelse{\boolean{AM@fitpaper}}
- {\setlength{\AM@pagewidth}{\the\wd\@tempboxa}%
- \setlength{\AM@pageheight}{\the\ht\@tempboxa+\the\dp\@tempboxa}%
- \setlength{\paperwidth}{\the\wd\@tempboxa}%
- \setlength{\paperheight}{\the\ht\@tempboxa+\the\dp\@tempboxa}%
+ {\setlength{\AM@pagewidth}{\wd\@tempboxa}%
+ \setlength{\AM@pageheight}{\ht\@tempboxa + \dp\@tempboxa}%
+ \setlength{\paperwidth}{\wd\@tempboxa}%
+ \setlength{\paperheight}{\ht\@tempboxa + \dp\@tempboxa}%
\AM@fitpaper@special
\AM@setpagedimen
\@ifundefined{stockwidth}{}{%
@@ -1628,7 +1664,7 @@
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}%
+ \setlength{\@tempdima}{\ht\@tempboxa + \dp\@tempboxa}%
\edef\AM@localht{\the\@tempdima}%
\AM@rescalefalse
\ifdim\AM@localwd=\AM@templatewidth \else \AM@rescaletrue \fi
@@ -1664,7 +1700,7 @@
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}%
+ \setlength{\@tempdima}{\ht\@tempboxa + \dp\@tempboxa}%
\edef\AM@localht{\the\@tempdima}%
\fi
\setlength{\@tempdima}
@@ -1804,7 +1840,8 @@
{\ifthenelse{\boolean{AM@landscape}}
{\AM@setlscape}{}}
{}%
- \AM@AddToShipoutPicture{\begingroup\AM@picturecommand\endgroup}%
+ \AM@AddToShipoutPicture{%
+ \begingroup\AM@picturecommand\endgroup}%
\ifAM@firstpage
\AM@AddToShipoutPicture{%
\begingroup\AM@picturecommandstar\endgroup}%
@@ -1958,7 +1995,7 @@
\ifthenelse{\boolean{AM@pkg@draft} \and \boolean{AM@survey}}{%
}{%
\PackageError{pdfpages}
- {page number #1 of `\AM@currentdocname' does not exist}
+ {page #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.}%
@@ -2732,7 +2769,7 @@
\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
+ \AM@toc@title{\ignorespaces #4}%
\def\AM@toc@label{\AM@trim@space{#5}}%
\AM@checkinteger{\AM@toc@page}%
\ifAM@integer\else
@@ -2797,7 +2834,7 @@
\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{\AM@trim@leadingspace{#3}}%
+ \def\AM@lof@heading{#3}%
\def\AM@lof@label{\AM@trim@space{#4}}%
\AM@checkinteger{\AM@lof@page}%
\ifAM@integer\else
@@ -3158,8 +3195,8 @@
\let\AM@pagewidth\pdfpagewidth
\let\AM@pageheight\pdfpageheight
\def\AM@setpagedimen{%
- \setlength{\pdfpagewidth}{\the\wd\@tempboxa}%
- \setlength{\pdfpageheight}{\the\ht\@tempboxa+\the\dp\@tempboxa}%
+ \setlength{\pdfpagewidth}{\wd\@tempboxa}%
+ \setlength{\pdfpageheight}{\ht\@tempboxa + \dp\@tempboxa}%
}
\let\AM@pagesize@boogie\relax
% \end{macrocode}
@@ -3284,7 +3321,7 @@
\endgroup
}
\def\AM@region@calc{%
- \setlength{\@tempdima}{\the\ht\@tempboxa + \the\dp\@tempboxa}
+ \setlength{\@tempdima}{\ht\@tempboxa + \dp\@tempboxa}
\edef\AM@region@depth{\the\@tempdima}
}
% \end{macrocode}
@@ -3346,8 +3383,8 @@
\let\AM@pagewidth\mediawidth
\let\AM@pageheight\mediaheight
\def\AM@setpagedimen{%
- \setlength{\mediawidth}{\the\wd\@tempboxa}%
- \setlength{\mediaheight}{\the\ht\@tempboxa+\the\dp\@tempboxa}%
+ \setlength{\mediawidth}{\wd\@tempboxa}%
+ \setlength{\mediaheight}{\ht\@tempboxa+\dp\@tempboxa}%
}
\let\AM@pagesize@boogie\relax
% \end{macrocode}
@@ -3388,7 +3425,8 @@
% Survey.
% \begin{macrocode}
\def\AM@survey@special@begin{%
- \special{!aref pdfpages.\AM@linktodoc@page@m@ne; a=</Border [0 0 0]>}%
+ \special{!aref pdfpages.\AM@linktodoc@page@m@ne;
+ a=</Border [0 0 0]>}%
}
\def\AM@survey@special@end{%
\special{!endaref}%
@@ -3446,9 +3484,26 @@
% \end{macrocode}
% Get last page number.
% \begin{macrocode}
+% \def\AM@remove@relax#1\relax{#1}
+% \def\AM@getpagecount{%
+% \edef\AM@pagecount{\expandafter\AM@remove@relax
+% \the\XeTeXpdfpagecount\AM@XeTeXquote
+% \AM@currentdocname\AM@XeTeXquote\relax}%
+% }
+% \end{macrocode}
+% Get last page number. |\XeTeXpdfpagecount| is only defined
+% for |pdf| files. For all other file types |\AM@pagecount|
+% must be set to |1| explicitely.
+% \begin{macrocode}
\def\AM@getpagecount{%
- \edef\AM@pagecount{\the\XeTeXpdfpagecount\AM@XeTeXquote
- \AM@currentdocname\AM@XeTeXquote\relax}%
+ \expandafter\filename@parse\expandafter{\AM@currentdocname}%
+ \lowercase{\edef\type@ext{.\filename@ext}}%
+ \ifx\type@ext\G@pdf@ext
+ \edef\AM@pagecount{\the\XeTeXpdfpagecount\AM@XeTeXquote
+ \AM@currentdocname\AM@XeTeXquote\relax}%
+ \else
+ \def\AM@pagecount{1}%
+ \fi
}
% \end{macrocode}
% |\XeTeXversion| has changed from time to time: 0.997, 0.997-dev,
@@ -3474,8 +3529,8 @@
\let\AM@pagewidth\pdfpagewidth
\let\AM@pageheight\pdfpageheight
\def\AM@setpagedimen{%
- \setlength{\pdfpagewidth}{\the\wd\@tempboxa}%
- \setlength{\pdfpageheight}{\the\ht\@tempboxa+\the\dp\@tempboxa}%
+ \setlength{\pdfpagewidth}{\wd\@tempboxa}%
+ \setlength{\pdfpageheight}{\ht\@tempboxa+\dp\@tempboxa}%
}
\def\AM@pagesize@boogie{%
\ifdim\AM@pagewidth=\z@
@@ -3631,6 +3686,265 @@
% \iffalse
%</ppxetexdef>
%
+%<*ppdvipsdef>
+% \fi
+%
+% \subsubsection{Dvips driver}
+%
+% \begin{macrocode}
+\def\AM@notsupported#1{%
+ \PackageWarning{pdfpages}{#1 not supported by driver dvips}}
+% \end{macrocode}
+% Get last page number.
+% \begin{macrocode}
+\def\AM@getpagecount{%
+ \ifx\AM@pagecount\AM@undefined
+ \AM@notsupported{Page selections}
+ \def\AM@pagecount{1}%
+ \gdef\AM@getpagecount{%
+ \def\AM@pagecount{1}%
+ }%
+ \fi
+}
+% \end{macrocode}
+% Page dimensions.
+% \begin{macrocode}
+\let\AM@pagewidth\paperwidth
+\let\AM@pageheight\paperheight
+\def\AM@setpagedimen{%
+ \setlength{\paperwidth}{\wd\@tempboxa}%
+ \setlength{\paperheight}{\ht\@tempboxa + \dp\@tempboxa}%
+}
+\let\AM@pagesize@boogie\relax
+% \end{macrocode}
+% Rotate page.
+% \begin{macrocode}
+\def\AM@setlscape{\AM@notsupported{Page rotations}}
+% \end{macrocode}
+% Change paper size.
+% \begin{macrocode}
+\def\AM@fitpaper@special{\AM@notsupported{Option fitpaper}}
+% \end{macrocode}
+% Find file.
+% \begin{macrocode}
+\def\AM@findfile#1{%
+ \AM@findfile@i{#1}{eps}%
+ \ifx\AM@currentdocname\relax
+ \AM@findfile@i{#1}{ps}%
+ \fi
+ \AM@findfile@ii{#1}%
+}
+\let\AM@IfFileExists\IfFileExists
+% \end{macrocode}
+% Link to original document.
+% \begin{macrocode}
+\def\AM@linktodoc@special@begin{Links}
+\let\AM@linktodoc@special@end\relax
+% \end{macrocode}
+% Survey.
+% \begin{macrocode}
+\def\AM@survey@special@begin{\AM@notsupported{Option survey}}
+\let\AM@survey@special@end\relax
+% \end{macrocode}
+% Thread.
+% \begin{macrocode}
+\def\AM@thread@special@begin{\AM@notsupported{Option thread}}
+\let\AM@thread@special@end\relax
+% \end{macrocode}
+% Destination of links.
+% \begin{macrocode}
+\def\AM@dest@special{\AM@notsupported{Links}}
+\def\AM@anchor@special{\AM@notsupported{Links}}
+% \end{macrocode}
+% Convert synatx of \PDF\ destinations.
+% \begin{macrocode}
+\def\AM@convert@dest#1{}
+\def\AM@region@calc{}
+% \end{macrocode}
+% Do not disable |\includegraphics|.
+% \begin{macrocode}
+\let\AM@disable@includegraphics\relax
+% \end{macrocode}
+% Add option page to |\includegraphics|.
+% \begin{macrocode}
+\@ifundefined{KV@Gin@page}{%
+ \define@key{Gin}{page}{%
+ \ifnum#1=1 %
+ \else
+ \PackageError{pdfpages}{%
+ Multipage images are not supported by driver dvips%
+ }\@ehc
+ \fi
+ }}{}
+% \end{macrocode}
+%
+% \iffalse
+%</ppdvipsdef>
+%
+%<*ppdvipdfmdef>
+% \fi
+%
+% \subsubsection{Dvipdfm driver}
+%
+% \begin{macrocode}
+\def\AM@notsupported#1{%
+ \PackageWarning{pdfpages}{#1 not supported by driver dvipdfm}}
+% \end{macrocode}
+% Get last page number.
+% \begin{macrocode}
+\def\AM@getpagecount{%
+ \ifx\AM@pagecount\AM@undefined
+ \AM@notsupported{Page selection}
+ \def\AM@pagecount{1}%
+ \gdef\AM@getpagecount{%
+ \def\AM@pagecount{1}%
+ }%
+ \fi
+}
+% \end{macrocode}
+% Page dimensions.
+% \begin{macrocode}
+\let\AM@pagewidth\paperwidth
+\let\AM@pageheight\paperheight
+\def\AM@setpagedimen{%
+ \setlength{\paperwidth}{\wd\@tempboxa}%
+ \setlength{\paperheight}{\ht\@tempboxa + \dp\@tempboxa}%
+}
+\let\AM@pagesize@boogie\relax
+% \end{macrocode}
+% Rotate page.
+% \begin{macrocode}
+\def\AM@setlscape{\AM@notsupported{Page rotation}}
+% \end{macrocode}
+% Change paper size.
+% \begin{macrocode}
+\def\AM@fitpaper@special{\AM@notsupported{Option fitpaper}}
+% \end{macrocode}
+% Find file.
+% \begin{macrocode}
+\def\AM@findfile#1{%
+ \AM@findfile@i{#1}{pdf}%
+ \AM@findfile@ii{#1}%
+}
+\let\AM@IfFileExists\IfFileExists
+% \end{macrocode}
+% Link to original document.
+% \begin{macrocode}
+\def\AM@linktodoc@special@begin{%
+ \special{pdf: ann
+ width \the\wd\@tempboxa\space
+ height \the\ht\@tempboxa\space
+ depth \the\dp\@tempboxa\space
+ << /Type /Annot
+ /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
+% \end{macrocode}
+% Survey.
+% \begin{macrocode}
+\let\AM@survey@special@begin\relax
+\let\AM@survey@special@end\relax
+% \end{macrocode}
+% Thread.
+% \begin{macrocode}
+\def\AM@thread@special@begin{%
+ \special{pdf: thread @\AM@threadname\space
+ width \the\wd\@tempboxa\space
+ height \the\ht\@tempboxa\space
+ depth \the\dp\@tempboxa\space
+ <<\threadinfodict>>}%
+}
+\let\AM@thread@special@end\relax
+% \end{macrocode}
+% Destination of links.
+% \begin{macrocode}
+\def\AM@view{/Fit}
+\def\AM@dest@special{%
+ \special{pdf: dest (\AM@linkname.\AM@page) [ @thispage \AM@view ]}}
+\def\AM@anchor@special{%
+ \special{pdf: dest (pdfpages.\the\count1) [ @thispage /Fit ]}}
+% \end{macrocode}
+% Convert synatx of \PDF\ destinations.
+% \begin{macrocode}
+\def\AM@convert@dest#1{%
+ \expandafter\AM@convert@dest@i\ifdim\z@=0pt#1 \END\fi}
+\def\AM@convert@dest@i#1 #2\END{%
+ \begingroup
+ \def\tag{#1}%
+ \def\x{FitH}%
+ \ifx\x\tag
+ \gdef\AM@view{/FitH @ypos}%
+ \else
+ \def\x{FitBH}%
+ \ifx\x\tag
+ \gdef\AM@view{/FitBH @ypos}%
+ \else
+ \def\x{FitV}%
+ \ifx\x\tag
+ \gdef\AM@view{/FitV @xpos}%
+ \else
+ \def\x{FitBV}%
+ \ifx\x\tag
+ \gdef\AM@view{/FitBV @xpos}%
+ \else
+ \def\x{fitr}%
+ \ifx\x\tag
+ \gdef\AM@view{/XYZ @xpos @ypos null}%
+ \PackageWarningNoLine{pdfpages}{%
+ `linkfit=FitR' is not supported.}%
+ \else
+ \def\x{FitB}%
+ \ifx\x\tag
+ \gdef\AM@view{/FitB}%
+ \else
+ \def\x{XYZ}%
+ \ifx\x\tag
+ \gdef\AM@view{/XYZ @xpos @ypos null}%
+ \else
+ \def\x{Region}%
+ \ifx\x\tag
+ \gdef\AM@view{/XYZ @xpos @ypos null}%
+ \PackageWarningNoLine{pdfpages}{%
+ `linkfit=Region' is not supported by dvipdfm.}%
+ \else
+ \gdef\AM@view{/Fit}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \endgroup
+}
+\def\AM@region@calc{}
+% \end{macrocode}
+% Do not disable |\includegraphics|.
+% \begin{macrocode}
+\let\AM@disable@includegraphics\relax
+% \end{macrocode}
+% Add option page for |\includegraphics|.
+% \begin{macrocode}
+\@ifundefined{KV@Gin@page}{%
+ \define@key{Gin}{page}{%
+ \ifnum#1=1 %
+ \else
+ \PackageError{pdfpages}{%
+ Multipage images are not supported by driver dvipdfm%
+ }\@ehc
+ \fi
+ }}{}
+% \end{macrocode}
+%
+% \iffalse
+%</ppdvipdfmdef>
+%
%<*ppnulldef>
% \fi
%
@@ -3669,8 +3983,8 @@
\let\AM@pagewidth\paperwidth
\let\AM@pageheight\paperheight
\def\AM@setpagedimen{%
- \setlength{\paperwidth}{\the\wd\@tempboxa}%
- \setlength{\paperheight}{\the\ht\@tempboxa+\the\dp\@tempboxa}%
+ \setlength{\paperwidth}{\wd\@tempboxa}%
+ \setlength{\paperheight}{\ht\@tempboxa + \dp\@tempboxa}%
}
\let\AM@pagesize@boogie\relax
% \end{macrocode}
@@ -3730,7 +4044,6 @@
%</ppnulldef>
% \fi
%
-%
% \section{History}
%
% \subsection*{2001/01/17 v0.1b}
@@ -3831,8 +4144,8 @@
%
% \subsection*{2008/05/11 v0.4e}
% \begin{itemize}
-% \item Make |\AM@trim@leadinspace| robust to allow macros
-% in the caption-argument of |addtolist|.
+% \item Make |\AM@trim@leadingspace| robust to allow macros
+% in the caption argument of |addtolist|.
% \end{itemize}
%
% \subsection*{2008/06/05 v0.4f}
@@ -3844,10 +4157,23 @@
%
% \subsection*{2008/10/17 v0.4g}
% \begin{itemize}
-% \item Macro \AM@region@calc was missing in the VTeX driver.
+% \item Macro |\AM@region@calc| was missing in the VTeX driver.
% \end{itemize}
-% \Finale
%
+% \subsection*{2009/06/07 v0.4h}
+% \begin{itemize}
+% \item Added dvips driver provided by Heiko Oberdiek.
+% \end{itemize}
+%
+% \subsection*{2009/10/11 v0.4i}
+% \begin{itemize}
+% \item Added dvipdfm driver.
+% \item |\AM@toc@title| uses |\ignorespaces|, |\AM@lof@heading|
+% doesn't need that
+% \end{itemize}
+%
+% \Finale
+%
% \iffalse
%<*example1>
\documentclass[a4paper,12pt]{article}
@@ -4212,6 +4538,10 @@ This file demonstrates how to use the pdfpages package.
\generate{\usepreamble\package
\file{ppxetex.def}{\from{pdfpages.dtx}{ppxetexdef}}}
\generate{\usepreamble\package
+ \file{ppdvips.def}{\from{pdfpages.dtx}{ppdvipsdef}}}
+\generate{\usepreamble\package
+ \file{ppdvipdfm.def}{\from{pdfpages.dtx}{ppdvipdfmdef}}}
+\generate{\usepreamble\package
\file{ppnull.def}{\from{pdfpages.dtx}{ppnulldef}}}
%% \generate{\usepreamble\package
@@ -4225,7 +4555,7 @@ This file demonstrates how to use the pdfpages package.
\file{pdf-toc.tex}{\from{pdfpages.dtx}{example3}}}
-\Msg{^^46^^75^^65^^72 ^^64^^69^^63^^68^^2c ^^41^^67^^6e^^65^^73^^21^^J}
+%\Msg{^^46^^75^^65^^72 ^^64^^69^^63^^68^^2c ^^41^^67^^6e^^65^^73^^21^^J}
\Msg{**************************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
@@ -4235,6 +4565,7 @@ This file demonstrates how to use the pdfpages package.
\Msg{* \space\space pppdftex.def}
\Msg{* \space\space ppvtex.def}
\Msg{* \space\space ppxetex.def}
+\Msg{* \space\space ppdvips.def}
\Msg{* \space\space ppnull.def}
\Msg{*}
\Msg{* To produce the documentation, run the following}
diff --git a/Master/texmf-dist/source/latex/pdfpages/pdfpages.ins b/Master/texmf-dist/source/latex/pdfpages/pdfpages.ins
index 433a249841a..e792ff00de9 100644
--- a/Master/texmf-dist/source/latex/pdfpages/pdfpages.ins
+++ b/Master/texmf-dist/source/latex/pdfpages/pdfpages.ins
@@ -48,6 +48,10 @@ This file demonstrates how to use the pdfpages package.
\generate{\usepreamble\package
\file{ppxetex.def}{\from{pdfpages.dtx}{ppxetexdef}}}
\generate{\usepreamble\package
+ \file{ppdvips.def}{\from{pdfpages.dtx}{ppdvipsdef}}}
+\generate{\usepreamble\package
+ \file{ppdvipdfm.def}{\from{pdfpages.dtx}{ppdvipdfmdef}}}
+\generate{\usepreamble\package
\file{ppnull.def}{\from{pdfpages.dtx}{ppnulldef}}}
%% \generate{\usepreamble\package
@@ -60,7 +64,6 @@ This file demonstrates how to use the pdfpages package.
\generate{\usepreamble\example
\file{pdf-toc.tex}{\from{pdfpages.dtx}{example3}}}
-\Msg{^^46^^75^^65^^72 ^^64^^69^^63^^68^^2c ^^41^^67^^6e^^65^^73^^21^^J}
\Msg{**************************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the following}
@@ -70,6 +73,7 @@ This file demonstrates how to use the pdfpages package.
\Msg{* \space\space pppdftex.def}
\Msg{* \space\space ppvtex.def}
\Msg{* \space\space ppxetex.def}
+\Msg{* \space\space ppdvips.def}
\Msg{* \space\space ppnull.def}
\Msg{*}
\Msg{* To produce the documentation, run the following}