| 1 |
%% |
| 2 |
%% This is file `ppdvipdfmx.def', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% pdfpages.dtx (with options: `ppdvipdfmxdef') |
| 8 |
%% |
| 9 |
%% This file is part of the pdfpages package. |
| 10 |
%% |
| 11 |
%% Copyright (C) 2001-2026 Andreas MATTHIAS |
| 12 |
%% |
| 13 |
%% This work may be distributed and/or modified under the conditions |
| 14 |
%% of the LaTeX Project Public License, either version 1.3c |
| 15 |
%% of this license or (at your option) any later version. |
| 16 |
%% The latest version of this license is in |
| 17 |
%% <http://www.latex-project.org/lppl.txt>. |
| 18 |
%% |
| 19 |
%% This work has the LPPL maintenance status `maintained'. |
| 20 |
%% |
| 21 |
%% The Current Maintainer of this work is |
| 22 |
%% Andreas Matthias <[email protected]>. |
| 23 |
%% |
| 24 |
%% Please send error reports and suggestions for improvements to |
| 25 |
%% Andreas MATTHIAS <[email protected]>. |
| 26 |
%% |
| 27 |
\def\AM@git@tag{v0.6h} |
| 28 |
\def\AM@git@date{2026/03/30} |
| 29 |
\def\AM@git@hash{8329ae0af7} |
| 30 |
\ProvidesFile{ppdvipdfmx.def} |
| 31 |
[\AM@git@date\space\AM@git@tag\space |
| 32 |
Pdfpages driver for dvipdfmx (AM)] |
| 33 |
\def\AM@tmp{dvipdfmx.def} |
| 34 |
\ifx\Gin@driver\AM@tmp\else |
| 35 |
\PackageWarningNoLine{pdfpages}{% |
| 36 |
Graphicx.sty not loaded with driver `dvipdfmx'.\MessageBreak |
| 37 |
Please, specify the driver as a class option\MessageBreak |
| 38 |
\@spaces \string\documentclass[dvipdfmx]{...}\MessageBreak |
| 39 |
or load graphicx explicitely before pdfpages,\MessageBreak |
| 40 |
e.g.:\MessageBreak |
| 41 |
\@spaces \string\usepackage[dvipdfmx]{graphicx}\MessageBreak |
| 42 |
\@spaces \string\usepackage[dvipdfmx]{pdfpages}\MessageBreak |
| 43 |
This time I will try to load `dvipdfmx.def' which \MessageBreak |
| 44 |
will overwrite `\string\Gin@driver'.\MessageBreak |
| 45 |
Let's hope for the best}% |
| 46 |
\input{dvipdfmx.def}% |
| 47 |
\fi |
| 48 |
{\catcode`\"=12 |
| 49 |
\gdef\AM@quote{"}% |
| 50 |
}% |
| 51 |
\def\AM@getpagecount{% |
| 52 |
\ifAM@pagecount@updated |
| 53 |
\else |
| 54 |
\expandafter\expandafter\expandafter\AM@get@xbb@filename |
| 55 |
\csname Gin@[email protected]\endcsname\AM@currentdocname |
| 56 |
\immediate\openin\@inputcheck=\AM@xbb@filename |
| 57 |
\AM@read@xbb\@inputcheck |
| 58 |
\immediate\closein\@inputcheck |
| 59 |
\ifAM@pagecount@updated |
| 60 |
\PackageInfo{pdfpages}{Reading file `\AM@xbb@filename'}% |
| 61 |
\fi |
| 62 |
\ifAM@pagecount@updated |
| 63 |
\else |
| 64 |
\immediate\openin\@inputcheck= |
| 65 |
\AM@quote|extractbb -O \AM@currentdocname\AM@quote |
| 66 |
\AM@read@xbb\@inputcheck |
| 67 |
\immediate\closein\@inputcheck |
| 68 |
\PackageInfo{pdfpages}{Running extractbb on file `\AM@currentdocname'}% |
| 69 |
\fi |
| 70 |
\fi |
| 71 |
\ifx\AM@pagecount\AM@undefined |
| 72 |
\def\AM@pagecount{1} |
| 73 |
\fi |
| 74 |
} |
| 75 |
\def\AM@get@xbb@filename#1#2#3{% |
| 76 |
\filename@parse{#3}% |
| 77 |
\edef\AM@xbb@filename{\filename@area\filename@base#2}% |
| 78 |
} |
| 79 |
\def\AM@read@xbb#1{% |
| 80 |
\@tempswatrue |
| 81 |
\loop |
| 82 |
\ifeof#1 |
| 83 |
\@tempswafalse |
| 84 |
\else |
| 85 |
\begingroup |
| 86 |
\catcode`\%=12\relax |
| 87 |
\immediate\global\read#1 to \@tempa |
| 88 |
\endgroup |
| 89 |
\expandafter\AM@find@pages\@tempa:\relax |
| 90 |
\fi |
| 91 |
\if@tempswa\repeat |
| 92 |
} |
| 93 |
\long\def\AM@find@pages#1:#2\relax{% |
| 94 |
\def\@tempb{#1}% |
| 95 |
\edef\@tempc{\@percentchar\@percentchar Pages}% |
| 96 |
\ifx\@tempb\@tempc |
| 97 |
\AM@set@pagecount#2% |
| 98 |
\AM@pagecount@updatedtrue |
| 99 |
\fi |
| 100 |
} |
| 101 |
\def\AM@set@pagecount#1:{\def\AM@pagecount{#1}} |
| 102 |
\def\AM@getpagedimen{% |
| 103 |
\AM@pagewidth=\paperwidth |
| 104 |
\AM@pageheight=\paperheight |
| 105 |
} |
| 106 |
\def\AM@setpagedimen{% |
| 107 |
\special{pdf:pagesize width \the\AM@pagewidth\space |
| 108 |
height \the\AM@pageheight\space}% |
| 109 |
} |
| 110 |
\def\AM@pagesize@boogie{% |
| 111 |
\ifdim\AM@pagewidth=\z@ |
| 112 |
\ifdim\AM@pageheight=\z@ |
| 113 |
\let\AM@pagewidth\paperwidth |
| 114 |
\let\AM@pageheight\paperheight |
| 115 |
\fi |
| 116 |
\fi |
| 117 |
} |
| 118 |
\def\AM@setRotate{\special{pdf: put @thispage <</Rotate 90>>}}% |
| 119 |
\def\AM@resetRotate{} |
| 120 |
\let\AM@fitpaper@special\relax |
| 121 |
\def\AM@findfile#1{% |
| 122 |
\AM@findfile@i{#1}{pdf}% |
| 123 |
\AM@findfile@ii{#1}% |
| 124 |
} |
| 125 |
\let\AM@IfFileExists\IfFileExists |
| 126 |
\def\AM@linktodoc@special@begin{% |
| 127 |
\special{pdf: ann |
| 128 |
width \the\wd\@tempboxa\space |
| 129 |
height \the\ht\@tempboxa\space |
| 130 |
depth \the\dp\@tempboxa\space |
| 131 |
<< /Type /Annot |
| 132 |
/Subtype /Link /Border [0 0 0] |
| 133 |
/A << /S /GoToR |
| 134 |
/F (\AM@linkfilename) |
| 135 |
/D [\AM@linktodoc@page@m@ne \AM@linktodocfit] |
| 136 |
\ifAM@newwindow/NewWindow true\fi >> |
| 137 |
>>}% |
| 138 |
} |
| 139 |
\let\AM@linktodoc@special@end\relax |
| 140 |
\let\AM@survey@special@begin\relax |
| 141 |
\let\AM@survey@special@end\relax |
| 142 |
\def\AM@thread@special@begin{% |
| 143 |
\special{pdf: thread @\AM@threadname\space |
| 144 |
width \the\wd\@tempboxa\space |
| 145 |
height \the\ht\@tempboxa\space |
| 146 |
depth \the\dp\@tempboxa\space |
| 147 |
<<\threadinfodict>>}% |
| 148 |
} |
| 149 |
\let\AM@thread@special@end\relax |
| 150 |
\def\AM@reset@view{% |
| 151 |
\def\AM@view{/Fit}% |
| 152 |
\def\AM@view@xpos{0}% |
| 153 |
\def\AM@view@ypos{}} |
| 154 |
\def\AM@dest@special{% |
| 155 |
\special{pdf: dest (\AM@linkname.\AM@page) [ @thispage \AM@view ]}} |
| 156 |
\def\AM@anchor@special{% |
| 157 |
\special{pdf: dest (pdfpages.\the\count1) [ @thispage /Fit ]}} |
| 158 |
\def\AM@convert@dest#1{% |
| 159 |
\expandafter\AM@convert@dest@i\ifdim\z@=0pt#1 \END\fi} |
| 160 |
\def\AM@convert@dest@i#1 #2\END{% |
| 161 |
\begingroup |
| 162 |
\def\tag{#1}% |
| 163 |
\def\x{FitH}% |
| 164 |
\ifx\x\tag |
| 165 |
\gdef\AM@view{/FitH @ypos}% |
| 166 |
\else |
| 167 |
\def\x{FitBH}% |
| 168 |
\ifx\x\tag |
| 169 |
\gdef\AM@view{/FitBH @ypos}% |
| 170 |
\else |
| 171 |
\def\x{FitV}% |
| 172 |
\ifx\x\tag |
| 173 |
\gdef\AM@view{/FitV @xpos}% |
| 174 |
\else |
| 175 |
\def\x{FitBV}% |
| 176 |
\ifx\x\tag |
| 177 |
\gdef\AM@view{/FitBV @xpos}% |
| 178 |
\else |
| 179 |
\def\x{fitr}% |
| 180 |
\ifx\x\tag |
| 181 |
\gdef\AM@view{/XYZ @xpos @ypos null}% |
| 182 |
\PackageWarningNoLine{pdfpages}{% |
| 183 |
`linkfit=FitR' is not supported.}% |
| 184 |
\else |
| 185 |
\def\x{FitB}% |
| 186 |
\ifx\x\tag |
| 187 |
\gdef\AM@view{/FitB}% |
| 188 |
\else |
| 189 |
\def\x{XYZ}% |
| 190 |
\ifx\x\tag |
| 191 |
\gdef\AM@view{/XYZ @xpos @ypos null}% |
| 192 |
\else |
| 193 |
\def\x{Region}% |
| 194 |
\ifx\x\tag |
| 195 |
\gdef\AM@view{/XYZ @xpos @ypos null}% |
| 196 |
\PackageWarningNoLine{pdfpages}{% |
| 197 |
`linkfit=Region' is not supported by dvipdfmx.}% |
| 198 |
\else |
| 199 |
\gdef\AM@view{/Fit}% |
| 200 |
\fi |
| 201 |
\fi |
| 202 |
\fi |
| 203 |
\fi |
| 204 |
\fi |
| 205 |
\fi |
| 206 |
\fi |
| 207 |
\fi |
| 208 |
\endgroup |
| 209 |
} |
| 210 |
\let\AM@disable@includegraphics\relax |
| 211 |
\endinput |
| 212 |
%% |
| 213 |
%% End of file `ppdvipdfmx.def'. |