diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdfpages/ppdvipdfmx.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/pdfpages/ppdvipdfmx.def | 50 |
1 files changed, 41 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/pdfpages/ppdvipdfmx.def b/Master/texmf-dist/tex/latex/pdfpages/ppdvipdfmx.def index a0e605e9be8..e334f0447a4 100644 --- a/Master/texmf-dist/tex/latex/pdfpages/ppdvipdfmx.def +++ b/Master/texmf-dist/tex/latex/pdfpages/ppdvipdfmx.def @@ -24,12 +24,12 @@ %% Please send error reports and suggestions for improvements to %% Andreas MATTHIAS <andreas.matthias@gmail.com>. %% -\def\AM@fileversion{v0.5a} +\def\AM@fileversion{v0.5b} \def\AM@Git@Date@process$#1: #2 #3${\AM@Git@Date@process@i#2\END} \def\AM@Git@Date@process@i#1-#2-#3\END{\def\AM@Git@Date{#1/#2/#3}} \def\AM@Git@SHA@process$#1: #2${\def\AM@Git@SHA{#2}} -\AM@Git@Date@process$Date: 2015-07-19 17:18:25 +0200 $ -\AM@Git@SHA@process$SHA-1: e79a333f7b4030269da1c5f48fa2c8d07b41b058 $ +\AM@Git@Date@process$Date: 2015-08-13 17:38:37 +0200 $ +\AM@Git@SHA@process$SHA-1: 54e50f1cc837f422c29e405d8b7d7849b0530ceb $ \ProvidesFile{ppdvipdfmx.def} [\AM@Git@Date\space\AM@fileversion\space Pdfpages driver for dvipdfmx (AM)] @@ -48,16 +48,48 @@ Let's hope for the best}% \input{dvipdfmx.def}% \fi -\PackageInfo{pdfpages}{% - Driver `dvipdfmx' cannot detect the total number\MessageBreak - of pages of a PDF. Use option `lastpage' to give\MessageBreak - me a hint} +{\catcode`\"=12 + \gdef\AM@quote{"}% +} \def\AM@getpagecount{% + \expandafter\expandafter\expandafter\AM@get@xbb@filename + \csname Gin@rule@.pdf\endcsname\AM@currentdocname + \immediate\openin\@inputcheck=\AM@xbb@filename + \AM@read@xbb\@inputcheck + \immediate\closein\@inputcheck + \ifx\AM@pagecount\AM@undefined + \immediate\openin\@inputcheck=\AM@quote|extractbb -O \AM@currentdocname\AM@quote + \AM@read@xbb\@inputcheck + \immediate\closein\@inputcheck + \fi \ifx\AM@pagecount\AM@undefined - \def\AM@pagecount{1}% + \def\AM@pagecount{1} \fi } -\newcommand*{\AM@checkpagenumber}[1]{} +\def\AM@get@xbb@filename#1#2#3{% + \filename@parse{#3}% + \edef\AM@xbb@filename{\filename@area\filename@base#2}% +} +\def\AM@read@xbb#1{% + \@tempswatrue + \loop + \ifeof#1 + \@tempswafalse + \else + \begingroup + \catcode`\%=12\relax + \immediate\global\read#1 to \@tempa + \endgroup + \expandafter\AM@find@pages\@tempa:\relax + \fi + \if@tempswa\repeat +} +\long\def\AM@find@pages#1:#2\relax{% + \def\@tempb{#1}% + \edef\@tempc{\@percentchar\@percentchar Pages}% + \ifx\@tempb\@tempc\AM@set@pagecount#2\fi +} +\def\AM@set@pagecount#1:{\def\AM@pagecount{#1}} \def\AM@getpagedimen{% \AM@pagewidth=\paperwidth \AM@pageheight=\paperheight |