summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3backend/l3backend-pdf.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-05-08 03:02:15 +0000
committerNorbert Preining <norbert@preining.info>2020-05-08 03:02:15 +0000
commit8b5866024fec68c13a91973cc6cfc2cb5697baba (patch)
tree6abad841dced763b6ee50ae5bb83fc50d8816ca1 /macros/latex/contrib/l3backend/l3backend-pdf.dtx
parent56bd1f5b8377f54b4af39a114362a7762d27f13c (diff)
CTAN sync 202005080302
Diffstat (limited to 'macros/latex/contrib/l3backend/l3backend-pdf.dtx')
-rw-r--r--macros/latex/contrib/l3backend/l3backend-pdf.dtx65
1 files changed, 60 insertions, 5 deletions
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}
%