summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/attachfile
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-04-05 21:40:08 +0000
committerKarl Berry <karl@freefriends.org>2015-04-05 21:40:08 +0000
commitb5c336cc046422ec6b8b75be0f12ba52b4137344 (patch)
treeb42c437b1728bde892507fa887e1ad07fd6eabbc /Master/texmf-dist/source/latex/attachfile
parentbafdf7234ede9e630819d7dd7ee43d73a00e51a7 (diff)
attachfile (5apr15)
git-svn-id: svn://tug.org/texlive/trunk@36721 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/attachfile')
-rw-r--r--Master/texmf-dist/source/latex/attachfile/attachfile.dtx53
-rw-r--r--Master/texmf-dist/source/latex/attachfile/attachfile.ins4
2 files changed, 35 insertions, 22 deletions
diff --git a/Master/texmf-dist/source/latex/attachfile/attachfile.dtx b/Master/texmf-dist/source/latex/attachfile/attachfile.dtx
index 1a0b5edb1da..96734f2fee0 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) 2011 by Scott Pakin <scott+af@pakin.org>
+% Copyright (C) 2015 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>
- [2011/03/27 v1.5b PDF 1.3+ file attachment]
+ [2015/04/04 v1.6 PDF 1.3+ file attachment]
%</package>
%
%<*driver>
@@ -30,6 +30,7 @@
\usepackage{color}
\usepackage{xspace}
\usepackage[hyperindex=false,bookmarksopen=true]{attachfile}
+\usepackage{hyperxmp}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -84,7 +85,7 @@
%<*package>
% \fi
%
-% \CheckSum{493}
+% \CheckSum{502}
%
% \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
@@ -131,7 +132,16 @@
% pdftitle={The attachfile package},
% pdfauthor={Scott Pakin <scott+af@pakin.org>},
% pdfsubject={LaTeX file attachment package},
-% pdfkeywords={attachments; annotations; PDF; LaTeX; package; automatic; files}
+% pdfkeywords={file attachments, annotations, embedded, PDF, LaTeX},
+% pdfcopyright={Copyright (C) \the\year, Scott Pakin},
+% pdflicenseurl={http://www.latex-project.org/lppl.txt},
+% pdfcaptionwriter={Scott Pakin},
+% pdfcontactregion={New Mexico},
+% pdfcontactcountry={USA},
+% pdfcontactemail={scott+af@pakin.org},
+% pdfcontacturl={http://www.pakin.org/\xmptilde scott/},
+% baseurl={http://mirror.ctan.org/macros/latex/contrib/attachfile/attachfile.pdf},
+% pdflang={en-US}
% }
%
% ^^A Help prevent weird line breaks in URLs
@@ -1138,28 +1148,31 @@
% \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|.
+% If the given file has not yet been embedded, embed it as a
+% \acronym{PDF} \pdfname{EmbeddedFile} object, and store its object
+% number in |\atfi@embedfile@|\meta{filename}.
% \changes{v1.3}{2007/01/15}{Included a \protect\pdfname{Params}
% dictionary describing the file's date, modification date, and size}
+% \changes{v1.6}{2015/04/04}{Don't re-embed files that have already been
+% embedded (feature proposed by Gareth Walker)}
% \begin{macrocode}
\DeclareRobustCommand{\atfi@embedfile}[1]{%
- \immediate\pdfobj stream attr {
- /Type /EmbeddedFile
- \atfi@mimetype\space
- \atfi@dlsize\space
- /Params <<
- \atfi@credate\space
- \atfi@moddate\space
- \atfi@size\space
- >>
- } file {#1}%
- \edef\atfi@embedfileobj{\the\pdflastobj}%
+ \expandafter\ifx\csname atfi@embed@file@#1\endcsname\relax
+ \immediate\pdfobj stream attr {
+ /Type /EmbeddedFile
+ \atfi@mimetype\space
+ \atfi@dlsize\space
+ /Params <<
+ \atfi@credate\space
+ \atfi@moddate\space
+ \atfi@size\space
+ >>
+ } file {#1}%
+ \expandafter\xdef\csname atfi@embed@file@#1\endcsname{\the\pdflastobj}%
+ \fi
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\atfi@appearancewidth}
% \begin{macro}{\atfi@appearanceheight}
@@ -1291,7 +1304,7 @@
/Type /Filespec
/F (\atfi@file)
/EF <<
- /F \atfi@embedfileobj\space 0 R
+ /F \csname atfi@embed@file@#1\endcsname\space 0 R
>>
>>
}%
diff --git a/Master/texmf-dist/source/latex/attachfile/attachfile.ins b/Master/texmf-dist/source/latex/attachfile/attachfile.ins
index f314afd80dc..dd716e34daf 100644
--- a/Master/texmf-dist/source/latex/attachfile/attachfile.ins
+++ b/Master/texmf-dist/source/latex/attachfile/attachfile.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 2011 Scott Pakin <scott+af@pakin.org>
+%% Copyright (C) 2015 Scott Pakin <scott+af@pakin.org>
%% -------------------------------------------------------
%%
%% This package may be distributed and/or modified under the
@@ -28,7 +28,7 @@
This is a generated file.
-Copyright (C) 2011 Scott Pakin <scott+af@pakin.org>
+Copyright (C) 2015 Scott Pakin <scott+af@pakin.org>
-------------------------------------------------------
This package may be distributed and/or modified under the