summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx')
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx119
1 files changed, 74 insertions, 45 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx b/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx
index 0c23d2ca767..c60089364cf 100644
--- a/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2005-2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+% Copyright (C) 2005-2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -70,7 +70,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: attachfile2 2008/07/29 v2.4 attach files into PDF (HO)}
+\Msg{* Package: attachfile2 2009/09/25 v2.5 attach files into PDF (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -81,7 +81,7 @@
This is a generated file.
-Copyright (C) 2005-2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+Copyright (C) 2005-2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -144,7 +144,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{attachfile2.drv}%
- [2008/07/29 v2.4 attach files into PDF (HO)]%
+ [2009/09/25 v2.5 attach files into PDF (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -153,7 +153,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1380}
+% \CheckSum{1405}
%
% \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
@@ -174,7 +174,7 @@ and the derived files
% \GetFileInfo{attachfile2.drv}
%
% \title{The \xpackage{attachfile2} package}
-% \date{2008/07/29 v2.4}
+% \date{2009/09/25 v2.5}
% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
%
% \maketitle
@@ -280,6 +280,8 @@ and the derived files
% \item New option \xoption{scale} for scaling the annotation rectangle.
% \item Options \xoption{file} and \xoption{nofile} for controlling
% the generation of the auxiliary file \xfile{.atfi}.
+% \item New option \xoption{ucfilespec} for file names with
+% characters outside ASCII (PDF 1.7).
% \end{itemize}
%
% \subsubsection{Option \xoption{color}}
@@ -392,13 +394,14 @@ and the derived files
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{attachfile2}%
- [2008/07/29 v2.4 attach files into PDF (HO)]%
+ [2009/09/25 v2.5 attach files into PDF (HO)]%
% \end{macrocode}
% \begin{macrocode}
\RequirePackage{ifpdf}
\RequirePackage{keyval}
\RequirePackage{color}
\RequirePackage{kvoptions}[2006/08/17]
+\RequirePackage{pdfescape}[2007/11/11]
% --- hyperref ---
@@ -406,11 +409,6 @@ and the derived files
% because of \pdfstringdef
\RequirePackage{hycolor}[2008/07/29]
-\def\atfi@pdfstringdef#1#2{%
- \pdfstringdef\atfi@temp@string{#2}%
- \edef#1{\atfi@temp@string}%
-}
-
% --- convert to hex ---
\def\atfi@hexdigit#1{%
@@ -566,7 +564,7 @@ and the derived files
\atfi@timezone)%
}
\define@key{AtFi}{date}{%
- \atfi@pdfstringdef\atfi@date{#1}%
+ \EdefEscapeString\atfi@date{#1}%
\edef\atfi@date{/M(\atfi@date)}%
}
@@ -627,6 +625,16 @@ and the derived files
\def\atfi@scale{#1}%
}
+% option ucfilespec
+\def\atfi@ucfilespec{}
+\define@key{AtFi}{ucfilespec}[1]{%
+ \def\atfi@ucfilespec{#1}%
+ \ifx\atfi@ucfilespec\@empty
+ \else
+ \atfi@pdfstringdef\atfi@ucfilespec{#1}%
+ \fi
+}
+
% option nofiles
\newif\ifatfi@nofiles
\atfi@nofilesfalse
@@ -1159,7 +1167,7 @@ and the derived files
%<*pdftex>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{atfipdftex.def}%
- [2008/07/29 v2.4 attachfile2 driver for pdfTeX (HO)]%
+ [2009/09/25 v2.5 attachfile2 driver for pdfTeX (HO)]%
% \end{macrocode}
% \begin{macrocode}
\let\atfi@literal\pdfliteral
@@ -1253,19 +1261,26 @@ and the derived files
\let\atfi@appearance@dict\@empty
\fi
\@ifundefined{atfi@fsobj@#1}{%
- \atfi@pdfstringdef\atfi@file{#1}%
- \immediate\pdfobj{%
- <<%
- /Type/Filespec%
- /F(\atfi@file)%
- /EF<<%
- /F \@nameuse{atfi@fileobj@#1} 0 R%
+ \begingroup
+ \hypersetup{unicode=false}%
+ \atfi@pdfstringdef\atfi@file{#1}%
+ \immediate\pdfobj{%
+ <<%
+ /Type/Filespec%
+ /F(\atfi@file)%
+ \ifx\atfi@ucfilespec\@empty
+ \else
+ /UF(\atfi@ucfilespec)%
+ \fi
+ /EF<<%
+ /F \@nameuse{atfi@fileobj@#1} 0 R%
+ >>%
>>%
- >>%
- }%
- \expandafter\xdef\csname atfi@fsobj@#1\endcsname{%
- \the\pdflastobj
- }%
+ }%
+ \expandafter\xdef\csname atfi@fsobj@#1\endcsname{%
+ \the\pdflastobj
+ }%
+ \endgroup
}{%
}%
\pdfannot width \atfi@scale\atfi@appearancewidth
@@ -1298,7 +1313,7 @@ and the derived files
%<*dvips>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{atfipdftex.def}%
- [2008/07/29 v2.4 attachfile2 driver for dvips (HO)]%
+ [2009/09/25 v2.5 attachfile2 driver for dvips (HO)]%
% \end{macrocode}
% \begin{macrocode}
\def\atfi@literal#1{%
@@ -1748,23 +1763,30 @@ and the derived files
\@ifundefined{atfi@fsobj@#1}{%
\stepcounter{atfi@obj}%
\expandafter\xdef\csname atfi@fsobj@#1\endcsname{\theatfi@obj}%
- \atfi@pdfstringdef\atfi@file{#1}%
- \atfi@literal{%
- [%
- /_objdef \theatfi@obj
- /type/dict%
- /OBJ pdfmark%
- [%
- \theatfi@obj
- <<%
- /Type/Filespec%
- /F(\atfi@file)%
- /EF<<%
- /F \csname atfi@fileobj@#1\endcsname
+ \begingroup
+ \hypersetup{unicode=false}%
+ \atfi@pdfstringdef\atfi@file{#1}%
+ \atfi@literal{%
+ [%
+ /_objdef \theatfi@obj
+ /type/dict%
+ /OBJ pdfmark%
+ [%
+ \theatfi@obj
+ <<%
+ /Type/Filespec%
+ /F(\atfi@file)%
+ \ifx\atfi@ucfilespec\@empty
+ \else
+ /UF(\atfi@ucfilespec)%
+ \fi
+ /EF<<%
+ /F \csname atfi@fileobj@#1\endcsname
+ >>%
>>%
- >>%
- /PUT pdfmark%
- }%
+ /PUT pdfmark%
+ }%
+ \endgroup
}{%
}%
\atfi@literal{%
@@ -1835,8 +1857,8 @@ $^W=1; # turn warning on
#
my $file = "pdfatfi.pl";
my $program = uc($&) if $file =~ /^\w+/;
-my $version = "2.4";
-my $date = "2008/07/29";
+my $version = "2.5";
+my $date = "2009/09/25";
my $author = "Heiko Oberdiek";
my $copyright = "Copyright (c) 2005, 2006 by $author.";
#
@@ -2267,6 +2289,13 @@ __END__
% the usual color specifications if package \xpackage{xcolor} is
% loaded.
% \end{Version}
+% \begin{Version}{2009/09/25 v2.5}
+% \item
+% New option \xoption{ucfilespec} (since PDF 1.7).
+% \item
+% Fix: \xpackage{hyperref}'s option \xoption{unicode} is disabled
+% for file names except for \xoption{ucfilespec}.
+% \end{Version}
% \end{History}
%
% \PrintIndex