From 8b5866024fec68c13a91973cc6cfc2cb5697baba Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 8 May 2020 03:02:15 +0000 Subject: CTAN sync 202005080302 --- macros/latex/contrib/l3backend/l3backend-pdf.dtx | 65 ++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 5 deletions(-) (limited to 'macros/latex/contrib/l3backend/l3backend-pdf.dtx') diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx index 14496bbc89..95d1cc6530 100644 --- a/macros/latex/contrib/l3backend/l3backend-pdf.dtx +++ b/macros/latex/contrib/l3backend/l3backend-pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2020-03-12} +% \date{Released 2020-05-05} % % \maketitle % @@ -227,6 +227,14 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[EXP]{\@@_backend_pageobject_ref:n} +% Page references are easy in \texttt{dvips}. +% \begin{macrocode} +\cs_new:Npn \@@_backend_pageobject_ref:n #1 + { { Page #1 } } +% \end{macrocode} +% \end{macro} +% % \subsubsection{Annotations} % % In \texttt{dvips}, annotations have to be constructed manually. As such, @@ -263,7 +271,7 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_backend_annotation:nnnn #1#2#3#4 { - \exp_args:Nf \@@_backend_annotation_aux:nnnn + \exp_args:Nf \@@_backend_annotation_aux:nnnn { \dim_eval:n {#1} } {#2} {#3} {#4} } \cs_new_protected:Npn \@@_backend_annotation_aux:nnnn #1#2#3#4 @@ -666,10 +674,32 @@ % % \begin{macro}{\@@_backend_compresslevel:n} % \begin{macro}{\@@_backend_compress_objects:n} -% These are all no-ops. +% Doable for the usual \texttt{ps2pdf} method. % \begin{macrocode} -\cs_new_protected:Npn \@@_backend_compresslevel:n #1 { } -\cs_new_protected:Npn \@@_backend_compress_objects:n #1 { } +\cs_new_protected:Npn \@@_backend_compresslevel:n #1 + { + \int_compare:nNnT {#1} = 0 + { + \__kernel_backend_literal_postscript:n + { + /setdistillerparams ~ where + { pop << /CompressPages ~ false >> setdistillerparams } + if + } + } + } +\cs_new_protected:Npn \@@_backend_compress_objects:n #1 + { + \bool_if:nF {#1} + { + \__kernel_backend_literal_postscript:n + { + /setdistillerparams ~ where + { pop << /CompressStreams ~ false >> setdistillerparams } + if + } + } + } % \end{macrocode} % \end{macro} % \end{macro} @@ -998,6 +1028,20 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[EXP]{\@@_backend_pageobject_ref:n} +% The usual wrapper situation. +% \begin{macrocode} +\cs_new:Npx \@@_backend_pageobject_ref:n #1 + { + \exp_not:N \int_value:w + \cs_if_exist:NTF \tex_pdffeedback:D + { \exp_not:N \tex_pdffeedback:D pageref } + { \exp_not:N \tex_pdfpageref:D } + \c_space_tl #1 \c_space_tl \c_space_tl \c_space_tl 0 ~ R + } +% \end{macrocode} +% \end{macro} +% % \subsubsection{Structure} % % \begin{macro}{\@@_backend_compresslevel:n} @@ -1240,6 +1284,14 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[EXP]{\@@_backend_pageobject_ref:n} +% Page references are easy in \texttt{(x)dvipdfmx}. +% \begin{macrocode} +\cs_new:Npn \@@_backend_pageobject_ref:n #1 + { @page #1 } +% \end{macrocode} +% \end{macro} +% % \subsubsection{Annotations} % % \begin{variable}{\g_@@_landscape_bool} @@ -1498,6 +1550,7 @@ % \begin{macro}{\@@_backend_object_write:nn, , \@@_backend_object_write:nx} % \begin{macro}{\@@_backend_object_now:nn, , \@@_backend_object_now:nx} % \begin{macro}{\@@_backend_object_last:} +% \begin{macro}[EXP]{\@@_backend_pageobject_ref:n} % All no-ops here. % \begin{macrocode} \cs_new_protected:Npn \@@_backend_object_new:nn #1#2 { } @@ -1507,12 +1560,14 @@ \cs_new_protected:Npn \@@_backend_object_now:nn #1#2 { } \cs_new_protected:Npn \@@_backend_object_now:nx #1#2 { } \cs_new:Npn \@@_backend_object_last: { } +\cs_new:Npn \@@_backend_pageobject_ref:n #1 { } % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} % \end{macro} % \end{macro} +% \end{macro} % % \subsubsection{Structure} % -- cgit v1.2.3