| 1 |
%% |
| 2 |
%% This is file `attachfile.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% attachfile.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Copyright (C) 2006 Scott Pakin <[email protected]> |
| 12 |
%% ------------------------------------------------------- |
| 13 |
%% |
| 14 |
%% This package may be distributed and/or modified under the |
| 15 |
%% conditions of the LaTeX Project Public License, either |
| 16 |
%% version 1.3b of this license or (at your option) any later |
| 17 |
%% version. The latest version of this license is in |
| 18 |
%% |
| 19 |
%% http://www.latex-project.org/lppl.txt |
| 20 |
%% |
| 21 |
%% and version 1.3b or later is part of all distributions of |
| 22 |
%% LaTeX version 2006/01/07 or later. |
| 23 |
%% |
| 24 |
\NeedsTeXFormat{LaTeX2e}[1999/12/01] |
| 25 |
\ProvidesPackage{attachfile} |
| 26 |
[2006/03/28 v1.2a PDF 1.3+ file attachment] |
| 27 |
\RequirePackage{ifpdf} |
| 28 |
\ifpdf |
| 29 |
\else |
| 30 |
\PackageWarningNoLine{attachfile}{% |
| 31 |
attachfile works _only_ with pdfLaTeX and _only_ in\MessageBreak |
| 32 |
PDF-generating mode. For this run, placeholders will\MessageBreak |
| 33 |
be substituted for all attachfile commands.} |
| 34 |
\fi |
| 35 |
\RequirePackage{keyval} |
| 36 |
\RequirePackage{calc} |
| 37 |
\RequirePackage{color} |
| 38 |
\RequirePackageWithOptions{hyperref} |
| 39 |
\newcommand{\atfi@acroGraph@data}{% |
| 40 |
q 0.5 g 1.1133 0 20.7202 18.2754 re f 1 g 0 G 0 i 0.5 w 4 M |
| 41 |
0.25 1.6453 20.145 17.7715 re B 0 g 2.7319 4.1367 3.9571 |
| 42 |
13.8867 re f 8.7031 4.1367 3.9571 9.8867 re f 14.7471 4.1367 |
| 43 |
3.9571 11.8867 re f \atfi@color@rgb\space rg 1.689 3.0938 |
| 44 |
3.9571 13.8867 re f 7.6602 3.0938 3.9571 9.8867 re f 13.7041 |
| 45 |
3.0938 3.9571 11.8867 re f Q |
| 46 |
} |
| 47 |
\DeclareRobustCommand{\atfi@acroGraph}{% |
| 48 |
\raisebox{-1.5bp}{\parbox[b][20bp]{22bp}{% |
| 49 |
\rule{0pt}{0pt}\pdfliteral{\atfi@acroGraph@data}}% |
| 50 |
}% |
| 51 |
} |
| 52 |
\newcommand{\atfi@acroPaperclip@data}{% |
| 53 |
q 0.75 G 0 i 2.5 w 1 J 4 M 1.9619 11.7559 m 1.9619 3.3037 |
| 54 |
1.9619 2.5059 v 1.9619 1.707 4.0947 1.25 y 7.4141 1.25 l 9.4292 |
| 55 |
1.8223 9.4292 3.3066 v 9.4292 4.79 9.4292 16.8945 y 9.7852 |
| 56 |
18.1514 8.481 18.1514 v 7.1768 18.1514 5.1616 18.1514 y 3.8574 |
| 57 |
17.9209 3.8574 16.8945 v 3.8574 15.8652 3.8574 6.6172 y 4.3325 |
| 58 |
5.418 5.1025 5.418 v 5.8726 5.418 6.5845 5.418 y 7.6812 5.6455 |
| 59 |
7.6812 6.4736 v 7.6812 7.3027 7.6812 11.5264 y S 0 G 1.2495 |
| 60 |
12.4404 m 1.2495 3.9883 1.2495 3.1895 v 1.2495 2.3906 3.3833 |
| 61 |
1.9326 y 6.7026 1.9326 l 8.7178 2.5068 8.7178 3.9902 v 8.7178 |
| 62 |
5.4736 8.7178 17.5781 y 9.0732 18.834 7.769 18.834 v 6.4653 |
| 63 |
18.834 4.4497 18.834 y 3.146 18.6055 3.146 17.5781 v 3.146 |
| 64 |
16.5498 3.146 7.3018 y 3.6201 6.1016 4.3911 6.1016 v 5.1611 |
| 65 |
6.1016 5.873 6.1016 y 6.9692 6.3301 6.9692 7.1572 v 6.9692 |
| 66 |
7.9863 6.9692 12.21 y S \atfi@color@rgb\space RG 1 w |
| 67 |
1.2495 12.4404 m 1.2495 3.9883 1.2495 3.1895 v 1.2495 2.3906 |
| 68 |
3.3833 1.9326 y 6.7026 1.9326 l 8.7178 2.5068 8.7178 3.9902 v |
| 69 |
8.7178 5.4736 8.7178 17.5781 y 9.0732 18.834 7.769 18.834 v |
| 70 |
6.4653 18.834 4.4497 18.834 y 3.146 18.6055 3.146 17.5781 v |
| 71 |
3.146 16.5498 3.146 7.3018 y 3.6201 6.1016 4.3911 6.1016 v |
| 72 |
5.1611 6.1016 5.873 6.1016 y 6.9692 6.3301 6.9692 7.1572 v |
| 73 |
6.9692 7.9863 6.9692 12.21 y S Q |
| 74 |
} |
| 75 |
\DeclareRobustCommand{\atfi@acroPaperclip}{% |
| 76 |
\raisebox{-1.25bp}{\parbox[b][21bp]{12bp}{% |
| 77 |
\rule{0pt}{0pt}\pdfliteral{\atfi@acroPaperclip@data}}% |
| 78 |
}% |
| 79 |
} |
| 80 |
\newcommand{\atfi@acroPushPin@data}{% |
| 81 |
q \atfi@color@rgb\space rg 0 G 1 w 1 6 m 11 6 l 11 13 l 12 |
| 82 |
13 l 14 11 l 21 11 l 22 12 l 23 12 l 23 2 l 22 2 l 21 3 l 14 3 |
| 83 |
l 12 1 l 11 1 l 11 6 l B 0.5 G 0 7 m 10 7 l 10 8 l 1 8 l S 1 G |
| 84 |
12 12 m 14 10 l 22 10 l 22 11 l S Q |
| 85 |
} |
| 86 |
\DeclareRobustCommand{\atfi@acroPushPin}{% |
| 87 |
\raisebox{-1.25bp}{\parbox[b][14bp]{24bp}{% |
| 88 |
\rule{0pt}{0pt}\pdfliteral{\atfi@acroPushPin@data}}% |
| 89 |
}% |
| 90 |
} |
| 91 |
\newcommand{\atfi@acroTag@data}{% |
| 92 |
q 0.5 g 10.0542 14.9873 m 24.27 14.9873 l 25.252 14.0059 l |
| 93 |
25.252 1.1455 l 24.1064 0 l 9.9609 0 l 6.0327 6.0088 l 6.0327 |
| 94 |
9.002 l 10.0542 14.9873 l 9.3994 9.376 m 8.5215 9.376 7.8096 |
| 95 |
8.5596 7.8096 7.5527 c 7.8096 6.5449 8.5215 5.7285 9.3994 |
| 96 |
5.7285 c 10.2778 5.7285 10.9897 6.5449 10.9897 7.5527 c 10.9897 |
| 97 |
8.5596 10.2778 9.376 9.3994 9.376 c h f |
| 98 |
\atfi@color@rgb\space rg 0 G 0 i 0.5 w 4 M 1 j 8.5107 |
| 99 |
16.5313 m 22.7266 16.5313 l 23.7085 15.5488 l 23.7085 2.6895 l |
| 100 |
22.563 1.543 l 8.4175 1.543 l 4.4893 7.5527 l 4.4893 10.5449 l |
| 101 |
8.5107 16.5313 l 7.856 10.9199 m 6.978 10.9199 6.2661 10.1035 |
| 102 |
6.2661 9.0957 c 6.2661 8.0879 6.978 7.2715 7.856 7.2715 c |
| 103 |
8.7344 7.2715 9.4463 8.0879 9.4463 9.0957 c 9.4463 10.1035 |
| 104 |
8.7344 10.9199 7.856 10.9199 c h B 1 w 12.3291 12.2656 m |
| 105 |
21.1206 12.2656 l S 12.3291 9.1797 m 21.1206 9.1797 l S 12.3291 |
| 106 |
6.1875 m 21.1206 6.1875 l S 0 G 0.5 w 0 9.0488 m 6.2661 9.0957 |
| 107 |
l S 1.4028 5.2148 m 1.4028 9.6094 l 1.6831 10.6387 2.4316 |
| 108 |
10.6387 v 3.6475 10.6387 3.5542 9.0488 y S Q |
| 109 |
} |
| 110 |
\DeclareRobustCommand{\atfi@acroTag}{% |
| 111 |
\raisebox{-1.6bp}{\parbox[b][17bp]{25bp}{% |
| 112 |
\rule{0pt}{0pt}\pdfliteral{\atfi@acroTag@data}}% |
| 113 |
}% |
| 114 |
} |
| 115 |
\def\atfi@temp@string{} |
| 116 |
\DeclareRobustCommand{\atfi@pdfstringdef}[2]{% |
| 117 |
\pdfstringdef\atfi@temp@string{#2}% |
| 118 |
\edef#1{\atfi@temp@string}% |
| 119 |
} |
| 120 |
\newcounter{atfi@embedfileobj} |
| 121 |
\DeclareRobustCommand{\atfi@embedfile}[1]{% |
| 122 |
\immediate\pdfobj stream attr { |
| 123 |
/Type /EmbeddedFile |
| 124 |
\atfi@mimetype |
| 125 |
} file {#1}% |
| 126 |
\setcounter{atfi@embedfileobj}{\pdflastobj}% |
| 127 |
} |
| 128 |
\newlength{\atfi@appearancewidth} |
| 129 |
\newlength{\atfi@appearanceheight} |
| 130 |
\newlength{\atfi@appearancedepth} |
| 131 |
\newcounter{atfi@appearanceobj} |
| 132 |
\newsavebox{\atfi@appearancebox} |
| 133 |
\DeclareRobustCommand{\atfi@set@appearance}[1]{% |
| 134 |
\savebox{\atfi@appearancebox}{#1}% |
| 135 |
\settowidth{\atfi@appearancewidth}{\usebox{\atfi@appearancebox}}% |
| 136 |
\settoheight{\atfi@appearanceheight}{\usebox{\atfi@appearancebox}}% |
| 137 |
\settodepth{\atfi@appearancedepth}{\usebox{\atfi@appearancebox}}% |
| 138 |
\immediate\pdfxform attr { |
| 139 |
/Subtype /Form |
| 140 |
} \atfi@appearancebox |
| 141 |
\setcounter{atfi@appearanceobj}{\pdflastxform}% |
| 142 |
} |
| 143 |
\newcounter{atfi@flags} |
| 144 |
\DeclareRobustCommand{\atfi@flags@to@int}{% |
| 145 |
\setcounter{atfi@flags}{0}% |
| 146 |
\ifatfi@print |
| 147 |
\addtocounter{atfi@flags}{4}% |
| 148 |
\fi% |
| 149 |
\ifatfi@zoom |
| 150 |
\else |
| 151 |
\addtocounter{atfi@flags}{8}% |
| 152 |
\fi% |
| 153 |
} |
| 154 |
\DeclareRobustCommand{\atfi@insert@file@annot}[1]{% |
| 155 |
\rule{0pt}{0pt}% |
| 156 |
\atfi@pdfstringdef\atfi@file{#1}% |
| 157 |
\ifatfi@appearance |
| 158 |
\def\atfi@appearance@dict{% |
| 159 |
/AP << |
| 160 |
/N \theatfi@appearanceobj\space 0 R |
| 161 |
/R \theatfi@appearanceobj\space 0 R |
| 162 |
/D \theatfi@appearanceobj\space 0 R |
| 163 |
>>% |
| 164 |
}% |
| 165 |
\fi% |
| 166 |
\pdfannot width \atfi@appearancewidth |
| 167 |
height \atfi@appearanceheight |
| 168 |
depth \atfi@appearancedepth { |
| 169 |
/Subtype /FileAttachment |
| 170 |
\atfi@icon\space |
| 171 |
\atfi@color\space |
| 172 |
\atfi@author\space |
| 173 |
\atfi@date\space |
| 174 |
\atfi@description\space |
| 175 |
\atfi@subject\space |
| 176 |
\atfi@appearance@dict\space |
| 177 |
/F \theatfi@flags\space |
| 178 |
/FS << |
| 179 |
/Type /Filespec |
| 180 |
/F (\atfi@file) |
| 181 |
/EF << |
| 182 |
/F \theatfi@embedfileobj\space 0 R |
| 183 |
>> |
| 184 |
>> |
| 185 |
}% |
| 186 |
\rule{0pt}{\atfi@appearanceheight}% |
| 187 |
\rule[-\atfi@appearancedepth]{0pt}{\atfi@appearancedepth}% |
| 188 |
\rule{\atfi@appearancewidth}{0pt}% |
| 189 |
} |
| 190 |
\def\atfi@attachfile#1#2{% |
| 191 |
\setkeys{AtFi}{#1}% |
| 192 |
\atfi@embedfile{#2}% |
| 193 |
\atfi@set@appearance{\csname atfi@acro\atfi@icon@icon\endcsname}% |
| 194 |
\atfi@flags@to@int% |
| 195 |
\atfi@insert@file@annot{#2}% |
| 196 |
\endgroup |
| 197 |
} |
| 198 |
\def\atfi@textattachfile#1#2{% |
| 199 |
\endgroup |
| 200 |
\atfi@textattachfile@i{#1}{#2}% |
| 201 |
} |
| 202 |
\def\atfi@textattachfile@i#1#2#3{% |
| 203 |
\setkeys{AtFi}{#1}% |
| 204 |
\atfi@embedfile{#2}% |
| 205 |
\def\atfi@textcolor(##1 ##2 ##3)##4{% |
| 206 |
\textcolor[rgb]{##1,##2,##3}{##4}}% |
| 207 |
\atfi@set@appearance{% |
| 208 |
\expandafter\atfi@textcolor\expandafter |
| 209 |
(\atfi@color@rgb){#3\strut}}% |
| 210 |
\atfi@flags@to@int |
| 211 |
\atfi@insert@file@annot{#2}% |
| 212 |
\endgroup |
| 213 |
} |
| 214 |
\bgroup |
| 215 |
\lccode`\@=`\# |
| 216 |
\lowercase{\gdef\atfi@pdf@slash{@2f}} |
| 217 |
\egroup |
| 218 |
\def\atfi@split@mimetype#1/#2/{% |
| 219 |
\def\atfi@mime@type{#1}% |
| 220 |
\def\atfi@mime@subtype{#2}% |
| 221 |
} |
| 222 |
\def\atfi@mimetype{} |
| 223 |
\define@key{AtFi}{mimetype}{% |
| 224 |
\atfi@pdfstringdef\atfi@mimetype{#1}% |
| 225 |
\atfi@split@mimetype#1/% |
| 226 |
\edef\atfi@mimetype{% |
| 227 |
/Subtype /\atfi@mime@type\atfi@pdf@slash\atfi@mime@subtype |
| 228 |
}% |
| 229 |
} |
| 230 |
\define@key{AtFi}{icon}{% |
| 231 |
\def\atfi@icon{/Name /#1}% |
| 232 |
\def\atfi@icon@icon{#1}% |
| 233 |
} |
| 234 |
\setkeys{AtFi}{icon=PushPin} |
| 235 |
\define@key{AtFi}{color}{% |
| 236 |
\def\atfi@color{/C [#1]}% |
| 237 |
\def\atfi@color@rgb{#1}% |
| 238 |
} |
| 239 |
\setkeys{AtFi}{color=1 0.9255 0.7765} |
| 240 |
\def\atfi@author{} |
| 241 |
\define@key{AtFi}{author}[]{% |
| 242 |
\edef\atfi@author{/T (#1)}% |
| 243 |
} |
| 244 |
\def\atfi@pad@ii#1{% |
| 245 |
\ifnum#1>9 |
| 246 |
\the#1% |
| 247 |
\else |
| 248 |
0\the#1% |
| 249 |
\fi% |
| 250 |
} |
| 251 |
\def\atfi@timezone{} |
| 252 |
\define@key{AtFi}{timezone}{\def\atfi@timezone{#1}} |
| 253 |
\edef\atfi@time{\time} |
| 254 |
\newcounter{atfi@hours} |
| 255 |
\setcounter{atfi@hours}{\atfi@time/60} |
| 256 |
\newcounter{atfi@minutes} |
| 257 |
\setcounter{atfi@minutes}{\atfi@time-\theatfi@hours*60} |
| 258 |
\def\atfi@date{% |
| 259 |
/M (D:\the\year% |
| 260 |
\atfi@pad@ii\month% |
| 261 |
\atfi@pad@ii\day% |
| 262 |
\atfi@pad@ii\c@atfi@hours% |
| 263 |
\atfi@pad@ii\c@atfi@minutes |
| 264 |
00% |
| 265 |
\atfi@timezone)% |
| 266 |
} |
| 267 |
\define@key{AtFi}{date}{% |
| 268 |
\atfi@pdfstringdef\atfi@date{#1}% |
| 269 |
\edef\atfi@date{/M (\atfi@date)}% |
| 270 |
} |
| 271 |
\def\atfi@description{} |
| 272 |
\define@key{AtFi}{description}{% |
| 273 |
\atfi@pdfstringdef\atfi@description{#1}% |
| 274 |
\edef\atfi@description{/Contents (\atfi@description)}% |
| 275 |
} |
| 276 |
\def\atfi@subject{} |
| 277 |
\define@key{AtFi}{subject}{% |
| 278 |
\atfi@pdfstringdef\atfi@subject{#1}% |
| 279 |
\edef\atfi@subject{/Subj (\atfi@subject)}% |
| 280 |
} |
| 281 |
\newif\ifatfi@print |
| 282 |
\atfi@printtrue |
| 283 |
\define@key{AtFi}{print}[true]{\csname atfi@print#1\endcsname} |
| 284 |
\newif\ifatfi@zoom |
| 285 |
\atfi@zoomtrue |
| 286 |
\define@key{AtFi}{zoom}[true]{\csname atfi@zoom#1\endcsname} |
| 287 |
\newif\ifatfi@appearance |
| 288 |
\atfi@appearancetrue |
| 289 |
\def\atfi@appearance@dict{} |
| 290 |
\define@key{AtFi}{appearance}[true]{\csname atfi@appearance#1\endcsname} |
| 291 |
\DeclareRobustCommand{\attachfilesetup}[1]{\setkeys{AtFi}{#1}} |
| 292 |
\DeclareRobustCommand{\attachfile}[1][]{% |
| 293 |
\begingroup |
| 294 |
\let\do\@makeother |
| 295 |
\dospecials |
| 296 |
\catcode`\{=1\relax |
| 297 |
\catcode`\}=2\relax |
| 298 |
\atfi@attachfile{#1}% |
| 299 |
} |
| 300 |
\DeclareRobustCommand{\textattachfile}[1][]{% |
| 301 |
\begingroup |
| 302 |
\begingroup |
| 303 |
\let\do\@makeother |
| 304 |
\dospecials |
| 305 |
\catcode`\{=1\relax |
| 306 |
\catcode`\}=2\relax |
| 307 |
\atfi@textattachfile{#1}% |
| 308 |
} |
| 309 |
\DeclareRobustCommand{\noattachfile}[1][]{% |
| 310 |
\begingroup |
| 311 |
\setkeys{AtFi}{#1}% |
| 312 |
\ifatfi@print |
| 313 |
\csname atfi@acro\atfi@icon@icon\endcsname |
| 314 |
\else |
| 315 |
\setbox0=\hbox{\csname atfi@acro\atfi@icon@icon\endcsname}% |
| 316 |
\makebox[\wd0]{}% |
| 317 |
\fi |
| 318 |
\endgroup |
| 319 |
} |
| 320 |
\DeclareRobustCommand{\notextattachfile}[2][]{% |
| 321 |
\begingroup |
| 322 |
\setkeys{AtFi}{#1}% |
| 323 |
\ifatfi@print |
| 324 |
\def\atfi@textcolor(##1 ##2 ##3)##4{% |
| 325 |
\textcolor[rgb]{##1,##2,##3}{##4}}% |
| 326 |
\expandafter\atfi@textcolor\expandafter |
| 327 |
(\atfi@color@rgb){#2\strut}% |
| 328 |
\else |
| 329 |
\setbox0=\hbox{#2\strut}% |
| 330 |
\makebox[\wd0]{}% |
| 331 |
\fi |
| 332 |
\endgroup |
| 333 |
} |
| 334 |
\ifpdf |
| 335 |
\else |
| 336 |
\def\atfi@dummy@pushpin{% |
| 337 |
\raisebox{-1.25bp}{\parbox[b][14bp]{24bp}{}}% |
| 338 |
} |
| 339 |
\DeclareRobustCommand{\textattachfile}[3][]{% |
| 340 |
\notextattachfile[#1]{#3}% |
| 341 |
} |
| 342 |
\DeclareRobustCommand{\noattachfile}[1][]{% |
| 343 |
\notextattachfile[#1]{\atfi@dummy@pushpin}% |
| 344 |
} |
| 345 |
\DeclareRobustCommand{\attachfile}[2][]{% |
| 346 |
\noattachfile[#1]% |
| 347 |
} |
| 348 |
\fi |
| 349 |
\endinput |
| 350 |
%% |
| 351 |
%% End of file `attachfile.sty'. |