From 3ae03fa84b4c5f2d6c824681ff415633aa9a6090 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 12 Jan 2023 21:32:05 +0000 Subject: embedfile (12jan23) git-svn-id: svn://tug.org/texlive/trunk@65528 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/embedfile/README.md | 17 +++++-- .../embedfile/embedfile-example-collection.tex | 5 +- .../latex/embedfile/embedfile-example-plain.tex | 5 +- .../texmf-dist/doc/latex/embedfile/embedfile.pdf | Bin 397270 -> 421169 bytes .../source/latex/embedfile/embedfile.dtx | 52 ++++++++++++--------- .../texmf-dist/tex/generic/embedfile/embedfile.sty | 25 +++++----- .../texmf-dist/tex/latex/embedfile/dtx-attach.sty | 7 ++- Master/tlpkg/libexec/ctan2tds | 9 ++++ 8 files changed, 72 insertions(+), 48 deletions(-) diff --git a/Master/texmf-dist/doc/latex/embedfile/README.md b/Master/texmf-dist/doc/latex/embedfile/README.md index d410d5f8c1e..5a892264da2 100644 --- a/Master/texmf-dist/doc/latex/embedfile/README.md +++ b/Master/texmf-dist/doc/latex/embedfile/README.md @@ -1,7 +1,16 @@ -# embedfile +# embedfile package for LaTeX -embedfile package for LaTeX +## Version: 2023-01-12 v2.12 +This package embeds files in a PDF document, using the PDF format's embedding +operation (note the contrast with the attach operation used by the attachfile +and attachfile2 packages). Currently only pdfTeX and luaTeX in PDF mode are +supported. -This package embeds files to a PDF document. -Currently the only supported drivers are pdfTeX and LuaTeX. +## Copyright (C) +* 2006-2011 Heiko Oberdiek +* 2016-2023 Oberdiek Package Support Group +* https://github.com/ho-tex/embedfile/issues + +## License +LATEX Project Public License, version 1.3c or later. diff --git a/Master/texmf-dist/doc/latex/embedfile/embedfile-example-collection.tex b/Master/texmf-dist/doc/latex/embedfile/embedfile-example-collection.tex index cb45a774e50..db4c94709df 100644 --- a/Master/texmf-dist/doc/latex/embedfile/embedfile-example-collection.tex +++ b/Master/texmf-dist/doc/latex/embedfile/embedfile-example-collection.tex @@ -9,11 +9,11 @@ %% This is a generated file. %% %% Project: embedfile -%% Version: 2020-04-24 v2.11 +%% Version: 2023-01-12 v2.12 %% %% Copyright (C) %% 2006-2011 Heiko Oberdiek -%% 2016-2020 Oberdiek Package Support Group +%% 2016-2023 Oberdiek Package Support Group %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -31,7 +31,6 @@ %% Heiko Oberdiek and the Oberdiek Package Support Group %% https://github.com/ho-tex/embedfile/issues %% -%% %% The Base Interpreter refers to any `TeX-Format', %% because some files are installed in TDS:tex/generic//. %% diff --git a/Master/texmf-dist/doc/latex/embedfile/embedfile-example-plain.tex b/Master/texmf-dist/doc/latex/embedfile/embedfile-example-plain.tex index 551e6d6f6ae..2dcf5ea052a 100644 --- a/Master/texmf-dist/doc/latex/embedfile/embedfile-example-plain.tex +++ b/Master/texmf-dist/doc/latex/embedfile/embedfile-example-plain.tex @@ -9,11 +9,11 @@ %% This is a generated file. %% %% Project: embedfile -%% Version: 2020-04-24 v2.11 +%% Version: 2023-01-12 v2.12 %% %% Copyright (C) %% 2006-2011 Heiko Oberdiek -%% 2016-2020 Oberdiek Package Support Group +%% 2016-2023 Oberdiek Package Support Group %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -31,7 +31,6 @@ %% Heiko Oberdiek and the Oberdiek Package Support Group %% https://github.com/ho-tex/embedfile/issues %% -%% %% The Base Interpreter refers to any `TeX-Format', %% because some files are installed in TDS:tex/generic//. %% diff --git a/Master/texmf-dist/doc/latex/embedfile/embedfile.pdf b/Master/texmf-dist/doc/latex/embedfile/embedfile.pdf index 76d25b9e453..b0e9dddc1ca 100644 Binary files a/Master/texmf-dist/doc/latex/embedfile/embedfile.pdf and b/Master/texmf-dist/doc/latex/embedfile/embedfile.pdf differ diff --git a/Master/texmf-dist/source/latex/embedfile/embedfile.dtx b/Master/texmf-dist/source/latex/embedfile/embedfile.dtx index aed35ec7600..62e17326fc1 100644 --- a/Master/texmf-dist/source/latex/embedfile/embedfile.dtx +++ b/Master/texmf-dist/source/latex/embedfile/embedfile.dtx @@ -1,12 +1,12 @@ % \iffalse meta-comment % % File: embedfile.dtx -% Version: 2020-04-24 v2.11 +% Version: 2023-01-12 v2.12 % Info: Embed files into PDF % % Copyright (C) % 2006-2011 Heiko Oberdiek -% 2016-2020 Oberdiek Package Support Group +% 2016-2023 Oberdiek Package Support Group % https://github.com/ho-tex/embedfile/issues % % This work may be distributed and/or modified under the @@ -89,7 +89,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: embedfile 2020-04-24 v2.11 Embed files into PDF (HO)} +\Msg{* Package: embedfile 2023-01-12 v2.12 Embed files into PDF (HO)} \Msg{************************************************************************} \keepsilent @@ -101,11 +101,11 @@ This is a generated file. Project: embedfile -Version: 2020-04-24 v2.11 +Version: 2023-01-12 v2.12 Copyright (C) 2006-2011 Heiko Oberdiek - 2016-2020 Oberdiek Package Support Group + 2016-2023 Oberdiek Package Support Group This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either @@ -179,7 +179,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{embedfile.drv}% - [2020-04-24 v2.11 Embed files into PDF (HO)]% + [2023-01-12 v2.12 Embed files into PDF (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2011/11/22] \begin{document} @@ -193,7 +193,7 @@ and the derived files % \GetFileInfo{embedfile.drv} % % \title{The \xpackage{embedfile} package} -% \date{2020-04-24 v2.11} +% \date{2023-01-12 v2.12} % \author{Heiko Oberdiek\thanks % {Please report any issues at \url{https://github.com/ho-tex/embedfile/issues}}} % @@ -289,8 +289,11 @@ and the derived files % are different. % \item[\xoption{ucfilespec}] % Since PDF 1.7 the file name may be provided in Unicode. +% It must be provided for PDF/A-3. +% By default the \xoption{filespec} is used. % The conversion of the option value into a PDF string % is controlled by option \xoption{stringmethod}. +% Non-ascii chars can look funny if hyperref is not loaded! % \item[\xoption{filesystem}] % This sets the entry \verb|/FS| in % the file specification dictionary, see PDF specification @@ -303,8 +306,10 @@ and the derived files % \item[\xoption{desc}] % The description for the file. % \item[\xoption{afrelationship}] -% This adds the /AFRelationship key to the filespec dicrectory. The value is -% a pdf name with or without the leading slash.% +% This adds the /AFRelationship key to the filespec dictionary. The value is +% a pdf name with or without the leading slash. +% Typical values are \verb|Source|, \verb|Data|, \verb|Alternative|, +% \verb|Schema| or \verb|Unspecified|. Mandatory for PDF/A-3. % \item[\xoption{stringmethod}] % The package must convert the values of the keys \xoption{ucfilespec} % and \xoption{desc} into a PDF string (before version 2.4: \xoption{filespec} @@ -623,7 +628,7 @@ You need Acrobat Reader 8 or higher. %<*dtxattach> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{dtx-attach} - [2020-04-24 v2.11 Embed \string\jobname.dtx (HO)]% + [2023-01-12 v2.12 Embed \string\jobname.dtx (HO)]% \RequirePackage{embedfile}[2019/12/03] \embedfile[% stringmethod=escape,% @@ -714,7 +719,7 @@ You need Acrobat Reader 8 or higher. \fi \expandafter\x\csname ver@embedfile.sty\endcsname \ProvidesPackage{embedfile}% - [2020-04-24 v2.11 Embed files into PDF (HO)]% + [2023-01-12 v2.12 Embed files into PDF (HO)]% % \end{macrocode} % % \subsection{Catcodes} @@ -785,9 +790,12 @@ You need Acrobat Reader 8 or higher. % \begin{macro}{\EmFi@Error} % \begin{macrocode} \EmFi@RequirePackage{infwarerr}[2007/09/09]% -\def\EmFi@Error{% - \@PackageError{embedfile}% -} +\ifcsname EmFi@Error\endcsname +\else + \def\EmFi@Error{% + \@PackageError{embedfile}% + } +\fi % \end{macrocode} % \end{macro} % @@ -810,7 +818,7 @@ You need Acrobat Reader 8 or higher. \ifpdf \else \EmFi@Error{% - Missing pdfTeX in PDF mode% + Missing pdfTeX or luaTeX in PDF mode% }{% Currently other drivers are not supported. % Package loading is aborted.% @@ -1404,7 +1412,7 @@ You need Acrobat Reader 8 or higher. \pdf@escapestring{\EmFi@filespec}% }% \ifx\EmFi@ucfilespec\ltx@empty - \let\EmFi@@ucfilespec\ltx@empty + \EmFi@convert\EmFi@filespec\EmFi@@ucfilespec \else \EmFi@convert\EmFi@ucfilespec\EmFi@@ucfilespec \fi @@ -1449,10 +1457,7 @@ You need Acrobat Reader 8 or higher. /FS/\pdf@escapename{\EmFi@filesystem}% \fi /F(\EmFi@@filespec)% - \ifx\EmFi@@ucfilespec\ltx@empty - \else - /UF(\EmFi@@ucfilespec)% - \fi + /UF(\EmFi@@ucfilespec)% \ifx\EmFi@@desc\ltx@empty \else /Desc(\EmFi@@desc)% @@ -1967,7 +1972,12 @@ You need Acrobat Reader 8 or higher. % converted but name escaped. % \end{Version} % \begin{Version}{2020-04-24 v2.11} -% \item Added a missing fi. +% \item Updated +% \end{Version}% +% \begin{Version}{2023-01-12 v2.12} +% \item Allow the error message to be changed for better tex4ht compability (PR\#7) +% \item Adapted the error message to luatex +% \item The /UF key in the filespec dictionary is now set by default (PR\#6) % \end{Version} % \end{History} % diff --git a/Master/texmf-dist/tex/generic/embedfile/embedfile.sty b/Master/texmf-dist/tex/generic/embedfile/embedfile.sty index d16a59cbb3b..750c15f2e21 100644 --- a/Master/texmf-dist/tex/generic/embedfile/embedfile.sty +++ b/Master/texmf-dist/tex/generic/embedfile/embedfile.sty @@ -9,11 +9,11 @@ %% This is a generated file. %% %% Project: embedfile -%% Version: 2020-04-24 v2.11 +%% Version: 2023-01-12 v2.12 %% %% Copyright (C) %% 2006-2011 Heiko Oberdiek -%% 2016-2020 Oberdiek Package Support Group +%% 2016-2023 Oberdiek Package Support Group %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -31,7 +31,6 @@ %% Heiko Oberdiek and the Oberdiek Package Support Group %% https://github.com/ho-tex/embedfile/issues %% -%% %% The Base Interpreter refers to any `TeX-Format', %% because some files are installed in TDS:tex/generic//. %% @@ -109,7 +108,7 @@ \fi \expandafter\x\csname ver@embedfile.sty\endcsname \ProvidesPackage{embedfile}% - [2020-04-24 v2.11 Embed files into PDF (HO)]% + [2023-01-12 v2.12 Embed files into PDF (HO)]% \begingroup\catcode61\catcode48\catcode32=10\relax% \catcode13=5 % ^^M \endlinechar=13 % @@ -164,9 +163,12 @@ \let\EmFi@RequirePackage\RequirePackage \fi \EmFi@RequirePackage{infwarerr}[2007/09/09]% -\def\EmFi@Error{% - \@PackageError{embedfile}% -} +\ifcsname EmFi@Error\endcsname +\else + \def\EmFi@Error{% + \@PackageError{embedfile}% + } +\fi \ifx\pdfextension\@undefined\else \protected\def\pdflastobj {\numexpr\pdffeedback lastobj\relax} \protected\def\pdfnames {\pdfextension names } @@ -178,7 +180,7 @@ \ifpdf \else \EmFi@Error{% - Missing pdfTeX in PDF mode% + Missing pdfTeX or luaTeX in PDF mode% }{% Currently other drivers are not supported. % Package loading is aborted.% @@ -538,7 +540,7 @@ \pdf@escapestring{\EmFi@filespec}% }% \ifx\EmFi@ucfilespec\ltx@empty - \let\EmFi@@ucfilespec\ltx@empty + \EmFi@convert\EmFi@filespec\EmFi@@ucfilespec \else \EmFi@convert\EmFi@ucfilespec\EmFi@@ucfilespec \fi @@ -583,10 +585,7 @@ /FS/\pdf@escapename{\EmFi@filesystem}% \fi /F(\EmFi@@filespec)% - \ifx\EmFi@@ucfilespec\ltx@empty - \else - /UF(\EmFi@@ucfilespec)% - \fi + /UF(\EmFi@@ucfilespec)% \ifx\EmFi@@desc\ltx@empty \else /Desc(\EmFi@@desc)% diff --git a/Master/texmf-dist/tex/latex/embedfile/dtx-attach.sty b/Master/texmf-dist/tex/latex/embedfile/dtx-attach.sty index 24d5d80680e..2ed3dbee5a0 100644 --- a/Master/texmf-dist/tex/latex/embedfile/dtx-attach.sty +++ b/Master/texmf-dist/tex/latex/embedfile/dtx-attach.sty @@ -9,11 +9,11 @@ %% This is a generated file. %% %% Project: embedfile -%% Version: 2020-04-24 v2.11 +%% Version: 2023-01-12 v2.12 %% %% Copyright (C) %% 2006-2011 Heiko Oberdiek -%% 2016-2020 Oberdiek Package Support Group +%% 2016-2023 Oberdiek Package Support Group %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -31,7 +31,6 @@ %% Heiko Oberdiek and the Oberdiek Package Support Group %% https://github.com/ho-tex/embedfile/issues %% -%% %% The Base Interpreter refers to any `TeX-Format', %% because some files are installed in TDS:tex/generic//. %% @@ -45,7 +44,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{dtx-attach} - [2020-04-24 v2.11 Embed \string\jobname.dtx (HO)]% + [2023-01-12 v2.12 Embed \string\jobname.dtx (HO)]% \RequirePackage{embedfile}[2019/12/03] \embedfile[% stringmethod=escape,% diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index a66c2b68043..66b27cbe3f8 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -1682,6 +1682,7 @@ chomp (my $ctan_root = `tlpkginfo --ctan-root`); 'digestif' => '&POSTdigestif', 'doipubmed' => '&POSTlatex2html', 'e-french' => '&POSTe_french', + 'embedfile' => '&POSTembedfile', 'encxvlna' => '&POSTencxvlna', 'endofproofwd' => '&POSTendofproofwd', 'enigma' => '&POSTenigma', @@ -3111,6 +3112,7 @@ my $core_latex = "$Master/texmf-dist/tex/latex"; 'ekaia' => 'latex', # requires interaction 'ellipsis' => 'tex', 'elteikthesis' => 'latex', # requires interaction + 'embedfile' => 'etex', 'emisa' => 'pdflatex-preserve-pdf', 'engpron' => 'latex -translate-file=empty.tcx', # no 8-bit 'ecclesiastic' => 'latex', # requires interaction @@ -6766,6 +6768,13 @@ sub POSTe_french { &SYSTEM ("$MV texmf/doc/* ."); } +sub POSTembedfile { + print "POST$package - one .sty generic, one latex\n"; + # since two different destinations, handle it specially. + &mv_with_mkdir ("$DEST/tex/latex/$package/$package.sty", + "$DEST/tex/generic/$package/"); +} + sub POSTencxvlna { print "POST$package - .tex name conflict\n"; &SYSTEM ("$MV doc/* ."); -- cgit v1.2.3