From c7325bb63f72cb535e7666100d0fd6dfd9a08555 Mon Sep 17 00:00:00 2001 From: Reinhard Kotucha Date: Thu, 18 Jan 2007 17:52:20 +0000 Subject: Update attachfile. git-svn-id: svn://tug.org/texlive/trunk@3569 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/attachfile/attachfile.sty | 77 ++++++++++++++++------ 1 file changed, 57 insertions(+), 20 deletions(-) (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/attachfile/attachfile.sty b/Master/texmf-dist/tex/latex/attachfile/attachfile.sty index 7f4afbe4fab..cdeee8d0b07 100644 --- a/Master/texmf-dist/tex/latex/attachfile/attachfile.sty +++ b/Master/texmf-dist/tex/latex/attachfile/attachfile.sty @@ -8,30 +8,27 @@ %% %% This is a generated file. %% -%% Copyright (C) 2006 Scott Pakin +%% Copyright (C) 2007 Scott Pakin %% ------------------------------------------------------- %% %% This package 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 1.3c 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.3b or later is part of all distributions of -%% LaTeX version 2006/01/07 or later. +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2006/05/20 or later. %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{attachfile} - [2006/03/28 v1.2a PDF 1.3+ file attachment] -\RequirePackage{ifpdf} -\ifpdf -\else - \PackageWarningNoLine{attachfile}{% - attachfile works _only_ with pdfLaTeX and _only_ in\MessageBreak - PDF-generating mode. For this run, placeholders will\MessageBreak - be substituted for all attachfile commands.} -\fi + [2007/01/15 v1.3 PDF 1.3+ file attachment] +\RequirePackage{ifpdf} \ifpdf \else +\PackageWarningNoLine{attachfile}{% attachfile works _only_ with +pdfLaTeX and _only_ in\MessageBreak PDF-generating mode. For this +run, placeholders will\MessageBreak be substituted for all attachfile +commands.} \fi \RequirePackage{keyval} \RequirePackage{calc} \RequirePackage{color} @@ -121,7 +118,13 @@ \DeclareRobustCommand{\atfi@embedfile}[1]{% \immediate\pdfobj stream attr { /Type /EmbeddedFile - \atfi@mimetype + \atfi@mimetype\space + \atfi@dlsize\space + /Params << + \atfi@credate\space + \atfi@moddate\space + \atfi@size\space + >> } file {#1}% \setcounter{atfi@embedfileobj}{\pdflastobj}% } @@ -153,7 +156,11 @@ } \DeclareRobustCommand{\atfi@insert@file@annot}[1]{% \rule{0pt}{0pt}% - \atfi@pdfstringdef\atfi@file{#1}% + \bgroup\Hy@unicodefalse + \atfi@pdfstringdef\atfi@file{#1}% + \edef\next{\egroup + \def\noexpand\atfi@file{\atfi@file}% + }\next \ifatfi@appearance \def\atfi@appearance@dict{% /AP << @@ -167,13 +174,14 @@ height \atfi@appearanceheight depth \atfi@appearancedepth { /Subtype /FileAttachment - \atfi@icon\space - \atfi@color\space + \atfi@appearance@dict\space \atfi@author\space + \atfi@color\space \atfi@date\space \atfi@description\space + \atfi@icon\space + \atfi@moddate\space \atfi@subject\space - \atfi@appearance@dict\space /F \theatfi@flags\space /FS << /Type /Filespec @@ -265,8 +273,11 @@ \atfi@timezone)% } \define@key{AtFi}{date}{% - \atfi@pdfstringdef\atfi@date{#1}% - \edef\atfi@date{/M (\atfi@date)}% + \bgroup \Hy@unicodefalse + \atfi@pdfstringdef\atfi@date{#1}% + \edef\next{\egroup + \def\noexpand\atfi@date{/M (\atfi@date)}% + }\next } \def\atfi@description{} \define@key{AtFi}{description}{% @@ -278,6 +289,32 @@ \atfi@pdfstringdef\atfi@subject{#1}% \edef\atfi@subject{/Subj (\atfi@subject)}% } +\def\atfi@credate{} +\define@key{AtFi}{created}{% + \bgroup \Hy@unicodefalse + \atfi@pdfstringdef\atfi@credate{#1}% + \edef\next{\egroup + \def\noexpand\atfi@credate{/CreationDate (\atfi@credate)}% + }\next +} +\def\atfi@moddate{} +\define@key{AtFi}{modified}{% + \bgroup \Hy@unicodefalse + \atfi@pdfstringdef\atfi@moddate{#1}% + \edef\next{\egroup + \def\noexpand\atfi@moddate{/ModDate (\atfi@moddate)}% + }\next +} +\def\atfi@size{} +\def\atfi@dlsize{} +\define@key{AtFi}{size}{% + \bgroup \Hy@unicodefalse + \atfi@pdfstringdef\atfi@size{#1}% + \edef\next{\egroup + \def\noexpand\atfi@size{/Size \atfi@size}% + \def\noexpand\atfi@dlsize{/DL \atfi@size}% + }\next +} \newif\ifatfi@print \atfi@printtrue \define@key{AtFi}{print}[true]{\csname atfi@print#1\endcsname} -- cgit v1.2.3