| 1 |
%% |
| 2 |
%% This is file `ppluatex.def', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% pdfpages.dtx (with options: `ppluatexdef') |
| 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{ppluatex.def} |
| 31 |
[\AM@git@date\space\AM@git@tag\space |
| 32 |
Pdfpages driver for LuaTeX (AM)] |
| 33 |
\ifnum\luatexversion<85 |
| 34 |
\let\AM@outputmode\pdfoutput |
| 35 |
\let\AM@saveimageresource\pdfximage |
| 36 |
\let\AM@lastsavedimageresourcepages\pdflastximagepages |
| 37 |
\let\AM@luatexpagewidth\pdfpagewidth |
| 38 |
\let\AM@luatexpageheight\pdfpageheight |
| 39 |
\let\AM@annotation\pdfannot |
| 40 |
\let\AM@thread\pdfthread |
| 41 |
\let\AM@destination\pdfdest |
| 42 |
\else |
| 43 |
\let\AM@outputmode\outputmode |
| 44 |
\let\AM@saveimageresource\saveimageresource |
| 45 |
\let\AM@lastsavedimageresourcepages\lastsavedimageresourcepages |
| 46 |
\let\AM@luatexpagewidth\pagewidth |
| 47 |
\let\AM@luatexpageheight\pageheight |
| 48 |
\protected\def\AM@annotation {\pdfextension annot }% |
| 49 |
\protected\def\AM@thread {\pdfextension thread }% |
| 50 |
\protected\def\AM@destination {\pdfextension dest }% |
| 51 |
\fi |
| 52 |
\ifcase\AM@outputmode |
| 53 |
\input{ppnull.def} |
| 54 |
\expandafter\endinput |
| 55 |
\fi |
| 56 |
|
| 57 |
\let\AM@Gread@@pdftex\Gread@@pdftex |
| 58 |
\renewcommand*{\Gread@@pdftex}[1]{% |
| 59 |
\xdef\AM@currentdocname@fix{#1}% |
| 60 |
\AM@Gread@@pdftex{#1}% |
| 61 |
} |
| 62 |
\def\AM@getpagecount{% |
| 63 |
\setbox\@tempboxa=\hbox{\includegraphics{\AM@currentdocname}}% |
| 64 |
\AM@saveimageresource{\AM@currentdocname@fix}% |
| 65 |
\edef\AM@pagecount{\the\AM@lastsavedimageresourcepages}% |
| 66 |
} |
| 67 |
\def\AM@getpagedimen{% |
| 68 |
\AM@pagewidth=\paperwidth |
| 69 |
\AM@pageheight=\paperheight |
| 70 |
} |
| 71 |
\def\AM@setpagedimen{% |
| 72 |
\AM@luatexpagewidth\AM@pagewidth |
| 73 |
\AM@luatexpageheight\AM@pageheight |
| 74 |
} |
| 75 |
\let\AM@pagesize@boogie\relax |
| 76 |
\let\AM@fitpaper@special\relax |
| 77 |
\def\AM@findfile#1{% |
| 78 |
\AM@findfile@i{#1}{pdf}% |
| 79 |
\AM@findfile@ii{#1}% |
| 80 |
} |
| 81 |
\AtBeginDocument{% |
| 82 |
\let\AM@IfFileExists\IfFileExists |
| 83 |
\@ifpackageloaded{grffile}{% |
| 84 |
\@ifundefined{grffile@IfFileExists}{}{% |
| 85 |
\let\AM@IfFileExists\grffile@IfFileExists}% |
| 86 |
}{}% |
| 87 |
} |
| 88 |
\ExplSyntaxOn |
| 89 |
\@ifundefined{pdfmanagement_add:nnn}{% |
| 90 |
\def\AM@setRotate{\PLS@Rotate{90}}% |
| 91 |
\def\AM@resetRotate{\PLS@Rotate{0}}% |
| 92 |
}{% |
| 93 |
\def\AM@setRotate{\pdfmanagement_add:nnn{ThisPage}{Rotate}{90}}% |
| 94 |
\def\AM@resetRotate{}% |
| 95 |
}% |
| 96 |
\ExplSyntaxOff |
| 97 |
\def\AM@linktodoc@special@begin{% |
| 98 |
\AM@annotation width \wd\@tempboxa |
| 99 |
height \ht\@tempboxa |
| 100 |
depth \dp\@tempboxa |
| 101 |
{/Subtype /Link /Border [0 0 0] |
| 102 |
/A << /S /GoToR |
| 103 |
/F (\AM@linkfilename) |
| 104 |
/D [\AM@linktodoc@page@m@ne \AM@linktodocfit] |
| 105 |
\ifAM@newwindow/NewWindow true\fi >>}% |
| 106 |
} |
| 107 |
\let\AM@linktodoc@special@end\relax |
| 108 |
\def\AM@survey@special@begin{% |
| 109 |
\AM@annotation width \wd\@tempboxa |
| 110 |
height \ht\@tempboxa |
| 111 |
depth \dp\@tempboxa |
| 112 |
{/Subtype /Link /Border [0 0 0] |
| 113 |
/A << /S /GoTo |
| 114 |
/D (pdfpages.\AM@linktodoc@page@m@ne) >>}% |
| 115 |
} |
| 116 |
\let\AM@survey@special@end\relax |
| 117 |
\def\AM@thread@special@begin{% |
| 118 |
\AM@thread width \wd\@tempboxa |
| 119 |
height \ht\@tempboxa |
| 120 |
depth \dp\@tempboxa |
| 121 |
attr {/I <<\threadinfodict>>}% |
| 122 |
name {\AM@threadname}% |
| 123 |
} |
| 124 |
\let\AM@thread@special@end\relax |
| 125 |
\def\AM@reset@view{% |
| 126 |
\def\AM@view{fit}% |
| 127 |
\def\AM@view@xpos{0}% |
| 128 |
\def\AM@view@ypos{}} |
| 129 |
\def\AM@dest@special{\AM@destination name {\AM@linkname.\AM@page} \AM@view} |
| 130 |
\def\AM@anchor@special{\AM@destination name {pdfpages.\the\count1} fit} |
| 131 |
\def\AM@convert@dest#1{% |
| 132 |
\AM@convert@dest@i #1 0 0 0\END} |
| 133 |
\def\AM@convert@dest@i#1 #2 #3 #4\END{% |
| 134 |
\def\tag{#1}% |
| 135 |
\def\x{FitH}% |
| 136 |
\ifx\x\tag |
| 137 |
\def\AM@view{fith}% |
| 138 |
\def\AM@view@ypos{#2}% |
| 139 |
\else |
| 140 |
\def\x{FitBH}% |
| 141 |
\ifx\x\tag |
| 142 |
\def\AM@view{fitbh}% |
| 143 |
\def\AM@view@ypos{#2}% |
| 144 |
\else |
| 145 |
\def\x{FitV}% |
| 146 |
\ifx\x\tag |
| 147 |
\def\AM@view{fitv}% |
| 148 |
\def\AM@view@xpos{#2}% |
| 149 |
\else |
| 150 |
\def\x{FitBV}% |
| 151 |
\ifx\x\tag |
| 152 |
\def\AM@view{fitbv}% |
| 153 |
\def\AM@view@xpos{#2}% |
| 154 |
\else |
| 155 |
\def\x{FitR}% |
| 156 |
\ifx\x\tag |
| 157 |
\def\AM@view{fitr}% |
| 158 |
\PackageWarningNoLine{pdfpages}{% |
| 159 |
`linkfit=FitR' is not supported, |
| 160 |
I will try `linkfit=Region'.}% |
| 161 |
\def\tag{region}% |
| 162 |
\else |
| 163 |
\def\x{FitB}% |
| 164 |
\ifx\x\tag |
| 165 |
\def\AM@view{fitb}% |
| 166 |
\else |
| 167 |
\def\x{XYZ}% |
| 168 |
\ifx\x\tag |
| 169 |
\def\AM@view{xyz zoom \AM@thousand{#4}}% |
| 170 |
\def\AM@view@xpos{#2} |
| 171 |
\def\AM@view@ypos{#3} |
| 172 |
\else |
| 173 |
\def\x{Region}% |
| 174 |
\ifx\x\tag |
| 175 |
\def\AM@view{fitr |
| 176 |
width \the\wd\@tempboxa |
| 177 |
height \the\ht\@tempboxa |
| 178 |
depth \the\dp\@tempboxa}% |
| 179 |
\else |
| 180 |
\def\AM@view{fit}% |
| 181 |
\fi |
| 182 |
\fi |
| 183 |
\fi |
| 184 |
\fi |
| 185 |
\fi |
| 186 |
\fi |
| 187 |
\fi |
| 188 |
\fi |
| 189 |
} |
| 190 |
\let\AM@disable@includegraphics\relax |
| 191 |
\endinput |
| 192 |
%% |
| 193 |
%% End of file `ppluatex.def'. |