summaryrefslogtreecommitdiff
path: root/Master
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
parentc8a8675d33d37c8655cdb00dc8876fd9d7db0869 (diff)
attachfile 1.5 (7sep10)
git-svn-id: svn://tug.org/texlive/trunk@19600 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/attachfile/README2
-rw-r--r--Master/texmf-dist/doc/latex/attachfile/attachfile.pdfbin261688 -> 247204 bytes
-rw-r--r--Master/texmf-dist/source/latex/attachfile/attachfile.bib (renamed from Master/texmf-dist/doc/latex/attachfile/attachfile.bib)0
-rw-r--r--Master/texmf-dist/source/latex/attachfile/attachfile.dtx123
-rw-r--r--Master/texmf-dist/source/latex/attachfile/attachfile.ins27
-rw-r--r--Master/texmf-dist/tex/latex/attachfile/attachfile.sty55
6 files changed, 103 insertions, 104 deletions
diff --git a/Master/texmf-dist/doc/latex/attachfile/README b/Master/texmf-dist/doc/latex/attachfile/README
index f8133a251e4..82c25210a41 100644
--- a/Master/texmf-dist/doc/latex/attachfile/README
+++ b/Master/texmf-dist/doc/latex/attachfile/README
@@ -21,7 +21,7 @@ appearance in the enclosing document.
Copyright and license
---------------------
-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 conditions
of the LaTeX Project Public License, either version 1.3c of this
diff --git a/Master/texmf-dist/doc/latex/attachfile/attachfile.pdf b/Master/texmf-dist/doc/latex/attachfile/attachfile.pdf
index 46bd6cc0118..fc5d1ebb2db 100644
--- a/Master/texmf-dist/doc/latex/attachfile/attachfile.pdf
+++ b/Master/texmf-dist/doc/latex/attachfile/attachfile.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/attachfile/attachfile.bib b/Master/texmf-dist/source/latex/attachfile/attachfile.bib
index 6afbbe0be15..6afbbe0be15 100644
--- a/Master/texmf-dist/doc/latex/attachfile/attachfile.bib
+++ b/Master/texmf-dist/source/latex/attachfile/attachfile.bib
diff --git a/Master/texmf-dist/source/latex/attachfile/attachfile.dtx b/Master/texmf-dist/source/latex/attachfile/attachfile.dtx
index 6a12f8fd749..fae747cc855 100644
--- a/Master/texmf-dist/source/latex/attachfile/attachfile.dtx
+++ b/Master/texmf-dist/source/latex/attachfile/attachfile.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2008 by Scott Pakin <scott+af@pakin.org>
+% Copyright (C) 2010 by Scott Pakin <scott+af@pakin.org>
% -------------------------------------------------------
%
% This file may be distributed and/or modified under the conditions of
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{attachfile}
%<*package>
- [2008/08/15 v1.3a PDF 1.3+ file attachment]
+ [2010/08/14 v1.4 PDF 1.3+ file attachment]
%</package>
%
%<*driver>
@@ -41,7 +41,7 @@
%</driver>
% \fi
%
-% \CheckSum{474}
+% \CheckSum{485}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -884,11 +884,6 @@
% those who need more precise documentation and those who want to extend
% the \pkgname{attachfile} package.
%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-%
% \subsection{Sanity checking}
%
% \pkgname{attachfile} \fileversion\ requires \pdflatex\ (and at least
@@ -1087,14 +1082,25 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\theatfi@embedfileobj}
+% \begin{macro}{\c@atfi@tmp}
+% Because \tex\ provides only a limited number of counters, we recycle a
+% single counter, |atfi@tmp|, throughout the entire package whenever the
+% need to perform arithmetic arises.
+% \changes{v1.4}{2010/08/14}{Incorporated Martin M\"unch's reduction of
+% the number of counters that \protect\pkgname{attachfile} uses from
+% five to one}
+% \begin{macrocode}
+\newcounter{atfi@tmp}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\atfi@embedfile}
+% \begin{macro}{\atfi@embedfileobj}
% Embed a file as a \acronym{PDF} \pdfname{EmbeddedFile} object and store its
-% object number in |atfi@embedfileobj|.
+% object number in |\atfi@embedfileobj|.
% \changes{v1.3}{2007/01/15}{Included a \protect\pdfname{Params}
% dictionary describing the file's date, modification date, and size}
% \begin{macrocode}
-\newcounter{atfi@embedfileobj}
\DeclareRobustCommand{\atfi@embedfile}[1]{%
\immediate\pdfobj stream attr {
/Type /EmbeddedFile
@@ -1106,7 +1112,7 @@
\atfi@size\space
>>
} file {#1}%
- \setcounter{atfi@embedfileobj}{\pdflastobj}%
+ \edef\atfi@embedfileobj{\the\pdflastobj}%
}
% \end{macrocode}
% \end{macro}
@@ -1115,39 +1121,38 @@
% \begin{macro}{\atfi@appearancewidth}
% \begin{macro}{\atfi@appearanceheight}
% \begin{macro}{\atfi@appearancedepth}
-% \begin{macro}{\theatfi@appearanceobj}
% \begin{macro}{\atfi@appearancebox}
-% Each \acronym{PDF} annotation can an associated ``appearance''. In the
-% \pkgname{attachfile} package, we store the appearance with the
+% Each \acronym{PDF} annotation can an associated ``appearance''. In
+% the \pkgname{attachfile} package, we store the appearance with the
% |\atfi@set@appearance| macro (below). As a side effect,
% |\atfi@set@appearance| stores the dimensions of its argument in
% |\atfi@appearancewidth|, |\atfi@appearanceheight|, and
-% |\atfi@appearanceddepth| so that, later, we can allocate an appropriate
-% amount of space for the file attachment icon to fit within.
-% |atfi@appearanceobj| is the object number of the appearance
-% \pdfname{XObject}, and |\atfi@appearancebox| is a temporary storage
-% location for the \tex\ box that will get converted to an \pdfname{XObject}.
+% |\atfi@appearanceddepth| so that, later, we can allocate an
+% appropriate amount of space for the file attachment icon to fit
+% within. |\atfi@appearancebox| is a temporary storage location for the
+% \tex\ box that will get converted to an \pdfname{XObject}.
% \begin{macrocode}
\newlength{\atfi@appearancewidth}
\newlength{\atfi@appearanceheight}
\newlength{\atfi@appearancedepth}
-\newcounter{atfi@appearanceobj}
\newsavebox{\atfi@appearancebox}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\atfi@set@appearance}
-% Store the argument as a \acronym{PDF} \pdfname{XObject}, for later referral by the
-% file annotation's appearance dictionary. This serves two purposes:
+% \begin{macro}{\atfi@appearance@obj}
+% |\atfi@set@appearance| stores its argument as a \acronym{PDF}
+% \pdfname{XObject} for later referral by the file annotation's
+% appearance dictionary. This serves two purposes:
+%
% \begin{enumerate}
-% \item It enables a \tex\ box with arbitrary contents to serve as the file
-% attachment icon.
-% \item It enables (generally, older) \acronym{PDF} viewers which don't recognize the
-% icon name to still display something meaningful.
+% \item It enables a \tex\ box with arbitrary contents to serve as the
+% file attachment icon.
+% \item It enables (generally older) \acronym{PDF} viewers that don't
+% recognize the icon name to still display something meaningful.
% \end{enumerate}
% \begin{macrocode}
\DeclareRobustCommand{\atfi@set@appearance}[1]{%
@@ -1158,26 +1163,27 @@
\immediate\pdfxform attr {
/Subtype /Form
} \atfi@appearancebox
- \setcounter{atfi@appearanceobj}{\pdflastxform}%
+ \edef\atfi@appearanceobj{\the\pdflastxform}%
}
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\atfi@flags@to@int}
-% \begin{macro}{\theatfi@flags}
+% \begin{macro}{\atfi@flags}
% Convert all our flag options from booleans into a single integer
-% (|atfi@flags|).
+% (|\atfi@flags|).
% \begin{macrocode}
-\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}%
}
% \end{macrocode}
% \end{macro}
@@ -1219,9 +1225,9 @@
% \begin{macrocode}
\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%
@@ -1237,12 +1243,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
>>
>>
}%
@@ -1433,10 +1439,10 @@
% \begin{macrocode}
\def\atfi@pad@ii#1{%
\ifnum#1>9
- \the#1%
+ #1%
\else
- 0\the#1%
- \fi%
+ 0#1%
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -1452,9 +1458,8 @@
% \end{macro}
%
% \begin{macro}{\atfi@time}
-% \begin{macro}{\c@atfi@hours}
-% \begin{macro}{\theatfi@hours}
-% \begin{macro}{\c@atfi@minutes}
+% \begin{macro}{\atfi@hours}
+% \begin{macro}{\atfi@minutes}
% \begin{macro}{\atfi@date}
% The date the annotation was last modified. It's unlikely you'd
% want to specify this explicitly in your \latex\ document, but
@@ -1470,16 +1475,16 @@
% \protect\texttt{\protect\string\protect\Hy@unicodetrue}}
% \begin{macrocode}
\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)%
}
@@ -1495,7 +1500,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\atfi@description}
% Store the annotation's description. \adobeacrobat shows this when you
@@ -1804,10 +1808,5 @@
\fi
% \end{macrocode}
%
-%
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
% \Finale
\endinput
diff --git a/Master/texmf-dist/source/latex/attachfile/attachfile.ins b/Master/texmf-dist/source/latex/attachfile/attachfile.ins
index 61b6bef9e98..66575decc8a 100644
--- a/Master/texmf-dist/source/latex/attachfile/attachfile.ins
+++ b/Master/texmf-dist/source/latex/attachfile/attachfile.ins
@@ -3,9 +3,9 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% 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
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
@@ -28,7 +28,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
@@ -45,15 +45,16 @@ LaTeX version 2006/05/20 or later.
\generate{\file{attachfile.sty}{\from{attachfile.dtx}{package}}}
-\Msg{***********************************************************}
-\Msg{*}
-\Msg{* To finish the installation, you have to move}
-\Msg{* attachfile.sty into a directory searched by TeX.}
-\Msg{*}
-\Msg{* To produce the documentation, run attachfile.dtx}
-\Msg{* through pdfLaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{***********************************************************}
+\obeyspaces
+\Msg{******************************************************}
+\Msg{* *}
+\Msg{* To finish the installation, you have to move *}
+\Msg{* attachfile.sty into a directory searched by TeX. *}
+\Msg{* *}
+\Msg{* To produce the documentation, run attachfile.dtx *}
+\Msg{* through pdfLaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{******************************************************}
\endbatchfile
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)%
}