From f516b1a1044ae23e71bda0e1fb2fb82d869a34ba Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 12 Oct 2006 01:55:05 +0000 Subject: add attachfile to ctan-tpm-check, update the package git-svn-id: svn://tug.org/texlive/trunk@2317 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/attachfile/README | 12 ++-- .../texmf-dist/doc/latex/attachfile/attachfile.pdf | Bin 331962 -> 292584 bytes .../source/latex/attachfile/attachfile.dtx | 71 ++++++++++++++++----- .../source/latex/attachfile/attachfile.ins | 28 ++++---- .../texmf-dist/tex/latex/attachfile/attachfile.sty | 29 ++++++--- Master/texmf-dist/tpm/attachfile.tpm | 8 +-- 6 files changed, 105 insertions(+), 43 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/attachfile/README b/Master/texmf-dist/doc/latex/attachfile/README index 185b806fab3..9b1d9e97e0e 100644 --- a/Master/texmf-dist/doc/latex/attachfile/README +++ b/Master/texmf-dist/doc/latex/attachfile/README @@ -3,8 +3,10 @@ | Scott Pakin, scott+af@pakin.org | +---------------------------------+ + Description ----------- + Starting with PDF 1.3 (Adobe Acrobat 4.0), PDF files can contain file attachments -- arbitrary files that a reader can extract, just like attachments to an e-mail message. The attachfile package brings this @@ -18,22 +20,24 @@ appearance in the enclosing document. Copyright and license --------------------- -Copyright (C) 2005 Scott Pakin + +Copyright (C) 2006 Scott Pakin This package may be distributed and/or modified under the conditions -of the LaTeX Project Public License, either version 1.2 of this +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. Building attachfile and its documentation --------------------- + tex attachfile.ins <== Produces attachfile.sty (the package proper) pdflatex attachfile.dtx <== Produces attachfile.pdf (documentation) makeindex -s gind.ist attachfile <== Produces attachfile.ind (index) diff --git a/Master/texmf-dist/doc/latex/attachfile/attachfile.pdf b/Master/texmf-dist/doc/latex/attachfile/attachfile.pdf index 14c22243d90..6d79e7229f7 100644 Binary files a/Master/texmf-dist/doc/latex/attachfile/attachfile.pdf and b/Master/texmf-dist/doc/latex/attachfile/attachfile.pdf differ 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 +% Copyright (C) 2006 by Scott Pakin % ------------------------------------------------------- % -% 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 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{attachfile} %<*package> - [2005/02/20 v1.2 PDF 1.3+ file attachment] + [2006/03/28 v1.2a PDF 1.3+ file attachment] % % %<*driver> @@ -41,7 +41,7 @@ % % \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 +%% Copyright (C) 2006 Scott Pakin %% ------------------------------------------------------- %% %% 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 +Copyright (C) 2006 Scott Pakin ------------------------------------------------------- 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 diff --git a/Master/texmf-dist/tex/latex/attachfile/attachfile.sty b/Master/texmf-dist/tex/latex/attachfile/attachfile.sty index 27e25aa5f19..7f4afbe4fab 100644 --- a/Master/texmf-dist/tex/latex/attachfile/attachfile.sty +++ b/Master/texmf-dist/tex/latex/attachfile/attachfile.sty @@ -8,20 +8,22 @@ %% %% This is a generated file. %% -%% Copyright (C) 2005 Scott Pakin +%% Copyright (C) 2006 Scott Pakin %% ------------------------------------------------------- %% %% 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. %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{attachfile} - [2005/02/20 v1.2 PDF 1.3+ file attachment] + [2006/03/28 v1.2a PDF 1.3+ file attachment] \RequirePackage{ifpdf} \ifpdf \else @@ -209,10 +211,21 @@ \atfi@insert@file@annot{#2}% \endgroup } +\bgroup + \lccode`\@=`\# + \lowercase{\gdef\atfi@pdf@slash{@2f}} +\egroup +\def\atfi@split@mimetype#1/#2/{% + \def\atfi@mime@type{#1}% + \def\atfi@mime@subtype{#2}% +} \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 + }% } \define@key{AtFi}{icon}{% \def\atfi@icon{/Name /#1}% diff --git a/Master/texmf-dist/tpm/attachfile.tpm b/Master/texmf-dist/tpm/attachfile.tpm index 2d68aaebf05..9ba3129c154 100644 --- a/Master/texmf-dist/tpm/attachfile.tpm +++ b/Master/texmf-dist/tpm/attachfile.tpm @@ -3,7 +3,7 @@ attachfile Package - 2006/01/11 23:51:00 + 2006/03/30 04:41:00 1.0 rahtz Attach arbitrary files to a PDF document @@ -25,15 +25,15 @@ enclosing document. 406873 - + texmf-dist/tex/latex/attachfile/attachfile.sty texmf-dist/tpm/attachfile.tpm - + texmf-dist/doc/latex/attachfile/README texmf-dist/doc/latex/attachfile/attachfile.pdf - + texmf-dist/source/latex/attachfile/attachfile.dtx texmf-dist/source/latex/attachfile/attachfile.ins -- cgit v1.2.3