[latex3-commits] [git/LaTeX3-latex3-latex3] master: add fitr support to \@@_backend_destination:nn (89feb714d)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Jan 1 17:44:22 CET 2021


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

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

commit 89feb714d2e130aec39d4831176eaab2faf275f2
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Fri Jan 1 16:47:19 2021 +0100

    add fitr support to \@@_backend_destination:nn


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

89feb714d2e130aec39d4831176eaab2faf275f2
 l3backend/l3backend-pdf.dtx | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/l3backend/l3backend-pdf.dtx b/l3backend/l3backend-pdf.dtx
index da3280a7e..ec609350f 100644
--- a/l3backend/l3backend-pdf.dtx
+++ b/l3backend/l3backend-pdf.dtx
@@ -620,6 +620,7 @@
 %   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.
+%   fitr without rule spec doesn't work, so it falls back to /Fit here.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_backend_destination:nn #1#2
   {
@@ -637,6 +638,7 @@
               { fitbv } { /FitBV ~ pdf.dest.x }
               { fith }  { /FitH ~ pdf.dest.y }
               { fitv }  { /FitV ~ pdf.dest.x }
+              { fitr }  { /Fit }
             }
             {
               /XYZ ~ pdf.dest.point ~ \fp_eval:n { (#2) / 100 }
@@ -881,6 +883,7 @@
             { fitbv } { fitbv }
             { fith }  { fith }
             { fitv }  { fitv }
+            { fitr }  { fitr }
           }
           { xyz ~ zoom \fp_eval:n { #2 * 10 } }
         \scan_stop:
@@ -1476,6 +1479,7 @@
 %   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}.
+%   fitr without rule spec doesn't work, so it falls back to /Fit here.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_backend_destination:nn #1#2
   {
@@ -1493,6 +1497,7 @@
               { fitbv } { /FitBV ~ @xpos }
               { fith }  { /FitH ~ @ypos }
               { fitv }  { /FitV ~ @xpos }
+              { fitr }  { /Fit }
             }
             { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } }
         ]





More information about the latex3-commits mailing list.