[latex3-commits] [git/LaTeX3-latex3-latex3] master: PDF Catalogue support (2ba256c)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Apr 28 18:23:10 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/2ba256c01492691c68a7cd0d8339923fde6edd75

>---------------------------------------------------------------

commit 2ba256c01492691c68a7cd0d8339923fde6edd75
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Apr 28 17:23:10 2019 +0100

    PDF Catalogue support


>---------------------------------------------------------------

2ba256c01492691c68a7cd0d8339923fde6edd75
 l3kernel/l3drivers-pdf.dtx              |   20 ++++++++++++++++----
 l3kernel/l3drivers.dtx                  |   10 ++++++++++
 l3kernel/testfiles/m3expl001.luatex.tlg |    1 +
 l3kernel/testfiles/m3expl001.ptex.tlg   |    1 +
 l3kernel/testfiles/m3expl001.tlg        |    1 +
 l3kernel/testfiles/m3expl001.uptex.tlg  |    1 +
 l3kernel/testfiles/m3expl001.xetex.tlg  |    1 +
 l3kernel/testfiles/m3expl003.luatex.tlg |    1 +
 l3kernel/testfiles/m3expl003.ptex.tlg   |    1 +
 l3kernel/testfiles/m3expl003.tlg        |    1 +
 l3kernel/testfiles/m3expl003.uptex.tlg  |    1 +
 l3kernel/testfiles/m3expl003.xetex.tlg  |    1 +
 12 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/l3kernel/l3drivers-pdf.dtx b/l3kernel/l3drivers-pdf.dtx
index 12e6d7e..79e3841 100644
--- a/l3kernel/l3drivers-pdf.dtx
+++ b/l3kernel/l3drivers-pdf.dtx
@@ -100,8 +100,10 @@
 %
 % \subsubsection{Catalogue entries}
 %
-% \begin{macro}{\driver_pdf_info_gput:nn}
+% \begin{macro}{\driver_pdf_catalog_gput:nn, \driver_pdf_info_gput:nn}
 %    \begin{macrocode}
