| 1 |
%% |
| 2 |
%% This is file `atfi-dvipdfmx.def', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% attachfile2.dtx (with options: `dvipdfmx') |
| 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-dvipdfmx.def}% |
| 43 |
[2024-01-18 v2.12 attachfile2 driver for dvipdfmx/XeTeX (HO)]% |
| 44 |
\def\atfi@special#1{% |
| 45 |
\special{pdf:#1}% |
| 46 |
} |
| 47 |
\def\atfi@literal#1{% |
| 48 |
\atfi@special{content #1}% |
| 49 |
} |
| 50 |
\def\atfi@GSAVE{q } |
| 51 |
\def\atfi@GRESTORE{Q } |
| 52 |
\def\atfi@SETLINEWIDTH{w } |
| 53 |
\def\atfi@LINETO{l } |
| 54 |
\def\atfi@MOVETO{m } |
| 55 |
\def\atfi@STROKE{S } |
| 56 |
\def\atfi@FILL{f } |
| 57 |
\def\atfi@FILLSTROKE#1#2{#1#2B } |
| 58 |
\def\atfi@SETRGBCOLORSTROKE{RG } |
| 59 |
\def\atfi@SETRGBCOLORFILL{rg } |
| 60 |
\def\atfi@SETGRAYSTROKE{G } |
| 61 |
\def\atfi@SETGRAYFILL{g } |
| 62 |
\def\atfi@SETCMYKCOLORSTROKE{K } |
| 63 |
\def\atfi@SETCMYKCOLORFILL{k } |
| 64 |
\def\atfi@RECTFILL{re f } |
| 65 |
\def\atfi@RECTSTROKEFILL#1#2#3{#1#2#3re B } |
| 66 |
\def\atfi@SETMITERLIMIT{M } |
| 67 |
\def\atfi@SETFLAT{i } |
| 68 |
\def\atfi@SETLINECAP{J } |
| 69 |
\def\atfi@CURVETO{c } |
| 70 |
\def\atfi@CURVETOV{v } |
| 71 |
\def\atfi@CURVETOY{y } |
| 72 |
\def\atfi@CLOSEPATH{h } |
| 73 |
\def\atfi@SETLINEJOIN{j } |
| 74 |
\newcounter{atfi@obj} |
| 75 |
\renewcommand*{\theatfi@obj}{% |
| 76 |
@atfi_obj_\number\c@atfi@obj |
| 77 |
} |
| 78 |
\define@key{AtFi@file}{Size}{% |
| 79 |
\edef\atfi@params{\atfi@params/Size #1}% |
| 80 |
} |
| 81 |
\def\atfi@embedfile#1{% |
| 82 |
\ltx@IfUndefined{atfi@fileobj@#1}{% |
| 83 |
\stepcounter{atfi@obj}% |
| 84 |
\begingroup |
| 85 |
\let\atfi@params\ltx@empty |
| 86 |
\expandafter\let\expandafter\atfi@temp |
| 87 |
\csname atfi@file@#1\endcsname |
| 88 |
\ifx\atfi@temp\ltx@empty |
| 89 |
\let\atfi@temp\relax |
| 90 |
\fi |
| 91 |
\ifx\atfi@temp\relax |
| 92 |
\atfi@pdftexdata{#1}% |
| 93 |
\else |
| 94 |
\edef\x{% |
| 95 |
\noexpand\setkeys{AtFi@file}{\@nameuse{atfi@file@#1}}% |
| 96 |
}% |
| 97 |
\x |
| 98 |
\fi |
| 99 |
\ifx\atfi@params\ltx@empty |
| 100 |
\else |
| 101 |
\edef\atfi@params{/Params<<\atfi@params>>}% |
| 102 |
\fi |
| 103 |
\edef\atfi@FILE{#1}% |
| 104 |
\filename@parse\atfi@FILE |
| 105 |
\ifx\filename@area\ltx@empty |
| 106 |
\edef\atfi@FILE{./\atfi@FILE}% |
| 107 |
\fi |
| 108 |
\EdefEscapeString\atfi@FILE{\atfi@FILE}% |
| 109 |
\atfi@special{fstream % |
| 110 |
\theatfi@obj |
| 111 |
(\atfi@FILE)% |
| 112 |
<<% |
| 113 |
/Type/EmbeddedFile% |
| 114 |
\atfi@mimetype |
| 115 |
\atfi@params |
| 116 |
>>% |
| 117 |
}% |
| 118 |
\atfi@special{close \theatfi@obj}% |
| 119 |
\expandafter |
| 120 |
\xdef\csname atfi@fileobj@#1\endcsname{\theatfi@obj}% |
| 121 |
\endgroup |
| 122 |
}{% |
| 123 |
% file already embedded |
| 124 |
}% |
| 125 |
} |
| 126 |
\def\atfi@xform{% |
| 127 |
\stepcounter{atfi@obj}% |
| 128 |
\smash{% |
| 129 |
\rlap{% |
| 130 |
\atfi@special{bxobj \theatfi@obj\space |
| 131 |
width \the\wd\atfi@appearancebox\space |
| 132 |
height \the\ht\atfi@appearancebox\space |
| 133 |
depth \the\dp\atfi@appearancebox |
| 134 |
}% |
| 135 |
\usebox\atfi@appearancebox |
| 136 |
\atfi@special{exobj}% |
| 137 |
}% |
| 138 |
}% |
| 139 |
\edef\atfi@appearanceobj{\theatfi@obj}% |
| 140 |
} |
| 141 |
\let\atfi@xform@icon\atfi@xform |
| 142 |
\def\atfi@refxform#1{% |
| 143 |
\leavevmode |
| 144 |
\atfi@special{uxobj #1}% |
| 145 |
} |
| 146 |
\def\atfi@insert@file@annot#1{% |
| 147 |
\rule{0pt}{0pt}% |
| 148 |
\ifatfi@appearance |
| 149 |
\def\atfi@appearance@dict{% |
| 150 |
/AP<<% |
| 151 |
/N \atfi@appearanceobj |
| 152 |
/R \atfi@appearanceobj |
| 153 |
/D \atfi@appearanceobj |
| 154 |
>>% |
| 155 |
}% |
| 156 |
\else |
| 157 |
\let\atfi@appearance@dict\ltx@empty |
| 158 |
\fi |
| 159 |
\ltx@IfUndefined{atfi@fsobj@#1}{% |
| 160 |
\begingroup |
| 161 |
\ifxetex |
| 162 |
\let\atfi@temp\Hy@Warning |
| 163 |
\let\Hy@Warning\ltx@gobble |
| 164 |
\fi |
| 165 |
\Hy@unicodefalse% |
| 166 |
\ifxetex |
| 167 |
\let\Hy@Warning\atfi@temp |
| 168 |
\fi |
| 169 |
\atfi@pdfstringdef\atfi@file{#1}% |
| 170 |
\stepcounter{atfi@obj}% |
| 171 |
\atfi@special{obj \theatfi@obj <<% |
| 172 |
/Type/Filespec% |
| 173 |
/F(\atfi@file)% |
| 174 |
\ifx\atfi@ucfilespec\ltx@empty |
| 175 |
\else |
| 176 |
/UF(\atfi@ucfilespec)% |
| 177 |
\fi |
| 178 |
/EF<<% |
| 179 |
/F \@nameuse{atfi@fileobj@#1}% |
| 180 |
>>% |
| 181 |
>>% |
| 182 |
}% |
| 183 |
\expandafter\xdef\csname atfi@fsobj@#1\endcsname{% |
| 184 |
\theatfi@obj |
| 185 |
}% |
| 186 |
\endgroup |
| 187 |
}{% |
| 188 |
}% |
| 189 |
\begingroup |
| 190 |
\dimen@=\atfi@scale\atfi@appearancewidth |
| 191 |
\edef\atfi@rule{width \the\dimen@}% |
| 192 |
\dimen@=\atfi@scale\atfi@appearanceheight |
| 193 |
\edef\atfi@rule{\atfi@rule\space height \the\dimen@}% |
| 194 |
\dimen@=\atfi@scale\atfi@appearancedepth |
| 195 |
\edef\atfi@rule{\atfi@rule\space depth \the\dimen@}% |
| 196 |
\atfi@special{ann \atfi@rule |
| 197 |
<<% |
| 198 |
/Subtype/FileAttachment% |
| 199 |
\atfi@icon |
| 200 |
\atfi@color@annot |
| 201 |
\atfi@author |
| 202 |
\atfi@date |
| 203 |
\atfi@annotname |
| 204 |
\atfi@description |
| 205 |
\atfi@subject |
| 206 |
\atfi@appearance@dict |
| 207 |
/F \theatfi@flags |
| 208 |
/FS \@nameuse{atfi@fsobj@#1}% |
| 209 |
>>% |
| 210 |
}% |
| 211 |
\endgroup |
| 212 |
\rule{0pt}{\atfi@appearanceheight}% |
| 213 |
\rule[-\atfi@appearancedepth]{0pt}{\atfi@appearancedepth}% |
| 214 |
\rule{\atfi@appearancewidth}{0pt}% |
| 215 |
} |
| 216 |
\endinput |
| 217 |
%% |
| 218 |
%% End of file `atfi-dvipdfmx.def'. |