| 1 |
%% |
| 2 |
%% This is file `atfi-luatex.def', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% attachfile2.dtx (with options: `luatex') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: attachfile2 |
| 12 |
%% Version: 2024-01-18 v2.12 |
| 13 |
%% |
| 14 |
%% Copyright (C) |
| 15 |
%% 2005-2010, 2012 Heiko Oberdiek |
| 16 |
%% 2016-2019 Oberdiek Package Support Group |
| 17 |
%% |
| 18 |
%% This work may be distributed and/or modified under the |
| 19 |
%% conditions of the LaTeX Project Public License, either |
| 20 |
%% version 1.3c of this license or (at your option) any later |
| 21 |
%% version. This version of this license is in |
| 22 |
%% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 23 |
%% and the latest version of this license is in |
| 24 |
%% https://www.latex-project.org/lppl.txt |
| 25 |
%% and version 1.3 or later is part of all distributions of |
| 26 |
%% LaTeX version 2005/12/01 or later. |
| 27 |
%% |
| 28 |
%% This work has the LPPL maintenance status "maintained". |
| 29 |
%% |
| 30 |
%% The Current Maintainers of this work are |
| 31 |
%% Heiko Oberdiek and the Oberdiek Package Support Group |
| 32 |
%% https://github.com/ho-tex/attachfile2/issues |
| 33 |
%% |
| 34 |
%% |
| 35 |
%% This work consists of the main source file attachfile2.dtx |
| 36 |
%% and the derived files |
| 37 |
%% attachfile2.sty, attachfile2.pdf, |
| 38 |
%% atfi-dvips.def, atfi-pdftex.def, atfi-dvipdfmx.def, atfi-luatex.def |
| 39 |
%% pdfatfi.pl, pdfatfi.1. |
| 40 |
%% |
| 41 |
\NeedsTeXFormat{LaTeX2e} |
| 42 |
\ProvidesFile{atfi-luatex.def}% |
| 43 |
[2024-01-18 v2.12 attachfile2 driver for luaTeX (HO)]% |
| 44 |
\protected\def\atfi@literal {\pdfextension literal} |
| 45 |
\def\atfi@GSAVE{q } |
| 46 |
\def\atfi@GRESTORE{Q } |
| 47 |
\def\atfi@SETLINEWIDTH{w } |
| 48 |
\def\atfi@LINETO{l } |
| 49 |
\def\atfi@MOVETO{m } |
| 50 |
\def\atfi@STROKE{S } |
| 51 |
\def\atfi@FILL{f } |
| 52 |
\def\atfi@FILLSTROKE#1#2{#1#2B } |
| 53 |
\def\atfi@SETRGBCOLORSTROKE{RG } |
| 54 |
\def\atfi@SETRGBCOLORFILL{rg } |
| 55 |
\def\atfi@SETGRAYSTROKE{G } |
| 56 |
\def\atfi@SETGRAYFILL{g } |
| 57 |
\def\atfi@SETCMYKCOLORSTROKE{K } |
| 58 |
\def\atfi@SETCMYKCOLORFILL{k } |
| 59 |
\def\atfi@RECTFILL{re f } |
| 60 |
\def\atfi@RECTSTROKEFILL#1#2#3{#1#2#3re B } |
| 61 |
\def\atfi@SETMITERLIMIT{M } |
| 62 |
\def\atfi@SETFLAT{i } |
| 63 |
\def\atfi@SETLINECAP{J } |
| 64 |
\def\atfi@CURVETO{c } |
| 65 |
\def\atfi@CURVETOV{v } |
| 66 |
\def\atfi@CURVETOY{y } |
| 67 |
\def\atfi@CLOSEPATH{h } |
| 68 |
\def\atfi@SETLINEJOIN{j } |
| 69 |
\define@key{AtFi@file}{Size}{% |
| 70 |
\edef\atfi@params{\atfi@params/Size #1}% |
| 71 |
} |
| 72 |
\def\atfi@embedfile#1{% |
| 73 |
\ltx@IfUndefined{atfi@fileobj@#1}{% |
| 74 |
\begingroup |
| 75 |
\let\atfi@params\ltx@empty |
| 76 |
\expandafter\let\expandafter\atfi@temp |
| 77 |
\csname atfi@file@#1\endcsname |
| 78 |
\ifx\atfi@temp\ltx@empty |
| 79 |
\let\atfi@temp\relax |
| 80 |
\fi |
| 81 |
\ifx\atfi@temp\relax |
| 82 |
\atfi@pdftexdata{#1}% |
| 83 |
\else |
| 84 |
\edef\x{% |
| 85 |
\noexpand\setkeys{AtFi@file}{\@nameuse{atfi@file@#1}}% |
| 86 |
}% |
| 87 |
\x |
| 88 |
\fi |
| 89 |
\ifx\atfi@params\ltx@empty |
| 90 |
\else |
| 91 |
\edef\atfi@params{/Params<<\atfi@params>>}% |
| 92 |
\fi |
| 93 |
\immediate\pdfextension obj stream attr {% |
| 94 |
/Type/EmbeddedFile% |
| 95 |
\atfi@mimetype |
| 96 |
\atfi@params |
| 97 |
} file {#1}% |
| 98 |
\expandafter |
| 99 |
\xdef\csname atfi@fileobj@#1\endcsname{\the\numexpr\pdffeedback lastobj\relax}% |
| 100 |
\endgroup |
| 101 |
}{% |
| 102 |
% file already embedded |
| 103 |
}% |
| 104 |
} |
| 105 |
\def\atfi@xform{% |
| 106 |
\immediate\saveboxresource\atfi@appearancebox |
| 107 |
\edef\atfi@appearanceobj{\the\lastsavedboxresourceindex}% |
| 108 |
} |
| 109 |
\let\atfi@xform@icon\atfi@xform |
| 110 |
\def\atfi@refxform#1{% |
| 111 |
\useboxresource#1\relax |
| 112 |
} |
| 113 |
\def\atfi@insert@file@annot#1{% |
| 114 |
\rule{0pt}{0pt}% |
| 115 |
\ifatfi@appearance |
| 116 |
\def\atfi@appearance@dict{% |
| 117 |
/AP<<% |
| 118 |
/N \atfi@appearanceobj\space 0 R% |
| 119 |
/R \atfi@appearanceobj\space 0 R% |
| 120 |
/D \atfi@appearanceobj\space 0 R% |
| 121 |
>>% |
| 122 |
}% |
| 123 |
\else |
| 124 |
\let\atfi@appearance@dict\ltx@empty |
| 125 |
\fi |
| 126 |
\ltx@IfUndefined{atfi@fsobj@#1}{% |
| 127 |
\begingroup |
| 128 |
\hypersetup{unicode=false}% |
| 129 |
\atfi@pdfstringdef\atfi@file{#1}% |
| 130 |
\immediate\pdfextension obj{% |
| 131 |
<<% |
| 132 |
/Type/Filespec% |
| 133 |
/F(\atfi@file)% |
| 134 |
\ifx\atfi@ucfilespec\ltx@empty |
| 135 |
\else |
| 136 |
/UF(\atfi@ucfilespec)% |
| 137 |
\fi |
| 138 |
/EF<<% |
| 139 |
/F \@nameuse{atfi@fileobj@#1} 0 R% |
| 140 |
>>% |
| 141 |
>>% |
| 142 |
}% |
| 143 |
\expandafter\xdef\csname atfi@fsobj@#1\endcsname{% |
| 144 |
\the\numexpr\pdffeedback lastobj\relax |
| 145 |
}% |
| 146 |
\endgroup |
| 147 |
}{% |
| 148 |
}% |
| 149 |
\pdfextension annot width \atfi@scale\atfi@appearancewidth |
| 150 |
height \atfi@scale\atfi@appearanceheight |
| 151 |
depth \atfi@scale\atfi@appearancedepth {% |
| 152 |
/Subtype/FileAttachment% |
| 153 |
\atfi@icon |
| 154 |
\atfi@color@annot |
| 155 |
\atfi@author |
| 156 |
\atfi@date |
| 157 |
\atfi@annotname |
| 158 |
\atfi@description |
| 159 |
\atfi@subject |
| 160 |
\atfi@appearance@dict |
| 161 |
/F \theatfi@flags |
| 162 |
/FS \@nameuse{atfi@fsobj@#1} 0 R% |
| 163 |
}% |
| 164 |
\rule{0pt}{\atfi@appearanceheight}% |
| 165 |
\rule[-\atfi@appearancedepth]{0pt}{\atfi@appearancedepth}% |
| 166 |
\rule{\atfi@appearancewidth}{0pt}% |
| 167 |
} |
| 168 |
\endinput |
| 169 |
%% |
| 170 |
%% End of file `atfi-luatex.def'. |