summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/attachfile
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-08 00:21:54 +0000
committerKarl Berry <karl@freefriends.org>2010-09-08 00:21:54 +0000
commitc31ae16f33e45aff6135e0fe9f226d55f1ce5e3f (patch)
treeec50d70cf3b6f78fc0f5205220b981ad04a382e4 /Master/texmf-dist/tex/latex/attachfile
parentc8a8675d33d37c8655cdb00dc8876fd9d7db0869 (diff)
attachfile 1.5 (7sep10)
git-svn-id: svn://tug.org/texlive/trunk@19600 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/attachfile')
-rw-r--r--Master/texmf-dist/tex/latex/attachfile/attachfile.sty55
1 files changed, 27 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/attachfile/attachfile.sty b/Master/texmf-dist/tex/latex/attachfile/attachfile.sty
index fafb439e2b0..3d37cb34bb6 100644
--- a/Master/texmf-dist/tex/latex/attachfile/attachfile.sty
+++ b/Master/texmf-dist/tex/latex/attachfile/attachfile.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2008 Scott Pakin <scott+af@pakin.org>
+%% Copyright (C) 2010 Scott Pakin <scott+af@pakin.org>
%% -------------------------------------------------------
%%
%% This package may be distributed and/or modified under the
@@ -23,7 +23,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{attachfile}
- [2008/08/15 v1.3a PDF 1.3+ file attachment]
+ [2010/08/14 v1.4 PDF 1.3+ file attachment]
\RequirePackage{ifpdf}
\ifpdf
\else
@@ -118,7 +118,7 @@
\pdfstringdef\atfi@temp@string{#2}%
\edef#1{\atfi@temp@string}%
}
-\newcounter{atfi@embedfileobj}
+\newcounter{atfi@tmp}
\DeclareRobustCommand{\atfi@embedfile}[1]{%
\immediate\pdfobj stream attr {
/Type /EmbeddedFile
@@ -130,12 +130,11 @@
\atfi@size\space
>>
} file {#1}%
- \setcounter{atfi@embedfileobj}{\pdflastobj}%
+ \edef\atfi@embedfileobj{\the\pdflastobj}%
}
\newlength{\atfi@appearancewidth}
\newlength{\atfi@appearanceheight}
\newlength{\atfi@appearancedepth}
-\newcounter{atfi@appearanceobj}
\newsavebox{\atfi@appearancebox}
\DeclareRobustCommand{\atfi@set@appearance}[1]{%
\savebox{\atfi@appearancebox}{#1}%
@@ -145,18 +144,18 @@
\immediate\pdfxform attr {
/Subtype /Form
} \atfi@appearancebox
- \setcounter{atfi@appearanceobj}{\pdflastxform}%
+ \edef\atfi@appearanceobj{\the\pdflastxform}%
}
-\newcounter{atfi@flags}
\DeclareRobustCommand{\atfi@flags@to@int}{%
- \setcounter{atfi@flags}{0}%
+ \setcounter{atfi@tmp}{0}%
\ifatfi@print
- \addtocounter{atfi@flags}{4}%
- \fi%
+ \addtocounter{atfi@tmp}{4}%
+ \fi
\ifatfi@zoom
\else
- \addtocounter{atfi@flags}{8}%
- \fi%
+ \addtocounter{atfi@tmp}{8}%
+ \fi
+ \edef\atfi@flags{\theatfi@tmp}%
}
\DeclareRobustCommand{\atfi@insert@file@annot}[1]{%
\rule{0pt}{0pt}%
@@ -168,9 +167,9 @@
\ifatfi@appearance
\def\atfi@appearance@dict{%
/AP <<
- /N \theatfi@appearanceobj\space 0 R
- /R \theatfi@appearanceobj\space 0 R
- /D \theatfi@appearanceobj\space 0 R
+ /N \atfi@appearanceobj\space 0 R
+ /R \atfi@appearanceobj\space 0 R
+ /D \atfi@appearanceobj\space 0 R
>>%
}%
\fi%
@@ -186,12 +185,12 @@
\atfi@icon\space
\atfi@moddate\space
\atfi@subject\space
- /F \theatfi@flags\space
+ /F \atfi@flags\space
/FS <<
/Type /Filespec
/F (\atfi@file)
/EF <<
- /F \theatfi@embedfileobj\space 0 R
+ /F \atfi@embedfileobj\space 0 R
>>
>>
}%
@@ -255,24 +254,24 @@
}
\def\atfi@pad@ii#1{%
\ifnum#1>9
- \the#1%
+ #1%
\else
- 0\the#1%
- \fi%
+ 0#1%
+ \fi
}
\def\atfi@timezone{}
\define@key{AtFi}{timezone}{\def\atfi@timezone{#1}}
\edef\atfi@time{\time}
-\newcounter{atfi@hours}
-\setcounter{atfi@hours}{\atfi@time/60}
-\newcounter{atfi@minutes}
-\setcounter{atfi@minutes}{\atfi@time-\theatfi@hours*60}
+\setcounter{atfi@tmp}{\atfi@time/60}
+\edef\atfi@hours{\theatfi@tmp}
+\setcounter{atfi@tmp}{\atfi@time-\atfi@hours*60}
+\edef\atfi@minutes{\theatfi@tmp}
\def\atfi@date{%
/M (D:\the\year%
- \atfi@pad@ii\month%
- \atfi@pad@ii\day%
- \atfi@pad@ii\c@atfi@hours%
- \atfi@pad@ii\c@atfi@minutes
+ \expandafter\atfi@pad@ii\the\month
+ \expandafter\atfi@pad@ii\the\day
+ \atfi@pad@ii\atfi@hours
+ \atfi@pad@ii\atfi@minutes
00%
\atfi@timezone)%
}