[latex3-commits] [git/LaTeX3-latex3-latex3] master: Rename a backend function (bf8bc438b)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Mar 11 09:17:33 CET 2020


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

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

commit bf8bc438b041d4f0a5dc83e5d43110f76a8ad031
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Mar 11 08:17:33 2020 +0000

    Rename a backend function


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

bf8bc438b041d4f0a5dc83e5d43110f76a8ad031
 l3backend/l3backend-pdf.dtx | 35 ++++++++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/l3backend/l3backend-pdf.dtx b/l3backend/l3backend-pdf.dtx
index 48aa35a20..c12edcf33 100644
--- a/l3backend/l3backend-pdf.dtx
+++ b/l3backend/l3backend-pdf.dtx
@@ -253,18 +253,35 @@
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{macro}{\@@_backend_annotation:nnnn}
+% \begin{macro}{\@@_backend_annotation:nnnn, \@@_backend_annotation_aux:nnnn}
+% \begin{macro}{pdf.llx, pdf.lly, pdf.urx, pdf.ury}
 %   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.
+%   border. There is a split into two parts here to allow an easy way of
+%   applying the Adobe Reader fix.
 %    \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
+      }
+  }
+\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
@@ -279,12 +296,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
@@ -599,7 +616,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.
@@ -629,7 +646,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}
@@ -797,7 +814,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
@@ -822,7 +839,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}
@@ -1348,7 +1365,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}.
@@ -1374,7 +1391,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}





More information about the latex3-commits mailing list.