+\cs_new_protected:Npn \driver_pdf_catalog_gput:nn #1#2
+  { \@@_pdfmark:n { { Catalog } << /#1 ~ #2 >> /PUT } }
 \cs_new_protected:Npn \driver_pdf_info_gput:nn #1#2
   { \@@_pdfmark:n { /#1 ~ #2 /DOCINFO } }
 %    \end{macrocode}
@@ -1306,8 +1308,15 @@
 %
 % \subsubsection{Catalogue entries}
 %
-% \begin{macro}{\driver_pdf_info_gput:nn}
+% \begin{macro}{\driver_pdf_catalog_gput:nn, \driver_pdf_info_gput:nn}
 %    \begin{macrocode}
+\cs_new_protected:Npx \driver_pdf_catalog_gput:nn #1#2
+  {
+    \cs_if_exist:NTF \tex_pdfextension:D
+      { \tex_pdfextension:D catalog }
+      { \tex_pdfcatalog:D }
+        { / #1 ~ #2 }
+  }
 \cs_new_protected:Npx \driver_pdf_info_gput:nn #1#2
   {
     \cs_if_exist:NTF \tex_pdfextension:D
@@ -1511,8 +1520,10 @@
 %
 % \subsubsection{Catalogue entries}
 %
-% \begin{macro}{\driver_pdf_info_gput:nn}
+% \begin{macro}{\driver_pdf_catalog_gput:nn, \driver_pdf_info_gput:nn}
 %    \begin{macrocode}
+\cs_new_protected:Npn \driver_pdf_catalog_gput:nn #1#2
+  { \@@_pdf:n { put ~ @catalog << /#1 ~ #2 >> } }
 \cs_new_protected:Npn \driver_pdf_info_gput:nn #1#2
   { \@@_pdf:n { docinfo << /#1 ~ #2 >> } }
 %    \end{macrocode}
@@ -1811,9 +1822,10 @@
 %
 % \subsubsection{Catalogue entries}
 %
-% \begin{macro}{\driver_pdf_info_gput:nn}
+% \begin{macro}{\driver_pdf_catalog_gput:nn, \driver_pdf_info_gput:nn}
 %   No-op.
 %    \begin{macrocode}
+\cs_new_protected:Npn \driver_pdf_catalog_gput:nn #1#2 { }
 \cs_new_protected:Npn \driver_pdf_info_gput:nn #1#2 { }
 %    \end{macrocode}
 % \end{macro}
diff --git a/l3kernel/l3drivers.dtx b/l3kernel/l3drivers.dtx
index 9321b34..69931a9 100644
--- a/l3kernel/l3drivers.dtx
+++ b/l3kernel/l3drivers.dtx
@@ -562,6 +562,16 @@
 %
 % \subsection{PDF Catalogue entries}
 %
+% \begin{function}[added = 2019-04-28]{\driver_pdf_catalog_gput:nn}
+%   \begin{syntax}
+%     \cs{driver_pdf_catalog_gput:nn} \Arg{key} \Arg{value}
+%   \end{syntax}
+%   Adds the key--value pair to the PDF catalog. The \meta{key} should
+%   be given \emph{without} the leading |/|. The \meta{value} should be
+%   a \enquote{raw} PDF dictionary entry, including the |(|/|)| pair for
+%   a string, a leading |/| for a boolean, \emph{etc.}
+% \end{function}
+%
 % \begin{function}[added = 2019-04-28]{\driver_pdf_info_gput:nn}
 %   \begin{syntax}
 %     \cs{driver_pdf_info_gput:nn} \Arg{key} \Arg{value}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 3ed424d..90e6c04 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -6476,6 +6476,7 @@ Defining \driver_pdf_link_last: on line ...
 Defining \driver_pdf_link_margin:n on line ...
 Defining \driver_pdf_destination:nn on line ...
 Defining \driver_pdf_destination_rectangle:nn on line ...
+Defining \driver_pdf_catalog_gput:nn on line ...
 Defining \driver_pdf_info_gput:nn on line ...
 Defining \g__driver_pdf_object_prop on line ...
 Defining \driver_pdf_object_new:nn on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 5190a5f..d214e41 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -6509,6 +6509,7 @@ Defining \l__driver_pdf_tmp_box on line ...
 \l__driver_pdf_tmp_box=\box...
 Defining \__driver_pdf:n on line ...
 Defining \__driver_pdf:x on line ...
+Defining \driver_pdf_catalog_gput:nn on line ...
 Defining \driver_pdf_info_gput:nn on line ...
 Defining \g__driver_pdf_object_int on line ...
 \g__driver_pdf_object_int=\count...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 1a14dd5..94d0012 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -6817,6 +6817,7 @@ Defining \driver_pdf_link_last: on line ...
 Defining \driver_pdf_link_margin:n on line ...
 Defining \driver_pdf_destination:nn on line ...
 Defining \driver_pdf_destination_rectangle:nn on line ...
+Defining \driver_pdf_catalog_gput:nn on line ...
 Defining \driver_pdf_info_gput:nn on line ...
 Defining \g__driver_pdf_object_prop on line ...
 Defining \driver_pdf_object_new:nn on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index cf91f23..5ad1631 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -6806,6 +6806,7 @@ Defining \l__driver_pdf_tmp_box on line ...
 \l__driver_pdf_tmp_box=\box...
 Defining \__driver_pdf:n on line ...
 Defining \__driver_pdf:x on line ...
+Defining \driver_pdf_catalog_gput:nn on line ...
 Defining \driver_pdf_info_gput:nn on line ...
 Defining \g__driver_pdf_object_int on line ...
 \g__driver_pdf_object_int=\count...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index e378250..f04a0e4 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -6485,6 +6485,7 @@ Defining \l__driver_pdf_tmp_box on line ...
 \l__driver_pdf_tmp_box=\box...
 Defining \__driver_pdf:n on line ...
 Defining \__driver_pdf:x on line ...
+Defining \driver_pdf_catalog_gput:nn on line ...
 Defining \driver_pdf_info_gput:nn on line ...
 Defining \g__driver_pdf_object_int on line ...
 \g__driver_pdf_object_int=\count...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 3ed424d..90e6c04 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -6476,6 +6476,7 @@ Defining \driver_pdf_link_last: on line ...
 Defining \driver_pdf_link_margin:n on line ...
 Defining \driver_pdf_destination:nn on line ...
 Defining \driver_pdf_destination_rectangle:nn on line ...
+Defining \driver_pdf_catalog_gput:nn on line ...
 Defining \driver_pdf_info_gput:nn on line ...
 Defining \g__driver_pdf_object_prop on line ...
 Defining \driver_pdf_object_new:nn on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index 5190a5f..d214e41 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -6509,6 +6509,7 @@ Defining \l__driver_pdf_tmp_box on line ...
 \l__driver_pdf_tmp_box=\box...
 Defining \__driver_pdf:n on line ...
 Defining \__driver_pdf:x on line ...
+Defining \driver_pdf_catalog_gput:nn on line ...
 Defining \driver_pdf_info_gput:nn on line ...
 Defining \g__driver_pdf_object_int on line ...
 \g__driver_pdf_object_int=\count...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 1a14dd5..94d0012 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -6817,6 +6817,7 @@ Defining \driver_pdf_link_last: on line ...
 Defining \driver_pdf_link_margin:n on line ...
 Defining \driver_pdf_destination:nn on line ...
 Defining \driver_pdf_destination_rectangle:nn on line ...
+Defining \driver_pdf_catalog_gput:nn on line ...
 Defining \driver_pdf_info_gput:nn on line ...
 Defining \g__driver_pdf_object_prop on line ...
 Defining \driver_pdf_object_new:nn on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index cf91f23..5ad1631 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -6806,6 +6806,7 @@ Defining \l__driver_pdf_tmp_box on line ...
 \l__driver_pdf_tmp_box=\box...
 Defining \__driver_pdf:n on line ...
 Defining \__driver_pdf:x on line ...
+Defining \driver_pdf_catalog_gput:nn on line ...
 Defining \driver_pdf_info_gput:nn on line ...
 Defining \g__driver_pdf_object_int on line ...
 \g__driver_pdf_object_int=\count...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index e378250..f04a0e4 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -6485,6 +6485,7 @@ Defining \l__driver_pdf_tmp_box on line ...
 \l__driver_pdf_tmp_box=\box...
 Defining \__driver_pdf:n on line ...
 Defining \__driver_pdf:x on line ...
+Defining \driver_pdf_catalog_gput:nn on line ...
 Defining \driver_pdf_info_gput:nn on line ...
 Defining \g__driver_pdf_object_int on line ...
 \g__driver_pdf_object_int=\count...





More information about the latex3-commits mailing list