diff options
Diffstat (limited to 'macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx')
-rw-r--r-- | macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx index e8810f81ff..cf2176e439 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95c, released 2021-03-17} +% \date{Version 0.95d, released 2021-05-14} % % \maketitle % \begin{documentation} @@ -262,7 +262,8 @@ % \end{syntax} % This commands embeds the file \meta{source filename} in the PDF, % and creates a |/Filespec| dictionary object named \meta{object name}. -% The object name must be unique. +% The object name must be unique, it should start with the module name, so +% e.g. \texttt{module/name}. % The command uses the content of the local % dictionaries |l_pdffile|, |l_pdffile/Params| and |l_pdffile/Filespec| % to setup the dictionary entries of the stream object and the @@ -360,12 +361,12 @@ % \l_tmpa_str % \pdfdict_put:nnx {l_pdffile/Filespec} {Desc}{\l_tmpa_str} % %embeds testinput.txt and calls it grüße.txt -% \pdffile_embed_file:nnn {testinput.txt}{grüße.txt}{file:example1} +% \pdffile_embed_file:nnn {testinput.txt}{grüße.txt}{mymodule/example1} % %reference it in the panel % \pdfmanagement_add:nnx % {Catalog/Names} % {EmbeddedFiles} -% {\pdf_object_ref:n{file:example1}} +% {\pdf_object_ref:n{mymodule/example1}} % \group_end: % \end{verbatim} % \end{documentation} @@ -376,7 +377,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdffile}{2021-03-17}{0.95c} +\ProvidesExplPackage{l3pdffile}{2021-05-14}{0.95d} {embedding and referencing files in PDF---LaTeX PDF management testphase bundle} \RequirePackage{l3pdftools} %temporarly!! %</header> @@ -456,6 +457,7 @@ ,.tex = text/plain %or application/x-tex, not in iana.org list ,.txt = text/plain ,.sty = text/plain + ,.xml = text/xml } % \end{macrocode} % \begin{variable} @@ -618,7 +620,6 @@ \msg_error:nn {pdffile}{target-name-missing} } { - \pdf_object_new:nn { #1 } {dict} \group_begin: \@@_filename_convert_to_print:nN { #2 } \l_@@_tmpa_str \pdfdict_put:nnx {l_pdffile/Filespec}{F} { \l_@@_tmpa_str } @@ -638,7 +639,7 @@ %#1 {source filename} %#2 {target filename} -%#3 { filespec object name } (will internally get a prefix!) +%#3 { filespec object name } (will internally get a prefix! ??) \cs_new_protected:Npn \pdffile_embed_file:nnn #1 #2 #3 { % if #1 empty => only filespec % if #2 empty => = #1 @@ -681,6 +682,7 @@ } \tl_if_blank:nTF { #2 } { + \pdf_object_new:nn { #3 } {dict} \exp_args:Nnnx \@@_filespec_write:nnn %#1 dict, #2 target file name, #3 object ref @@ -689,6 +691,7 @@ {\l_@@_embed_ref_tl} } { + \pdf_object_new:nn { #3 } {dict} \exp_args:Nnnx \@@_filespec_write:nnn %#1 dict, #2 target file name, #3 object ref @@ -722,6 +725,7 @@ { #1 } \l_@@_automimetype_tl \tl_set:Nx \l_@@_embed_ref_tl { \pdf_object_ref_last: } + \pdf_object_new:nn { #3 } {dict} \exp_args:Nnxx \@@_filespec_write:nnn %#1 dict, #2 target file name, #3 object ref |