summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/attachfile
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2006-10-12 01:55:05 +0000
committerNorbert Preining <preining@logic.at>2006-10-12 01:55:05 +0000
commitf516b1a1044ae23e71bda0e1fb2fb82d869a34ba (patch)
treea7e7b49b9645684e4adf59693ff099480a19e821 /Master/texmf-dist/source/latex/attachfile
parent24da87217b6a2fdc1a3bea6528cbcff988acb75e (diff)
add attachfile to ctan-tpm-check, update the package
git-svn-id: svn://tug.org/texlive/trunk@2317 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/attachfile')
-rw-r--r--Master/texmf-dist/source/latex/attachfile/attachfile.dtx71
-rw-r--r--Master/texmf-dist/source/latex/attachfile/attachfile.ins28
2 files changed, 72 insertions, 27 deletions
diff --git a/Master/texmf-dist/source/latex/attachfile/attachfile.dtx b/Master/texmf-dist/source/latex/attachfile/attachfile.dtx
index 1f1dbb3ebbc..4616579450c 100644
--- a/Master/texmf-dist/source/latex/attachfile/attachfile.dtx
+++ b/Master/texmf-dist/source/latex/attachfile/attachfile.dtx
@@ -1,17 +1,17 @@
% \iffalse meta-comment
%
-% Copyright (C) 2005 by Scott Pakin <scott+af@pakin.org>
+% Copyright (C) 2006 by Scott Pakin <scott+af@pakin.org>
% -------------------------------------------------------
%
-% This file may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.2
-% of this license or (at your option) any later version.
-% The latest version of this license is in:
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3b of this license
+% or (at your option) any later version. The latest version of this
+% license is in:
%
% http://www.latex-project.org/lppl.txt
%
-% and version 1.2 or later is part of all distributions of LaTeX
-% version 1999/12/01 or later.
+% and version 1.3b or later is part of all distributions of LaTeX
+% version 2006/01/07 or later.
%
% \fi
%
@@ -22,7 +22,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{attachfile}
%<*package>
- [2005/02/20 v1.2 PDF 1.3+ file attachment]
+ [2006/03/28 v1.2a PDF 1.3+ file attachment]
%</package>
%
%<*driver>
@@ -41,7 +41,7 @@
%</driver>
% \fi
%
-% \CheckSum{378}
+% \CheckSum{395}
%
% \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
@@ -67,10 +67,10 @@
%
% \GetFileInfo{attachfile.dtx}
%
-% \DoNotIndex{\addtocounter,\begingroup,\catcode,\csname}
-% \DoNotIndex{\DeclareRobustCommand,\def,\do,\dospecials,\edef,\else}
-% \DoNotIndex{\endcsname,\endgroup,\expandafter,\fi,\hbox,\ifnum,\ifx}
-% \DoNotIndex{\immediate,\let,\makebox,\MessageBreak,\newcommand}
+% \DoNotIndex{\addtocounter,\begingroup,\bgroup,\catcode,\csname}
+% \DoNotIndex{\DeclareRobustCommand,\def,\do,\dospecials,\edef,\egroup,\else}
+% \DoNotIndex{\endcsname,\endgroup,\expandafter,\fi,\gdef,\hbox,\ifnum,\ifx}
+% \DoNotIndex{\ifpdf,\immediate,\let,\makebox,\MessageBreak,\newcommand}
% \DoNotIndex{\newcounter,\newif,\newlength,\newsavebox,\parbox,\protect}
% \DoNotIndex{\raisebox,\relax,\rule,\savebox,\setbox,\setcounter}
% \DoNotIndex{\setkeys,\settodepth,\settoheight,\settowidth,\space,\strut}
@@ -302,7 +302,8 @@
% Each of the above points to the \bibtex\ bibliography (a plain text
% file) for the document you're reading now. Try extracting the
% attachment. In \adobeacrobat, this is achieved by right-clicking on
-% the icon and choosing ``Extract File$\ldots$''. You can also
+% the icon and choosing ``Save Embedded File to Disk\dots'' (or in older
+% versions of \adobeacrobat, ``Extract File\dots''). You can also
% double-click to open the file immediately. If you're unable to access
% the attached file, or you observe miscellaneous strange behavior, your
% \acronym{PDF} viewer might not be cabable of handling file attachments
@@ -1204,6 +1205,41 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\atfi@pdf@slash}
+% The \acronym{PDF} specification dictates that \acronym{MIME} types be
+% specified not as strings (e.g.,~``|(Hello)|'') but rather as
+% \acronym{PDF} names (e.g.,~``|/Hello|''). The catch is that the
+% forward slash---required in all \acronym{MIME} types---cannot be part
+% of a \acronym{PDF} name. The solution is to replace the
+% \acronym{MIME} ``|/|'' with the hexadecimal sequence ``|#2f|''.
+% Unfortunately, \pdflatex\ replaces ``|#|'' with ``|##|'' in a
+% |\pdfobj| but leaves ``|\#|'' as is. The solution is to play some
+% games with \tex\ to define |\atfi@pdf@slash| as a ``|#2f|'' sequence
+% that can used within |\pdfobj|.
+% \begin{macrocode}
+\bgroup
+ \lccode`\@=`\#
+ \lowercase{\gdef\atfi@pdf@slash{@2f}}
+\egroup
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\atfi@split@mimetype}
+% \begin{macro}{\atfi@mime@type}
+% \begin{macro}{\atfi@mime@subtype}
+% Split a \acronym{MIME} type (e.g.,~``\texttt{image\slash jpeg}'') into
+% a type, |\atfi@mime@type| (e.g.,~``|image|''), and a subtype,
+% |\atfi@mime@subtype| (e.g.,~``|jpeg|'').
+% \begin{macrocode}
+\def\atfi@split@mimetype#1/#2/{%
+ \def\atfi@mime@type{#1}%
+ \def\atfi@mime@subtype{#2}%
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
%
% \subsection{Annotation option processing}
% \label{sec:annot-options}
@@ -1215,11 +1251,16 @@
% Declare the \acronym{MIME} type of the attached file.
% For example, ``\texttt{text/plain}''
% would specify that the attachment is an ordinary text file.
+% \changes{v1.2a}{2006/03/28}{Changed the \string\acronym{MIME}
+% \string\pdfname{Subtype} from a string to a name}
% \begin{macrocode}
\def\atfi@mimetype{}
\define@key{AtFi}{mimetype}{%
\atfi@pdfstringdef\atfi@mimetype{#1}%
- \edef\atfi@mimetype{/Subtype (\atfi@mimetype)}%
+ \atfi@split@mimetype#1/%
+ \edef\atfi@mimetype{%
+ /Subtype /\atfi@mime@type\atfi@pdf@slash\atfi@mime@subtype
+ }%
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/source/latex/attachfile/attachfile.ins b/Master/texmf-dist/source/latex/attachfile/attachfile.ins
index a40fc6e39cf..2897bd14d31 100644
--- a/Master/texmf-dist/source/latex/attachfile/attachfile.ins
+++ b/Master/texmf-dist/source/latex/attachfile/attachfile.ins
@@ -3,16 +3,18 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 2005 Scott Pakin <scott+af@pakin.org>
+%% Copyright (C) 2006 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.2
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3b of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
%% http://www.latex-project.org/lppl.txt
-%% and version 1.2 or later is part of all distributions of LaTeX
-%% version 1999/12/01 or later.
+%%
+%% and version 1.3b or later is part of all distributions of
+%% LaTeX version 2006/01/07 or later.
%%
%% --------------- start of docstrip commands ------------------
%%
@@ -26,16 +28,18 @@
This is a generated file.
-Copyright (C) 2005 Scott Pakin <scott+af@pakin.org>
+Copyright (C) 2006 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.2
-of this license or (at your option) any later version.
-The latest version of this license is in
+conditions of the LaTeX Project Public License, either
+version 1.3b of this license or (at your option) any later
+version. The latest version of this license is in
+
http://www.latex-project.org/lppl.txt
-and version 1.2 or later is part of all distributions of LaTeX
-version 1999/12/01 or later.
+
+and version 1.3b or later is part of all distributions of
+LaTeX version 2006/01/07 or later.
\endpreamble