summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3backend/l3backend-pdf.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-03-13 03:02:35 +0000
committerNorbert Preining <norbert@preining.info>2020-03-13 03:02:35 +0000
commit7f2b2a9d664831db3f6dcb985d3a10212ce3b752 (patch)
tree5b5ca88ef53ca03a6e4d8232ae8964bf2001b053 /macros/latex/contrib/l3backend/l3backend-pdf.dtx
parentc4777604044f5d7ed37fd9e47edd58b44630a66d (diff)
CTAN sync 202003130302
Diffstat (limited to 'macros/latex/contrib/l3backend/l3backend-pdf.dtx')
-rw-r--r--macros/latex/contrib/l3backend/l3backend-pdf.dtx39
1 files changed, 14 insertions, 25 deletions
diff --git a/macros/latex/contrib/l3backend/l3backend-pdf.dtx b/macros/latex/contrib/l3backend/l3backend-pdf.dtx
index fbc9fcd198..14496bbc89 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-02-23}
+% \date{Released 2020-03-12}
%
% \maketitle
%
@@ -253,41 +253,30 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_backend_annotation:nnnn, \@@_backend_annotation_aux:nnnn}
-% \begin{macro}{pdf.llx, pdf.lly, pdf.urx, pdf.ury}
+% \begin{macro}{\@@_backend_annotation:nnnn}
% Annotations are objects, but we track them separately. Notably, they are
% not in the object data lists. Here, to get the co-ordinates of the
% annotation, we need to have the data collected at the PostScript level.
% That requires a bit of box trickery (effectively a \LaTeXe{} |picture|
% of zero size). Once the data is collected, use it to set up the annotation
-% border. There is a split into two parts here to allow an easy way of
-% applying the Adobe Reader fix.
+% border.
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_annotation:nnnn #1#2#3#4
{
- \@@_backend_annotation_aux:nnnn {#1} {#2} {#3} {#4}
- \int_gincr:N \g_@@_backend_object_int
- \int_gset_eq:NN \g_@@_backend_annotation_int \g_@@_backend_object_int
- \@@_backend_pdfmark:x
- {
-
- /_objdef { pdf.obj \int_use:N \g_@@_backend_object_int }
- pdf.rect ~
- #4 ~
- /ANN
- }
+ \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
{
\box_move_down:nn {#3}
{ \hbox:n { \__kernel_backend_postscript:n { pdf.save.ll } } }
- \hbox:n {#4}
\box_move_up:nn {#2}
{
\hbox:n
{
- \tex_kern:D \dim_eval:n {#1} \scan_stop:
+ \tex_kern:D #1 \scan_stop:
\__kernel_backend_postscript:n { pdf.save.ur }
+ \tex_kern:D -#1 \scan_stop:
}
}
\int_gincr:N \g_@@_backend_object_int
@@ -296,12 +285,12 @@
{
/_objdef { pdf.obj \int_use:N \g_@@_backend_object_int }
pdf.rect
+ #4 ~
/ANN
}
}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
% \begin{macro}[EXP]{\@@_backend_annotation_last:}
% Provide the last annotation we created: could get tricky of course if
@@ -616,7 +605,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_backend_destination:nn, \@@_backend_destination_rectangle:nn}
+% \begin{macro}{\@@_backend_destination:nn, \@@_backend_destination_box:nn}
% Here, we need to turn the zoom into a scale. We also need to know where
% the current anchor point actually is: worked out in PostScript. For the
% rectangle version, we have a bit more PostScript: we need two points.
@@ -646,7 +635,7 @@
/DEST
}
}
-\cs_new_protected:Npn \@@_backend_destination_rectangle:nn #1#2
+\cs_new_protected:Npn \@@_backend_destination_box:nn #1#2
{
\group_begin:
\hbox_set:Nn \l_@@_internal_box {#2}
@@ -814,7 +803,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_backend_destination:nn, \@@_backend_destination_rectangle:nn}
+% \begin{macro}{\@@_backend_destination:nn, \@@_backend_destination_box:nn}
% A simple task: pass the data to the primitive. The |\scan_stop:| deals
% with the danger of an unterminated keyword. The zoom given here is a
% percentage, but we need to pass it as \emph{per mille}. The rectangle
@@ -839,7 +828,7 @@
{ xyz ~ zoom \exp_not:N \fp_eval:n { #2 * 10 } }
\scan_stop:
}
-\cs_new_protected:Npx \@@_backend_destination_rectangle:nn #1#2
+\cs_new_protected:Npx \@@_backend_destination_box:nn #1#2
{
\group_begin:
\hbox_set:Nn \l_@@_internal_box {#2}
@@ -1365,7 +1354,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_backend_destination:nn, \@@_backend_destination_rectangle:nn}
+% \begin{macro}{\@@_backend_destination:nn, \@@_backend_destination_box:nn}
% Here, we need to turn the zoom into a scale. The method for \texttt{FitR}
% is from Alexander Grahn: the idea is to avoid needing to do any calculations
% in \TeX{} by using the backend data for \texttt{@xpos} and \texttt{@ypos}.
@@ -1391,7 +1380,7 @@
]
}
}
-\cs_new_protected:Npn \@@_backend_destination_rectangle:nn #1#2
+\cs_new_protected:Npn \@@_backend_destination_box:nn #1#2
{
\group_begin:
\hbox_set:Nn \l_@@_internal_box {#2}