summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-05-28 21:23:18 +0000
committerKarl Berry <karl@freefriends.org>2019-05-28 21:23:18 +0000
commitc55b67ba30f320ddfc93fbdca08cab7512704011 (patch)
treea9e49acdcf4d244f4d4e8f0c46aec7aad132cb28 /Master
parentbd32b6dc742088fab1ad44079650c6bfed720398 (diff)
intopdf (28may19)
git-svn-id: svn://tug.org/texlive/trunk@51247 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/intopdf/intopdf.pdfbin415313 -> 398683 bytes
-rw-r--r--Master/texmf-dist/source/latex/intopdf/intopdf.dtx34
-rw-r--r--Master/texmf-dist/tex/latex/intopdf/intopdf.sty25
3 files changed, 34 insertions, 25 deletions
diff --git a/Master/texmf-dist/doc/latex/intopdf/intopdf.pdf b/Master/texmf-dist/doc/latex/intopdf/intopdf.pdf
index 503acc9eae1..32099b778d9 100644
--- a/Master/texmf-dist/doc/latex/intopdf/intopdf.pdf
+++ b/Master/texmf-dist/doc/latex/intopdf/intopdf.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/intopdf/intopdf.dtx b/Master/texmf-dist/source/latex/intopdf/intopdf.dtx
index 7bf0db8e22f..903e295b801 100644
--- a/Master/texmf-dist/source/latex/intopdf/intopdf.dtx
+++ b/Master/texmf-dist/source/latex/intopdf/intopdf.dtx
@@ -46,7 +46,7 @@
%
% \GetFileInfo{intopdf.dtx}
% \title{The \pkg{intopdf} package\thanks{This document
-% corresponds to \pkg{intopdf}~0.1.0, dated~2018/03/15.}}
+% corresponds to \pkg{intopdf}~0.2.1, dated~2019/05/28.}}
% \author{Marcel Kr\"uger \\ \href{mailto:tex@2krueger.de}{tex@2krueger.de}}
%
% \maketitle
@@ -58,12 +58,14 @@
% \section{Usage}
% \begin{function}{\attachandlink}
% \begin{syntax}
-% |\attachandlink| \Arg{filename}[\meta{mime-type}]\Arg{Description}\Arg{link text}
+% |\attachandlink| [\meta{filespec}]\Arg{filename}[\meta{mime-type}]\Arg{Description}\Arg{link text}
% \end{syntax}
% The text \meta{link text} is inserted, linking to the file \meta{filename} which is attached to the document.
%
% \meta{Description} should be a description of the file and will be shown by the PDF viewer in the atttached files section and sometimes in a mouseover tooltip.\\
% \meta{mime-type} should be the MIME-Type of \meta{filename}. Currently \meta{mime-type} is mandatory but I hope to make it optional in a later release.
+% Additionally \meta{filespec} can be used to specify the filename which will be shown in the PDF viewer.
+% If this is not given, it will default to \meta{filename}.
% \end{function}
% \section{Example}
% The source of the document is attached
@@ -84,11 +86,11 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\RequirePackage{expl3}
+\RequirePackage{expl3,xparse}
\ProvidesExplPackage
{intopdf}
- {2018/03/15}
- {0.1.0}
+ {2019/05/28}
+ {0.2.1}
{Embed non-PDF files into PDF with hyperlink}
\RequirePackage{hyperref}
@@ -167,18 +169,19 @@
\__intopdf_annot_end:
}
% \end{macrocode}
-% \begin{macro}{\intopdf_attach_link:nnnn,\attachandlink}
+% \begin{macro}{\attachandlink,\intopdf_attach_link:nnnnn,\intopdf_attach_link:nnnn}
+% \changes{v0.2.0}{2019/05/21}{Added filespec support. (The first optional argument) Added \cs{intopdf_attach_link:nnnnn}.}
% The main functionality.
% \begin{macrocode}
-\cs_new_protected:Nn\intopdf_attach_link:nnnn{
+\cs_new_protected:Nn\intopdf_attach_link:nnnnn{
\__intopdf_pdfstream_file:nn{
- /Subtype /\__intopdf_escape_name:n{#2}
- }{#1}
+ /Subtype /\__intopdf_escape_name:n{#3}
+ }{#2}
\__intopdf_pdfobj:n{
/Type /Filespec
/F \__intopdf_escape_string:n{#1}
/EF << /F \__intopdf_lastobj_ref: >>
- /Desc \__intopdf_escape_string:n{#3}
+ /Desc \__intopdf_escape_string:n{#4}
}%
\__intopdf_annot:nnn{
\Hy@setpdfborder
@@ -196,14 +199,17 @@
/FS \__intopdf_lastobj_ref:
/F\c_space_tl 416
/CA\c_space_tl 0
- /Contents \__intopdf_escape_string:n{#3}
+ /Contents \__intopdf_escape_string:n{#4}
}{
- #4
+ #5
}
}
}
-\cs_new_protected:Npn\attachandlink#1[#2]#3#4{
- \intopdf_attach_link:nnnn{#1}{#2}{#3}{#4}
+\cs_new_protected:Npn \intopdf_attach_link:nnnn #1{
+ \intopdf_attach_link:nnnnn{#1}{#1}
+}
+\NewDocumentCommand\attachandlink{O{#2}mr[]mm}{
+ \intopdf_attach_link:nnnnn{#1}{#2}{#3}{#4}{#5}
}
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/tex/latex/intopdf/intopdf.sty b/Master/texmf-dist/tex/latex/intopdf/intopdf.sty
index 528bdf0648c..311ee82a403 100644
--- a/Master/texmf-dist/tex/latex/intopdf/intopdf.sty
+++ b/Master/texmf-dist/tex/latex/intopdf/intopdf.sty
@@ -18,11 +18,11 @@
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}
-\RequirePackage{expl3}
+\RequirePackage{expl3,xparse}
\ProvidesExplPackage
{intopdf}
- {2018/03/15}
- {0.1.0}
+ {2019/05/28}
+ {0.2.1}
{Embed non-PDF files into PDF with hyperlink}
\RequirePackage{hyperref}
@@ -91,15 +91,15 @@
#3
\__intopdf_annot_end:
}
-\cs_new_protected:Nn\intopdf_attach_link:nnnn{
+\cs_new_protected:Nn\intopdf_attach_link:nnnnn{
\__intopdf_pdfstream_file:nn{
- /Subtype /\__intopdf_escape_name:n{#2}
- }{#1}
+ /Subtype /\__intopdf_escape_name:n{#3}
+ }{#2}
\__intopdf_pdfobj:n{
/Type /Filespec
/F \__intopdf_escape_string:n{#1}
/EF << /F \__intopdf_lastobj_ref: >>
- /Desc \__intopdf_escape_string:n{#3}
+ /Desc \__intopdf_escape_string:n{#4}
}%
\__intopdf_annot:nnn{
\Hy@setpdfborder
@@ -117,14 +117,17 @@
/FS \__intopdf_lastobj_ref:
/F\c_space_tl 416
/CA\c_space_tl 0
- /Contents \__intopdf_escape_string:n{#3}
+ /Contents \__intopdf_escape_string:n{#4}
}{
- #4
+ #5
}
}
}
-\cs_new_protected:Npn\attachandlink#1[#2]#3#4{
- \intopdf_attach_link:nnnn{#1}{#2}{#3}{#4}
+\cs_new_protected:Npn \intopdf_attach_link:nnnn #1{
+ \intopdf_attach_link:nnnnn{#1}{#1}
+}
+\NewDocumentCommand\attachandlink{O{#2}mr[]mm}{
+ \intopdf_attach_link:nnnnn{#1}{#2}{#3}{#4}{#5}
}
\endinput
%%