[latex3-commits] [git/LaTeX3-latex3-latex3] master: Keep PostScript changes in SDict (135acc3)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Apr 11 16:42:30 CEST 2019


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

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

commit 135acc3b58b019ec9433f3d84223d924b172d5d7
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Apr 11 15:42:30 2019 +0100

    Keep PostScript changes in SDict


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

135acc3b58b019ec9433f3d84223d924b172d5d7
 l3kernel/l3drivers-basics.dtx |   11 +++++++++++
 l3kernel/l3drivers-color.dtx  |    2 +-
 l3kernel/l3drivers-draw.dtx   |    4 ++--
 l3kernel/l3drivers-pdf.dtx    |   19 +++++++++----------
 4 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/l3kernel/l3drivers-basics.dtx b/l3kernel/l3drivers-basics.dtx
index 616b34e..a0ee636 100644
--- a/l3kernel/l3drivers-basics.dtx
+++ b/l3kernel/l3drivers-basics.dtx
@@ -135,6 +135,17 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@@_postscript:n, \@@_postscript:x}
+%   PostScript data that does have positioning, and also applying
+%   a shift to |SDict| (which is not done automatically by
+%   |ps:| or |ps::|, in contrast to |!| or |"|).
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_postscript:n #1
+  { \@@_literal:n { ps: SDict ~ begin ~ #1 ~ end } }
+\cs_generate_variant:Nn \@@_postscript:n { x }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\@@_align_currentpoint_begin:, \@@_align_currentpoint_end:}
 %   In \texttt{dvips} there is no build-in saving of the current
 %   position, and so some additional PostScript is required to set up the
diff --git a/l3kernel/l3drivers-color.dtx b/l3kernel/l3drivers-color.dtx
index 9bd1664..66d13c0 100644
--- a/l3kernel/l3drivers-color.dtx
+++ b/l3kernel/l3drivers-color.dtx
@@ -143,7 +143,7 @@
   {
     \@@_literal:n { color~push~ #1 }
 %<*dvips>
-    \@@_literal_postscript:n { /driver.fc~{ }~def }
+    \@@_postscript:n { /driver.fc~{ }~def }
 %</dvips>
     \group_insert_after:N \@@_color_reset:
   }
diff --git a/l3kernel/l3drivers-draw.dtx b/l3kernel/l3drivers-draw.dtx
index 737aaa2..2d8e883 100644
--- a/l3kernel/l3drivers-draw.dtx
+++ b/l3kernel/l3drivers-draw.dtx
@@ -94,7 +94,7 @@
   {
     \@@_literal:n { ps::[begin] }
     \@@_draw_literal:n { @beginspecial }
-    \@@_draw_literal:n { /driver.fc~{ }~def }
+    \@@_darw_literal:n { SDict ~ begin ~ /driver.fc ~ { } ~ def ~ end }
   }
 \cs_new_protected:Npn \driver_draw_end:
   {
@@ -391,7 +391,7 @@
       { rgb ~ \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} }
   }
 \cs_new_protected:Npn \@@_draw_color_fill:n #1
-  { \@@_draw_literal:n { /driver.fc ~ { #1 } ~ def } }
+  { \@@_postscript:n { SDict ~ begin ~ /driver.fc ~ { #1 } ~ def ~ end } }
 \cs_generate_variant:Nn \@@_draw_color_fill:n { x }
 \cs_new_protected:Npn \@@_draw_color_stroke:n #1
   {
diff --git a/l3kernel/l3drivers-pdf.dtx b/l3kernel/l3drivers-pdf.dtx
index d3403d1..52325bb 100644
--- a/l3kernel/l3drivers-pdf.dtx
+++ b/l3kernel/l3drivers-pdf.dtx
@@ -107,7 +107,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \driver_pdf_object_write:nn #1#2
   {
-    \@@_literal_postscript:x
+    \@@_postscript:x
       {
         mark ~ /_objdef ~ \driver_pdf_object_ref:n {#1} ~
         /type
@@ -127,7 +127,7 @@
   }
 \cs_new_protected:Npn \@@_pdf_object_write_array:nn #1#2
   {
-    \@@_literal_postscript:x
+    \@@_postscript:x
       {
         mark ~ \driver_pdf_object_ref:n {#1} ~
           [ ~ \exp_not:n {#2} ~ ] ~ /PUTINTERVAL ~ pdfmark
@@ -135,7 +135,7 @@
   }
 \cs_new_protected:Npn \@@_pdf_object_write_dict:nn #1#2
   {
-    \@@_literal_postscript:x
+    \@@_postscript:x
       {
         mark ~ \driver_pdf_object_ref:n {#1} ~
           << ~ \exp_not:n {#2} ~ >> ~ /PUT ~ pdfmark
@@ -150,7 +150,7 @@
   }
 \cs_new_protected:Npn \@@_pdf_object_write_stream:nnn #1#2#3
   {
-    \@@_literal_postscript:n
+    \@@_postscript:n
       {
         [nobreak] ~
         mark ~ #1 ~ ( #3 ) ~ /PUT ~ pdfmark ~
@@ -201,9 +201,9 @@
             {
               \hbox_overlap_right:n
                 {
-                  \@@_literal:n
+                  \@@_postscript:n
                     {
-                      ps: currentpoint ~
+                      currentpoint ~
                       /driver.lly ~ exch ~ def ~
                       /driver.llx ~ exch ~ def
                     }
@@ -214,9 +214,9 @@
               \hbox_overlap_right:n
                 {
                   \tex_kern:D \dim_eval:n {#1} \scan_stop:
-                  \@@_literal:n
+                  \@@_postscript:n
                     {
-                      ps: currentpoint ~
+                      currentpoint ~
                       /driver.ury ~ exch ~ def ~
                       /driver.urx ~ exch ~ def
                     }
@@ -226,9 +226,8 @@
       \box_set_ht:Nn \l_@@_tmp_box { 0pt }
       \box_use_drop:N \l_@@_tmp_box
     \group_end:
-    \@@_literal:n
+    \@@_postscript:n
       {
-        ps:
           mark ~ /_objdef ~ { l3obj \int_use:N \g_@@_pdf_object_int }
           /Rect ~ [ driver.llx ~ driver.lly ~ driver.urx ~ driver.ury ]
           #4





More information about the latex3-commits mailing list