[latex3-commits] [git/LaTeX3-latex3-latex3] master: PDF interfaces for objects (80fbaa2)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Jun 2 22:41:15 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/80fbaa25335539ae2207a3ee45648b8ba15be203

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

commit 80fbaa25335539ae2207a3ee45648b8ba15be203
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Jun 2 21:41:15 2019 +0100

    PDF interfaces for objects


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

80fbaa25335539ae2207a3ee45648b8ba15be203
 l3trial/l3pdf/l3pdf.dtx |   93 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)

diff --git a/l3trial/l3pdf/l3pdf.dtx b/l3trial/l3pdf/l3pdf.dtx
index 2d1a2b1..7688b25 100644
--- a/l3trial/l3pdf/l3pdf.dtx
+++ b/l3trial/l3pdf/l3pdf.dtx
@@ -54,6 +54,77 @@
 %
 % \section{\pkg{l3pdf} documentation}
 %
+% \subsection{Objects}
+%
+% \begin{function}[added = 2019-06-02]{\pdf_object_new:nn}
+%   \begin{syntax}
+%     \cs{pdf_object_new:nn} \Arg{object} \Arg{type}
+%   \end{syntax}
+%   Declares \meta{object} as a PDF object of \meta{type}, which should be
+%   one of
+%   \begin{itemize}
+%     \item \texttt{array}
+%     \item \texttt{dict}
+%     \item \texttt{fstream}
+%     \item \texttt{stream}
+%   \end{itemize}
+%   The object may be referenced from this point on, and written later
+%   using \cs{pdf_object_write:nn}.
+% \end{function}
+%
+% \begin{function}[added = 2019-06-02]
+%   {\pdf_object_write:nn, \pdf_object_write:nx}
+%   \begin{syntax}
+%     \cs{pdf_object_write:nn} \Arg{object} \Arg{content}
+%   \end{syntax}
+%   Writes the \meta{content} as content of the \meta{object}. Depending on the
+%   \meta{type} declared for the object, the format required for the
+%   \meta{data} will vary
+%   \begin{itemize}
+%     \item[\texttt{array}] A space-separated list of values
+%     \item[\texttt{dict}] Key--value pairs in the form
+%       \texttt{/\meta{key} \meta{value}}
+%     \item[\texttt{fstream}] Two brace groups: \meta{file name} and
+%       \meta{file content}
+%     \item[\texttt{stream}] Two brace groups: \meta{attributes (dictionary)}
+%       and \meta{steram contents}
+%   \end{itemize}
+% \end{function}
+%
+% \begin{function}[EXP, added = 2019-06-02]{\pdf_object_ref:n}
+%   \begin{syntax}
+%     \cs{pdf_object_ref:n} \Arg{object}
+%   \end{syntax}
+%   Inserts the appropriate information to reference the \meta{object}
+%   in for example page resource allocation
+% \end{function}
+%
+% \begin{function}[added = 2019-06-02]
+%   {\pdf_object_now:nn, \pdf_object_now:nx}
+%   \begin{syntax}
+%     \cs{pdf_object_write:nn} \Arg{type} \Arg{content}
+%   \end{syntax}
+%   Writes the \meta{content} as content of an anonymous obect. Depending on the
+%   \meta{type}, the format required for the \meta{data} will vary
+%   \begin{itemize}
+%     \item[\texttt{array}] A space-separated list of values
+%     \item[\texttt{dict}] Key--value pairs in the form
+%       \texttt{/\meta{key} \meta{value}}
+%     \item[\texttt{fstream}] Two brace groups: \meta{file name} and
+%       \meta{file content}
+%     \item[\texttt{stream}] Two brace groups: \meta{attributes (dictionary)}
+%       and \meta{steram contents}
+%   \end{itemize}
+% \end{function}
+%
+% \begin{function}[EXP, added = 2019-06-02]{\pdf_object_last:}
+%   \begin{syntax}
+%     \cs{pdf_object_last:}
+%   \end{syntax}
+%   Inserts the appropriate information to reference the last \meta{object}
+%   created. This is particularly useful for anonymous objects.
+% \end{function}
+%
 % \subsection{Version}
 %
 % \begin{function}[pTF, EXP, added = 2019-06-02]{\pdf_version_compare:Nn}
@@ -150,6 +221,28 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \subsection{Objects}
+%
+% \begin{macro}{\pdf_object_new:nn, \pdf_object_write:nn, \pdf_object_write:nx}
+% \begin{macro}{\pdf_object_ref:n}
+% \begin{macro}{\pdf_object_now:nn, \pdf_object_now:nx}
+% \begin{macro}{\pdf_object_last:}
+%   Simple to do.
+%    \begin{macrocode}
+\cs_new_protected:Npn \pdf_object_new:nn #1#2
+  { \@@_backend_object_new:nn {#1} {#2} }
+\cs_new_protected:Npn \pdf_object_write:nn #1#2
+  { \@@_backend_object_write:nn {#1} {#2} }
+\cs_generate_variant:Nn \pdf_object_write:nn { nx }\
+\cs_new:Npn \pdf_object_ref:n #1 { \@@_backend_object_ref:n {#1} }
+\cs_new_protected:Npn \pdf_object_now:nn #1#2
+  { \@@_backend_object_now:nn {#1} {#2} }
+\cs_generate_variant:Nn \pdf_object_now:nn { nx }\
+\cs_new:Npn \pdf_object_last: { \@@_backend_object_last: }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 % \subsection{Version}
 %
 % \begin{macro}{\pdf_version_compare:Nn}





More information about the latex3-commits mailing list