diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/embedfile.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/embedfile.dtx | 148 |
1 files changed, 107 insertions, 41 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/embedfile.dtx b/Master/texmf-dist/source/latex/oberdiek/embedfile.dtx index 9f0879785bb..03c0959cc19 100644 --- a/Master/texmf-dist/source/latex/oberdiek/embedfile.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/embedfile.dtx @@ -75,12 +75,13 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: embedfile 2007/10/29 v2.1 embed files into PDF (HO)} +\Msg{* Package: embedfile 2007/11/11 v2.2 embed files into PDF (HO)} \Msg{************************************************************************} \keepsilent \askforoverwritefalse +\let\MetaPrefix\relax \preamble This is a generated file. @@ -107,6 +108,7 @@ and the derived files embedfile-test2.tex, embedfile-test3.tex. \endpreamble +\let\MetaPrefix\DoubleperCent \generate{% \file{embedfile.ins}{\from{embedfile.dtx}{install}}% @@ -131,6 +133,10 @@ and the derived files \Msg{*} \Msg{* embedfile.sty, dtx-attach.sty} \Msg{*} +\Msg{* And install the following script file:} +\Msg{*} +\Msg{* } +\Msg{*} \Msg{* To produce the documentation run the file `embedfile.drv'} \Msg{* through LaTeX.} \Msg{*} @@ -146,16 +152,16 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{embedfile.drv}% - [2007/10/29 v2.1 embed files into PDF (HO)]% + [2007/11/11 v2.2 embed files into PDF (HO)]% \documentclass{ltxdoc} -\usepackage{holtxdoc}[2007/10/21] +\usepackage{holtxdoc}[2007/11/11] \begin{document} \DocInput{embedfile.dtx}% \end{document} %</driver> % \fi % -% \CheckSum{1287} +% \CheckSum{1378} % % \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 @@ -176,7 +182,7 @@ and the derived files % \GetFileInfo{embedfile.drv} % % \title{The \xpackage{embedfile} package} -% \date{2007/10/29 v2.1} +% \date{2007/11/11 v2.2} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -464,19 +470,20 @@ and the derived files % after the last embedded file. % \begin{macrocode} %<*exampleplain> - % Load packages +%<<END +% Load packages \input miniltx - % \def\Gin@driver{pdftex.def} - % \input graphicx.sty +% \def\Gin@driver{pdftex.def} +% \input graphicx.sty \input embedfile.sty \resetatcatcode - % default setting +% default setting \embedfilesetup{ mimetype=text/plain } - % Embed files +% Embed files \embedfile[ filespec=example.tex, desc={Source code (plain-TeX) of this example} @@ -491,12 +498,13 @@ and the derived files desc={Documentation of package `embedfile'} ]{embedfile.pdf} - % Some text +% Some text This example document contains three embedded files. - % End of document +% End of document \embedfilefinish % don't forget \bye +%END %</exampleplain> % \end{macrocode} % @@ -504,12 +512,13 @@ This example document contains three embedded files. % % \begin{macrocode} %<*examplecollection> +%<<END \NeedsTeXFormat{LaTeX2e} \documentclass{article} \usepackage[bookmarks=false]{hyperref} - % provides \pdfstringdef that is then used by `title' and - % other keys. -\usepackage{embedfile}[2007/10/29] +% provides \pdfstringdef that is then used by `title' and +% other keys. +\usepackage{embedfile}[2007/11/11] \embedfilesetup{ view=details, initialfile=embedfile.pdf @@ -562,7 +571,7 @@ You need Acrobat Reader 8 or higher. ]{\jobname.tex} \end{document} -% +%END %</examplecollection> % \end{macrocode} % @@ -577,8 +586,8 @@ You need Acrobat Reader 8 or higher. %<*dtxattach> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{dtx-attach} - [2007/10/29 v2.1 Embed \string\jobname.dtx (HO)]% -\RequirePackage{embedfile}[2007/10/29] + [2007/11/11 v2.2 Embed \string\jobname.dtx (HO)]% +\RequirePackage{embedfile}[2007/11/11] \embedfile[% stringmethod=escape,% mimetype=plain/text,% @@ -615,6 +624,9 @@ You need Acrobat Reader 8 or higher. \fi \fi \else + \catcode35 6 % # + \catcode123 1 % { + \catcode125 2 % } \expandafter\ifx\csname PackageInfo\endcsname\relax \def\x#1#2{% \immediate\write-1{Package #1 Info: #2.}% @@ -631,6 +643,7 @@ You need Acrobat Reader 8 or higher. % Package identification: % \begin{macrocode} \begingroup + \catcode35 6 % # \catcode40 12 % ( \catcode41 12 % ) \catcode44 12 % , @@ -639,6 +652,8 @@ You need Acrobat Reader 8 or higher. \catcode47 12 % / \catcode58 12 % : \catcode64 11 % @ + \catcode123 1 % { + \catcode125 2 % } \expandafter\ifx\csname ProvidesPackage\endcsname\relax \def\x#1#2#3[#4]{\endgroup \immediate\write-1{Package: #3 #4}% @@ -654,16 +669,28 @@ You need Acrobat Reader 8 or higher. \fi \expandafter\x\csname ver@embedfile.sty\endcsname \ProvidesPackage{embedfile}% - [2007/10/29 v2.1 embed files into PDF (HO)] + [2007/11/11 v2.2 embed files into PDF (HO)] % \end{macrocode} % % \subsection{Catcodes} % % \begin{macrocode} -\expandafter\edef\csname EmFi@AtEnd\endcsname{% - \catcode64 \the\catcode64\relax -} +\begingroup + \catcode123 1 % { + \catcode125 2 % } + \def\x{\endgroup + \expandafter\edef\csname EmFi@AtEnd\endcsname{% + \catcode35 \the\catcode35\relax + \catcode64 \the\catcode64\relax + \catcode123 \the\catcode123\relax + \catcode125 \the\catcode125\relax + }% + }% +\x +\catcode35 6 % # \catcode64 11 % @ +\catcode123 1 % { +\catcode125 2 % } \def\TMP@EnsureCode#1#2{% \edef\EmFi@AtEnd{% \EmFi@AtEnd @@ -727,10 +754,13 @@ You need Acrobat Reader 8 or higher. \expandafter\endinput \fi % \end{macrocode} +% \begin{macrocode} +\EmFi@RequirePackage{pdftexcmds}[2007/11/11] +% \end{macrocode} % Check version. % \begin{macrocode} \begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname pdffilesize\endcsname\relax +\expandafter\ifx\csname pdf@filesize\endcsname\relax \EmFi@Error{% Unsupported pdfTeX version% }{% @@ -746,7 +776,7 @@ You need Acrobat Reader 8 or higher. % Minimal version of package \xpackage{pdfescape} is 2007/08/27 v1.5 % because of \cs{EdefSanitize}. % \begin{macrocode} -\EmFi@RequirePackage{pdfescape}[2007/10/27] +\EmFi@RequirePackage{pdfescape}[2007/11/11] % \end{macrocode} % % \begin{macrocode} @@ -1186,7 +1216,7 @@ You need Acrobat Reader 8 or higher. \EmFi@convert\EmFi@title\EmFi@title \xdef\EmFi@schema{% \EmFi@schema - /\pdfescapename{\EmFi@key}<<% + /\pdf@escapename{\EmFi@key}<<% /Subtype/% \ifx\EmFi@type\EmFi@S@date D% \else\ifx\EmFi@type\EmFi@S@number N% @@ -1265,7 +1295,7 @@ You need Acrobat Reader 8 or higher. \else \xdef\EmFi@sortkeys{% \EmFi@sortkeys - /\pdfescapename{#1}% + /\pdf@escapename{#1}% }% \ifx\EmFi@sortorders\empty \global\let\EmFi@sortorders\EmFi@temp @@ -1397,7 +1427,7 @@ You need Acrobat Reader 8 or higher. \global\EmFi@initialfiletrue \fi \setkeys{EmFi}{#1}% - \expandafter\ifx\expandafter\\\pdffilesize{\EmFi@file}\\% + \expandafter\ifx\expandafter\\\pdf@filesize{\EmFi@file}\\% \EmFi@Error{% File `\EmFi@file' not found% }{% @@ -1423,12 +1453,12 @@ You need Acrobat Reader 8 or higher. /Type/EmbeddedFile% \ifx\EmFi@mimetype\empty \else - /Subtype/\pdfescapename{\EmFi@mimetype}% + /Subtype/\pdf@escapename{\EmFi@mimetype}% \fi /Params<<% - /ModDate(\pdffilemoddate{\EmFi@file})% - /Size \pdffilesize{\EmFi@file}% - /CheckSum<\pdfmdfivesum file{\EmFi@file}>% + /ModDate(\pdf@filemoddate{\EmFi@file})% + /Size \pdf@filesize{\EmFi@file}% + /CheckSum<\pdf@filemdfivesum{\EmFi@file}>% >>% }file{\EmFi@file}\relax \EmFi@defobj{EmbeddedFile}% @@ -1437,7 +1467,7 @@ You need Acrobat Reader 8 or higher. /Type/Filespec% \ifx\EmFi@filesystem\empty \else - /FS/\pdfescapename{\EmFi@filesystem}% + /FS/\pdf@escapename{\EmFi@filesystem}% \fi /F(\EmFi@@filespec)% \ifx\EmFi@@desc\empty @@ -1468,10 +1498,10 @@ You need Acrobat Reader 8 or higher. \expandafter\ifx\csname EmFi@P@#1\endcsname\relax \expandafter\ifx\csname EmFi@V@#1\endcsname\relax \else - /\pdfescapename{#1}\csname EmFi@V@#1\endcsname + /\pdf@escapename{#1}\csname EmFi@V@#1\endcsname \fi \else - /\pdfescapename{#1}<<% + /\pdf@escapename{#1}<<% \expandafter\ifx\csname EmFi@V@#1\endcsname\relax \else /D\csname EmFi@V@#1\endcsname @@ -1485,11 +1515,11 @@ You need Acrobat Reader 8 or higher. % \begin{macro}{\EmFi@convert} % \begin{macrocode} \def\EmFi@convert#1#2{% - \ifnum\pdfstrcmp{\EmFi@stringmethod}{psd}=0 % + \ifnum\pdf@strcmp{\EmFi@stringmethod}{psd}=0 % \pdfstringdef\EmFi@temp{#1}% \let#2\EmFi@temp \else - \edef#2{\pdfescapestring{#1}}% + \edef#2{\pdf@escapestring{#1}}% \fi } % \end{macrocode} @@ -1506,12 +1536,12 @@ You need Acrobat Reader 8 or higher. % \begin{macrocode} \def\EmFi@add#1#2{% \begingroup - \edef\key{\pdfescapehex{#1}}% + \edef\key{\pdf@escapehex{#1}}% \ifx\EmFi@list\empty \xdef\EmFi@list{\noexpand\do{\key}{#2}}% \else \def\do##1##2{% - \ifnum\pdfstrcmp{##1}{\key}>0 % + \ifnum\pdf@strcmp{##1}{\key}>0 % \edef\x{% \toks@{% \the\toks@% @@ -1657,7 +1687,39 @@ You need Acrobat Reader 8 or higher. %<*test1> % \end{macrocode} % \begin{macrocode} +\catcode`\{=1 % +\catcode`\}=2 % +\catcode`\#=6 % \catcode`\@=11 % +\expandafter\ifx\csname count@\endcsname\relax + \countdef\count@=255 % +\fi +\expandafter\ifx\csname @gobble\endcsname\relax + \long\def\@gobble#1{}% +\fi +\expandafter\ifx\csname @firstofone\endcsname\relax + \long\def\@firstofone#1{#1}% +\fi +\expandafter\ifx\csname loop\endcsname\relax + \expandafter\@firstofone +\else + \expandafter\@gobble +\fi +{% + \def\loop#1\repeat{% + \def\body{#1}% + \iterate + }% + \def\iterate{% + \body + \let\next\iterate + \else + \let\next\relax + \fi + \next + }% + \let\repeat=\fi +}% \def\RestoreCatcodes{} \count@=0 % \loop @@ -1666,7 +1728,7 @@ You need Acrobat Reader 8 or higher. \catcode\the\count@=\the\catcode\count@\relax }% \ifnum\count@<255 % - \advance\count@\@ne + \advance\count@ 1 % \repeat \def\RangeCatcodeInvalid#1#2{% @@ -1674,7 +1736,7 @@ You need Acrobat Reader 8 or higher. \loop \catcode\count@=15 % \ifnum\count@<#2\relax - \advance\count@\@ne + \advance\count@ 1 % \repeat } \def\Test{% @@ -1737,7 +1799,7 @@ Test (plain-\TeX): {\tt embedfile.dtx} should be embedded.% \NeedsTeXFormat{LaTeX2e} \let\SavedJobname\jobname \def\jobname{embedfile} -\RequirePackage{dtx-attach}[2007/10/29] +\RequirePackage{dtx-attach}[2007/11/11] \let\jobname\SavedJobname \documentclass{minimal} \begin{document} @@ -1986,6 +2048,10 @@ Test (plain-\TeX): {\tt embedfile.dtx} should be embedded.% % Export of object references by adding new option \xoption{id} and % new macros \cs{embedfileifobjectexists} and \cs{embedfilegetobject}. % \end{Version} +% \begin{Version}{2007/11/11 v2.2} +% \item +% Use of package \xpackage{pdftexcmds} for \LuaTeX\ support. +% \end{Version} % \end{History} % % \PrintIndex |