[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: Update l3backend to 2020-08-07 (adf0029e)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Aug 7 13:03:50 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/adf0029e4a4b3ee5afd865b8cd6aa158b6356c9b

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

commit adf0029e4a4b3ee5afd865b8cd6aa158b6356c9b
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Aug 7 12:03:50 2020 +0100

    Update l3backend to 2020-08-07


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

adf0029e4a4b3ee5afd865b8cd6aa158b6356c9b
 texmf/dvips/l3backend/l3backend-dvips.pro         |   5 +-
 texmf/tex/latex/l3backend/l3backend-dvipdfmx.def  |  89 ++++----
 texmf/tex/latex/l3backend/l3backend-dvips.def     |  92 ++++-----
 texmf/tex/latex/l3backend/l3backend-dvisvgm.def   | 241 +++++++++++-----------
 texmf/tex/latex/l3backend/l3backend-pdfmode.def   | 103 ++++-----
 texmf/tex/latex/l3backend/l3backend-xdvipdfmx.def |  89 ++++----
 6 files changed, 298 insertions(+), 321 deletions(-)

diff --git a/texmf/dvips/l3backend/l3backend-dvips.pro b/texmf/dvips/l3backend/l3backend-dvips.pro
index ac097642..dda632be 100644
--- a/texmf/dvips/l3backend/l3backend-dvips.pro
+++ b/texmf/dvips/l3backend/l3backend-dvips.pro
@@ -19,10 +19,11 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: l3backend-header.dtx
+/color.sc { } def
+/color.fc { } def
 true setglobal
 /pdf.globaldict 4 dict def
 false setglobal
-
 /pdf.cvs { 65534 string cvs } def
 /pdf.dvi.pt { 72.27 mul Resolution div } def
 /pdf.pt.dvi { 72.27 div Resolution mul } def
@@ -221,7 +222,7 @@ false setglobal
         /x
           {
             0 exch rmoveto
-            SDict~
+            SDict
             begin
             currentpoint
             pdf.originy ne exch pdf.originx ne or
diff --git a/texmf/tex/latex/l3backend/l3backend-dvipdfmx.def b/texmf/tex/latex/l3backend/l3backend-dvipdfmx.def
index 8f5e5c40..f03b3c7b 100644
--- a/texmf/tex/latex/l3backend/l3backend-dvipdfmx.def
+++ b/texmf/tex/latex/l3backend/l3backend-dvipdfmx.def
@@ -25,7 +25,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-dvipdfmx.def}{2020-06-18}{}
+  {l3backend-dvipdfmx.def}{2020-08-07}{}
   {L3 backend support: dvipdfmx}
 \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
 \cs_new_protected:Npn \__kernel_backend_literal:n #1
@@ -42,37 +42,32 @@
   { \__kernel_backend_literal:n { x:grestore } }
 %% File: l3backend-color.dtx
 \cs_new_protected:Npn \__color_backend_pickup:N #1 { }
-\AtBeginDocument
+\cs_if_exist:cT { ver at color.sty }
   {
-    \cs_if_exist:cT { ver at color.sty }
+     \cs_set_protected:Npn \__color_backend_pickup:N #1
       {
-        \cs_set_protected:Npn \__color_backend_pickup:N #1
+        \exp_args:NV \tl_if_head_is_space:nTF \current at color
           {
-            \exp_args:NV \tl_if_head_is_space:nTF \current at color
-              {
-                \tl_set:Nx #1
-                   {
-                     { spot }
-                     { \exp_after:wN \use:n \current at color \c_space_tl 1 }
-                   }
-              }
-              {
-                \exp_last_unbraced:Nx \__color_backend_pickup:w
-                  { \current at color } \s__color_stop #1
-              }
+            \tl_set:Nx #1
+               {
+                 { \exp_after:wN \use:n \current at color }
+                 { 1 }
+               }
+          }
+          {
+            \exp_last_unbraced:Nx \__color_backend_pickup:w
+              { \current at color } \s__color_stop #1
           }
-        \cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
-          { \tl_set:Nn #3 { {#1} {#2} } }
       }
+    \cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
+      { \tl_set:Nn #3 { {#1} {#2} } }
   }
-\cs_new_protected:Npn \__color_backend_cmyk:n #1
+\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
   { \__color_backend_select:n { cmyk ~ #1 } }
-\cs_new_protected:Npn \__color_backend_gray:n #1
+\cs_new_protected:Npn \__color_backend_select_gray:n #1
   { \__color_backend_select:n { gray ~ #1 } }
-\cs_new_protected:Npn \__color_backend_rgb:n #1
+\cs_new_protected:Npn \__color_backend_select_rgb:n #1
   { \__color_backend_select:n { rgb ~ #1 } }
-\cs_new_protected:Npn \__color_backend_spot:n #1
-  { \__color_backend_select:n {#1} }
 \cs_new_protected:Npn \__color_backend_select:n #1
   {
     \__kernel_backend_literal:n { color~push~ #1 }
@@ -80,6 +75,24 @@
   }
 \cs_new_protected:Npn \__color_backend_reset:
   { \__kernel_backend_literal:n { color~pop } }
+\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
+  { \__color_backend_select:n {#1} }
+\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ k } }
+\cs_new_protected:Npn \__color_backend_fill_gray:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ g } }
+\cs_new_protected:Npn \__color_backend_fill_rgb:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ rg } }
+  \cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ K } }
+\cs_new_protected:Npn \__color_backend_stroke_gray:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ G } }
+\cs_new_protected:Npn \__color_backend_stroke_rgb:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ RG } }
+\cs_new_protected:Npn \__color_backend_fill_separation:nn #1#2
+  { \__kernel_backend_literal_pdf:n { /#1 ~ cs ~ #2 ~ scn } }
+\cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2
+  { \__kernel_backend_literal_pdf:n { /#1 ~ CS ~ #2 ~ SCN } }
 %% File: l3backend-box.dtx
 \cs_new_protected:Npn \__box_backend_clip:N #1
   {
@@ -221,20 +234,6 @@
   { \__draw_backend_literal:n { 1 ~ j } }
 \cs_new_protected:Npn \__draw_backend_join_bevel:
   { \__draw_backend_literal:n { 2 ~ j } }
-\cs_new_protected:Npn \__draw_backend_color_fill_cmyk:n #1
-  { \__draw_backend_color_select:n { #1 ~ k } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:n #1
-  { \__draw_backend_color_select:n { #1 ~ K } }
-\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1
-  { \__draw_backend_color_select:n { #1 ~ g } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1
-  { \__draw_backend_color_select:n { #1 ~ G } }
-\cs_new_protected:Npn \__draw_backend_color_fill_rgb:n #1
-  { \__draw_backend_color_select:n { #1 ~ rg } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:n #1
-  { \__draw_backend_color_select:n { #1 ~ RG } }
-\cs_new_eq:NN \__draw_backend_color_select:n \__kernel_backend_literal_pdf:n
-\cs_generate_variant:Nn \__draw_backend_color_select:n { x }
 \cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4
   {
     \__draw_backend_cm_decompose:nnnnN {#1} {#2} {#3} {#4}
@@ -315,8 +314,7 @@
     \__kernel_backend_scope_end:
   }
 %% File: l3backend-graphics.dtx
-\AtBeginDocument
-  { \cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n }
+\cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n
 \cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1
   {
     \int_zero:N \l_graphics_page_int
@@ -472,15 +470,12 @@
 \cs_new:Npn \__pdf_backend_pageobject_ref:n #1
   { @page #1 }
 \bool_new:N \g__pdf_landscape_bool
-\AtBeginDocument
+\cs_if_exist:NT \landscape
   {
-    \cs_if_exist:NT \landscape
-      {
-        \tl_put_right:Nn \landscape
-          { \bool_gset_true:N \g__pdf_landscape_bool }
-        \tl_put_left:Nn \endlandscape
-          { \bool_gset_false:N \g__pdf_landscape_bool }
-      }
+    \tl_put_right:Nn \landscape
+      { \bool_gset_true:N \g__pdf_landscape_bool }
+    \tl_put_left:Nn \endlandscape
+      { \bool_gset_false:N \g__pdf_landscape_bool }
   }
 \int_new:N \g__pdf_backend_annotation_int
 \cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4
diff --git a/texmf/tex/latex/l3backend/l3backend-dvips.def b/texmf/tex/latex/l3backend/l3backend-dvips.def
index bf161ed1..1a638ce9 100644
--- a/texmf/tex/latex/l3backend/l3backend-dvips.def
+++ b/texmf/tex/latex/l3backend/l3backend-dvips.def
@@ -25,7 +25,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-dvips.def}{2020-06-18}{}
+  {l3backend-dvips.def}{2020-08-07}{}
   {L3 backend support: dvips}
 \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
 \cs_new_protected:Npn \__kernel_backend_literal:n #1
@@ -63,45 +63,59 @@
   { \__kernel_backend_literal:n { ps:grestore } }
 %% File: l3backend-color.dtx
 \cs_new_protected:Npn \__color_backend_pickup:N #1 { }
-\AtBeginDocument
+\cs_if_exist:cT { ver at color.sty }
   {
-    \cs_if_exist:cT { ver at color.sty }
+     \cs_set_protected:Npn \__color_backend_pickup:N #1
       {
-        \cs_set_protected:Npn \__color_backend_pickup:N #1
+        \exp_args:NV \tl_if_head_is_space:nTF \current at color
           {
-            \exp_args:NV \tl_if_head_is_space:nTF \current at color
-              {
-                \tl_set:Nx #1
-                   {
-                     { spot }
-                     { \exp_after:wN \use:n \current at color \c_space_tl 1 }
-                   }
-              }
-              {
-                \exp_last_unbraced:Nx \__color_backend_pickup:w
-                  { \current at color } \s__color_stop #1
-              }
+            \tl_set:Nx #1
+               {
+                 { \exp_after:wN \use:n \current at color }
+                 { 1 }
+               }
+          }
+          {
+            \exp_last_unbraced:Nx \__color_backend_pickup:w
+              { \current at color } \s__color_stop #1
           }
-        \cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
-          { \tl_set:Nn #3 { {#1} {#2} } }
       }
+    \cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
+      { \tl_set:Nn #3 { {#1} {#2} } }
   }
-\cs_new_protected:Npn \__color_backend_cmyk:n #1
+\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
   { \__color_backend_select:n { cmyk ~ #1 } }
-\cs_new_protected:Npn \__color_backend_gray:n #1
+\cs_new_protected:Npn \__color_backend_select_gray:n #1
   { \__color_backend_select:n { gray ~ #1 } }
-\cs_new_protected:Npn \__color_backend_rgb:n #1
+\cs_new_protected:Npn \__color_backend_select_rgb:n #1
   { \__color_backend_select:n { rgb ~ #1 } }
-\cs_new_protected:Npn \__color_backend_spot:n #1
-  { \__color_backend_select:n {#1} }
 \cs_new_protected:Npn \__color_backend_select:n #1
   {
     \__kernel_backend_literal:n { color~push~ #1 }
-    \__kernel_backend_postscript:n { /color.fc~{ }~def }
+    \__kernel_backend_postscript:n { /color.sc~ { ~ } ~def }
+    \__kernel_backend_postscript:n { /color.fc~ { ~ } ~def }
     \group_insert_after:N \__color_backend_reset:
   }
 \cs_new_protected:Npn \__color_backend_reset:
   { \__kernel_backend_literal:n { color~pop } }
+\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
+  { \__color_backend_select:n {#1} }
+\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
+  { \__kernel_backend_postscript:n { /color.fc { #1 ~ setcmykcolor } def } }
+\cs_new_protected:Npn \__color_backend_fill_gray:n #1
+  { \__kernel_backend_postscript:n { /color.fc { #1 ~ setgray } def } }
+\cs_new_protected:Npn \__color_backend_fill_rgb:n #1
+  { \__kernel_backend_postscript:n { /color.fc { #1 ~ setrgbcolor } def } }
+  \cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1
+  { \__kernel_backend_postscript:n { /color.sc { #1 ~ setcmykcolor } def } }
+\cs_new_protected:Npn \__color_backend_stroke_gray:n #1
+  { \__kernel_backend_postscript:n { /color.sc { #1 ~ setgray } def } }
+\cs_new_protected:Npn \__color_backend_stroke_rgb:n #1
+  { \__kernel_backend_postscript:n { /color.sc { #1 ~ setrgbcolor } def } }
+\cs_new_protected:Npn \__color_backend_fill_separation:nn #1#2
+  { \__kernel_backend_postscript:n { /color.fc { #1 } def } }
+\cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2
+  { \__kernel_backend_postscript:n { /color.sc { #1 } def } }
 %% File: l3backend-box.dtx
 \cs_new_protected:Npn \__box_backend_clip:N #1
   {
@@ -163,7 +177,6 @@
   {
     \__kernel_backend_literal:n { ps::[begin] }
     \__draw_backend_literal:n { @beginspecial }
-    \__draw_backend_literal:n { SDict ~ begin ~ /color.fc ~ { } ~ def ~ end }
   }
 \cs_new_protected:Npn \__draw_backend_end:
   {
@@ -218,7 +231,10 @@
   { \__draw_backend_literal:n { closepath } }
 \cs_new_protected:Npn \__draw_backend_stroke:
   {
+    \__draw_backend_literal:n { gsave }
+    \__draw_backend_literal:n { color.sc }
     \__draw_backend_literal:n { stroke }
+    \__draw_backend_literal:n { grestore }
     \bool_if:NT \g__draw_draw_clip_bool
       {
         \__draw_backend_literal:x
@@ -259,6 +275,7 @@
 \cs_new_protected:Npn \__draw_backend_fillstroke:
   {
     \__draw_backend_literal:n { gsave }
+    \__draw_backend_literal:n { color.sc }
     \__draw_backend_literal:n { color.fc }
     \__draw_backend_literal:x
       {
@@ -326,28 +343,6 @@
   { \__draw_backend_literal:n { 1 ~ setlinejoin } }
 \cs_new_protected:Npn \__draw_backend_join_bevel:
   { \__draw_backend_literal:n { 2 ~ setlinejoin } }
-\cs_new_protected:Npn \__draw_backend_color_fill_cmyk:n #1
-  { \__draw_backend_color_fill:n { #1 ~ setcmykcolor } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:n #1
-  { \__draw_backend_color_stroke:n { cmyk ~ #1 } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1
-  { \__draw_backend_color_fill:n { #1 ~ setgray } }
-\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1
-  { \__draw_backend_color_stroke:n { gray ~ #1 } }
-\cs_new_protected:Npn \__draw_backend_color_fill_rgb:n #1
-  { \__draw_backend_color_fill:n { #1 ~ setrgbcolor } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:n #1
-  { \__draw_backend_color_stroke:n { rgb ~ #1 } }
-\cs_new_protected:Npn \__draw_backend_color_fill:n #1
-  {
-    \__kernel_backend_postscript:n
-      { /color.fc ~ { #1 } ~ def }
-  }
-\cs_new_protected:Npn \__draw_backend_color_stroke:n #1
-  {
-    \__kernel_backend_literal:n { color~push~#1 }
-    \group_insert_after:N \__draw_color_reset:
-  }
 \cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4
   {
     \__draw_backend_literal:n
@@ -374,8 +369,7 @@
     \__draw_backend_literal:n { @beginspecial }
   }
 %% File: l3backend-graphics.dtx
-\AtBeginDocument
-  { \cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n }
+\cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n
 \cs_new_protected:Npn \__graphics_backend_include_eps:n #1
   {
     \__kernel_backend_literal:x
diff --git a/texmf/tex/latex/l3backend/l3backend-dvisvgm.def b/texmf/tex/latex/l3backend/l3backend-dvisvgm.def
index a8c31ce3..007c597b 100644
--- a/texmf/tex/latex/l3backend/l3backend-dvisvgm.def
+++ b/texmf/tex/latex/l3backend/l3backend-dvisvgm.def
@@ -25,7 +25,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-dvisvgm.def}{2020-06-18}{}
+  {l3backend-dvisvgm.def}{2020-08-07}{}
   {L3 backend support: dvisvgm}
 \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
 \cs_new_protected:Npn \__kernel_backend_literal:n #1
@@ -34,46 +34,71 @@
 \cs_new_protected:Npn \__kernel_backend_literal_svg:n #1
   { \__kernel_backend_literal:n { dvisvgm:raw~ #1 { ?nl } } }
 \cs_generate_variant:Nn \__kernel_backend_literal_svg:n { x }
+\int_new:N \g__kernel_backend_scope_int
+\int_new:N \l__kernel_backend_scope_int
 \cs_new_protected:Npn \__kernel_backend_scope_begin:
-  { \__kernel_backend_literal_svg:n { <g> } }
+  {
+    \__kernel_backend_literal_svg:n { <g> }
+    \int_set_eq:NN
+      \l__kernel_backend_scope_int
+      \g__kernel_backend_scope_int
+    \group_begin:
+      \int_gset:Nn \g__kernel_backend_scope_int { 1 }
+  }
 \cs_new_protected:Npn \__kernel_backend_scope_end:
-  { \__kernel_backend_literal_svg:n { </g> } }
+  {
+      \prg_replicate:nn
+        { \g__kernel_backend_scope_int }
+        { \__kernel_backend_literal_svg:n { </g> } }
+    \group_end:
+    \int_gset_eq:NN
+      \g__kernel_backend_scope_int
+      \l__kernel_backend_scope_int
+  }
 \cs_new_protected:Npn \__kernel_backend_scope_begin:n #1
-  { \__kernel_backend_literal_svg:n { <g~ #1 > } }
+  {
+    \__kernel_backend_literal_svg:n { <g ~ #1 > }
+    \int_set_eq:NN
+      \l__kernel_backend_scope_int
+      \g__kernel_backend_scope_int
+    \group_begin:
+      \int_gset:Nn \g__kernel_backend_scope_int { 1 }
+  }
 \cs_generate_variant:Nn \__kernel_backend_scope_begin:n { x }
+\cs_new_protected:Npn \__kernel_backend_scope:n #1
+  {
+    \__kernel_backend_literal_svg:n { <g ~ #1 > }
+    \int_gincr:N \g__kernel_backend_scope_int
+  }
+\cs_generate_variant:Nn \__kernel_backend_scope:n { x }
 %% File: l3backend-color.dtx
 \cs_new_protected:Npn \__color_backend_pickup:N #1 { }
-\AtBeginDocument
+\cs_if_exist:cT { ver at color.sty }
   {
-    \cs_if_exist:cT { ver at color.sty }
+     \cs_set_protected:Npn \__color_backend_pickup:N #1
       {
-        \cs_set_protected:Npn \__color_backend_pickup:N #1
+        \exp_args:NV \tl_if_head_is_space:nTF \current at color
           {
-            \exp_args:NV \tl_if_head_is_space:nTF \current at color
-              {
-                \tl_set:Nx #1
-                   {
-                     { spot }
-                     { \exp_after:wN \use:n \current at color \c_space_tl 1 }
-                   }
-              }
-              {
-                \exp_last_unbraced:Nx \__color_backend_pickup:w
-                  { \current at color } \s__color_stop #1
-              }
+            \tl_set:Nx #1
+               {
+                 { \exp_after:wN \use:n \current at color }
+                 { 1 }
+               }
+          }
+          {
+            \exp_last_unbraced:Nx \__color_backend_pickup:w
+              { \current at color } \s__color_stop #1
           }
-        \cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
-          { \tl_set:Nn #3 { {#1} {#2} } }
       }
+    \cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
+      { \tl_set:Nn #3 { {#1} {#2} } }
   }
-\cs_new_protected:Npn \__color_backend_cmyk:n #1
+\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
   { \__color_backend_select:n { cmyk ~ #1 } }
-\cs_new_protected:Npn \__color_backend_gray:n #1
+\cs_new_protected:Npn \__color_backend_select_gray:n #1
   { \__color_backend_select:n { gray ~ #1 } }
-\cs_new_protected:Npn \__color_backend_rgb:n #1
+\cs_new_protected:Npn \__color_backend_select_rgb:n #1
   { \__color_backend_select:n { rgb ~ #1 } }
-\cs_new_protected:Npn \__color_backend_spot:n #1
-  { \__color_backend_select:n {#1} }
 \cs_new_protected:Npn \__color_backend_select:n #1
   {
     \__kernel_backend_literal:n { color~push~ #1 }
@@ -81,6 +106,74 @@
   }
 \cs_new_protected:Npn \__color_backend_reset:
   { \__kernel_backend_literal:n { color~pop } }
+\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
+  { \__color_backend_select:n {#1} }
+\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
+  { \__color_backend_cmyk:nw { fill } #1 \s__color_stop }
+\cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1
+  { \__color_backend_cmyk:nw { stroke } #1 \s__color_stop }
+\cs_new_protected:Npn \__color_backend_cmyk:nw
+  #1#2 ~ #3 ~ #4 ~ #5 \s__color_stop
+  {
+    \use:x
+      {
+        \__color_backend:nnnn
+          {#1}
+          { \fp_eval:n { -100 * ( 1 - min ( 1 , #2 + #5 ) ) } }
+          { \fp_eval:n { -100 * ( 1 - min ( 1 , #3 + #5 ) ) } }
+          { \fp_eval:n { -100 * ( 1 - min ( 1 , #4 + #5 ) ) } }
+      }
+  }
+\cs_new_protected:Npn \__color_backend_fill_gray:n #1
+  { \__color_backend_grab:nn { fill } {#1} }
+\cs_new_protected:Npn \__color_backend_stroke_gray:n #1
+  { \__color_backend_grab:nn { stroke } {#1} }
+\cs_new_protected:Npn \__color_backend_gray:nn #1#2
+  {
+    \use:x
+      {
+        \__color_backend_gray_aux:nn
+          {#1}
+          { \fp_eval:n { 100 * (#2) } }
+      }
+  }
+\cs_new_protected:Npn \__color_backend_gray_aux:nn #1#2
+  { \__color_backend:nnn {#1} {#2} {#2} {#2} }
+\cs_new_protected:Npn \__color_backend_fill_rgb:n #1
+  { \__color_backend_rgb:nw { fill } #1 \s__color_stop }
+\cs_new_protected:Npn \__color_backend_stroke_rgb:n #1
+  { \__color_backend_rgb:nw { stroke } #1 \s__color_stop }
+\cs_new_protected:Npn \__color_backend_rgb:nw
+  #1#2 ~ #3 ~ #4\s__color_stop
+  {
+    \use:x
+      {
+        \__color_backend:nnnn
+          { fill }
+          { \fp_eval:n { 100 * (#2) } }
+          { \fp_eval:n { 100 * (#3) } }
+          { \fp_eval:n { 100 * (#4) } }
+      }
+  }
+\cs_new_protected:Npx \__color_backend:nnnn #1#2#3#4
+  {
+    \__kernel_backend_scope:n
+      {
+        #1 =
+         "
+           rgb
+             (
+               #2 \c_percent_str ,
+               #3 \c_percent_str ,
+               #4 \c_percent_str
+             )
+         "
+      }
+  }
+\cs_new_protected:Npn \__color_backend_fill_separation:nn #1#2
+  { }
+\cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2
+  { }
 %% File: l3backend-box.dtx
 \cs_new_protected:Npn \__box_backend_clip:N #1
   {
@@ -114,12 +207,12 @@
             scale ( 1 , -1 )
           "
       }
-    \__kernel_backend_scope_begin:x
+    \__kernel_backend_scope:x
       {
         clip-path =
           "url ( \c_hash_str l3cp \int_use:N \g__box_clip_path_int ) "
       }
-    \__kernel_backend_scope_begin:n
+    \__kernel_backend_scope:n
       {
         transform =
           "
@@ -130,8 +223,6 @@
       }
     \box_use:N #1
     \__kernel_backend_scope_end:
-    \__kernel_backend_scope_end:
-    \__kernel_backend_scope_end:
   }
 \int_new:N \g__box_clip_path_int
 \cs_new_protected:Npn \__box_backend_rotate:Nn #1#2
@@ -171,37 +262,10 @@
 \cs_generate_variant:Nn \__draw_backend_literal:n { x }
 \cs_new_protected:Npn \__draw_backend_begin:
   {
-    \__draw_backend_scope_begin:
-    \__draw_backend_scope:n { transform="translate({?x},{?y})~scale(1,-1)" }
-  }
-\cs_new_protected:Npn \__draw_backend_end:
-  { \__draw_backend_scope_end: }
-\cs_new_protected:Npn \__draw_backend_scope_begin:
-  {
-    \int_set_eq:NN
-      \l__draw_draw_scope_int
-      \g__draw_draw_scope_int
-    \group_begin:
-      \int_gzero:N \g__draw_draw_scope_int
-  }
-\cs_new_protected:Npn \__draw_backend_scope_end:
-  {
-      \prg_replicate:nn
-        { \g__draw_draw_scope_int }
-        { \__draw_backend_literal:n { </g> } }
-    \group_end:
-    \int_gset_eq:NN
-      \g__draw_draw_scope_int
-      \l__draw_draw_scope_int
-  }
-\cs_new_protected:Npn \__draw_backend_scope:n #1
-  {
-    \__draw_backend_literal:n { <g~ #1 > }
-    \int_gincr:N \g__draw_draw_scope_int
+    \__kernel_backend_scope_begin:
+    \__kernel_backend_scope:n { transform="translate({?x},{?y})~scale(1,-1)" }
   }
-\cs_generate_variant:Nn \__draw_backend_scope:n { x }
-\int_new:N \g__draw_draw_scope_int
-\int_new:N \l__draw_draw_scope_int
+\cs_new_eq:NN \__draw_backend_end: \__kernel_backend_scope_end:
 \cs_new_protected:Npn \__draw_backend_moveto:nn #1#2
   {
     \__draw_backend_add_to_path:n
@@ -355,60 +419,6 @@
   { \__draw_backend_scope:n { stroke-linejoin="round" } }
 \cs_new_protected:Npn \__draw_backend_join_bevel:
   { \__draw_backend_scope:n { stroke-linejoin="bevel" } }
-\cs_new_protected:Npn \__draw_backend_color_fill_cmyk:n #1
-  { \__draw_backend_color_fill_cmyk:w #1 \s__draw_stop }
-\cs_new_protected:Npn \__draw_backend_color_fill_cmyk:w
-  #1 ~ #2 ~ #3 ~ #4 \s__draw_stop
-  {
-    \use:x
-      {
-        \__draw_backend_color_fill:nnn
-          { \fp_eval:n { -100 * ( 1 - min ( 1 , #1 + #4 ) ) } }
-          { \fp_eval:n { -100 * ( 1 - min ( 1 , #2 + #4 ) ) } }
-          { \fp_eval:n { -100 * ( 1 - min ( 1 , #3 + #4 ) ) } }
-      }
-  }
-\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:n #1
-  { \__draw_backend_select:n { cmyk ~ #1 } }
-\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1
-  {
-    \use:x
-      {
-        \__draw_backend_color_gray_aux:n
-          { \fp_eval:n { 100 * (#1) } }
-      }
-  }
-\cs_new_protected:Npn \__draw_backend_color_gray_aux:n #1
-  { \__draw_backend_color_fill:nnn {#1} {#1} {#1} }
-\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1
-  { \__draw_backend_select:x { gray~ \fp_eval:n {#1} } }
-\cs_new_protected:Npn \__draw_backend_color_fill_rgb:n #1
-  {
-    \use:x
-      {
-        \__draw_backend_color_fill:nnn
-          { \fp_eval:n { 100 * (#1) } }
-          { \fp_eval:n { 100 * (#2) } }
-          { \fp_eval:n { 100 * (#3) } }
-      }
-  }
-\cs_new_protected:Npn \__draw_backend_color_fill:nnn #1#2#3
-  {
-    \__draw_backend_scope:x
-      {
-        fill =
-         "
-           rgb
-             (
-               #1 \c_percent_str ,
-               #2 \c_percent_str ,
-               #3 \c_percent_str
-             )
-         "
-      }
-  }
-\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:n #1
-  { \__draw_backend_select:n { rgb ~ #1 } }
 \cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4
   {
     \__draw_backend_scope:n
@@ -436,8 +446,7 @@
     \__kernel_backend_scope_end:
   }
 %% File: l3backend-graphics.dtx
-\AtBeginDocument
-  { \cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n }
+\cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n
 \cs_new_protected:Npn \__graphics_backend_getbb_jpg:n #1
   {
     \int_zero:N \l_graphics_page_int
diff --git a/texmf/tex/latex/l3backend/l3backend-pdfmode.def b/texmf/tex/latex/l3backend/l3backend-pdfmode.def
index 688d84b9..b811d5f7 100644
--- a/texmf/tex/latex/l3backend/l3backend-pdfmode.def
+++ b/texmf/tex/latex/l3backend/l3backend-pdfmode.def
@@ -25,7 +25,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-pdfmode.def}{2020-06-18}{}
+  {l3backend-pdfmode.def}{2020-08-07}{}
   {L3 backend support: PDF mode}
 \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
 \cs_new_protected:Npn \__kernel_backend_literal:n #1
@@ -69,51 +69,44 @@
 \cs_generate_variant:Nn \__kernel_backend_matrix:n { x }
 %% File: l3backend-color.dtx
 \cs_new_protected:Npn \__color_backend_pickup:N #1 { }
-\AtBeginDocument
+\cs_if_exist:cT { ver at color.sty }
   {
-    \cs_if_exist:cT { ver at color.sty }
+    \cs_set_protected:Npn \__color_backend_pickup:N #1
       {
-        \cs_set_protected:Npn \__color_backend_pickup:N #1
-          {
-            \exp_last_unbraced:Nx \__color_backend_pickup:w
-              { \current at color } ~ 0 ~ 0 ~ 0 \s__color_stop #1
-          }
-        \cs_new_protected:Npn \__color_backend_pickup:w
-          #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \s__color_stop #7
+        \exp_last_unbraced:Nx \__color_backend_pickup:w
+          { \current at color } ~ 0 ~ 0 ~ 0 \s__color_stop #1
+      }
+    \cs_new_protected:Npn \__color_backend_pickup:w
+      #1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \s__color_stop #7
+      {
+        \str_if_eq:nnTF {#2} { g }
+          { \tl_set:Nn #7 { { gray } {#1} } }
           {
-            \str_if_eq:nnTF {#2} { g }
-              { \tl_set:Nn #7 { { gray } {#1} } }
+            \str_if_eq:nnTF {#4} { rg }
+              { \tl_set:Nn #7 { { rgb } { #1 ~ #2 ~ #3 } } }
               {
-                \str_if_eq:nnTF {#4} { rg }
-                  { \tl_set:Nn #7 { { rgb } { #1 ~ #2 ~ #3 } } }
-                  {
-                     \str_if_eq:nnTF {#5} { k }
-                       { \tl_set:Nn #7 { { cmyk } { #1 ~ #2 ~ #3 ~ #4 } } }
+                 \str_if_eq:nnTF {#5} { k }
+                   { \tl_set:Nn #7 { { cmyk } { #1 ~ #2 ~ #3 ~ #4 } } }
+                   {
+                     \str_if_eq:nnTF {#2} { cs }
                        {
-                         \str_if_eq:nnTF {#2} { cs }
-                           {
-                             \tl_set:Nx #7 { { spot } { \use_none:n #1 ~ #5 } }
-                           }
-                           {
-                             \tl_set:Nn #7 { { gray } { 0 } }
-                           }
+                         \tl_set:Nx #7 { { \use:n #1 } { #5 } }
                        }
-                  }
+                       {
+                         \tl_set:Nn #7 { { gray } { 0 } }
+                       }
+                   }
               }
           }
       }
   }
 \int_new:N \l__kernel_color_stack_int
-\cs_new_protected:Npn \__color_backend_cmyk:n #1
+\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
   { \__color_backend_select:n { #1 ~ k ~ #1 ~ K } }
-\cs_new_protected:Npn \__color_backend_gray:n #1
+\cs_new_protected:Npn \__color_backend_select_gray:n #1
   { \__color_backend_select:n { #1 ~ g ~ #1 ~ G } }
-\cs_new_protected:Npn \__color_backend_rgb:n #1
+\cs_new_protected:Npn \__color_backend_select_rgb:n #1
   { \__color_backend_select:n { #1 ~ rg ~ #1 ~ RG } }
-\cs_new_protected:Npn \__color_backend_spot:n #1
-  { \__color_backend_spot:w #1 \s__color_stop }
-\cs_new_protected:Npn \__color_backend_spot:w #1 ~ #2 \s__color_stop
-  { \__color_backend_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ scn ~ #2 ~ SCN } }
 \cs_new_protected:Npx \__color_backend_select:n #1
   {
     \cs_if_exist:NTF \tex_pdfextension:D
@@ -129,6 +122,24 @@
       { \tex_pdfcolorstack:D }
         \exp_not:N \l__kernel_color_stack_int pop \scan_stop:
   }
+\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
+  { \__color_backend_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ scn ~ #2 ~ SCN } }
+\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ k } }
+\cs_new_protected:Npn \__color_backend_fill_gray:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ g } }
+\cs_new_protected:Npn \__color_backend_fill_rgb:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ rg } }
+  \cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ K } }
+\cs_new_protected:Npn \__color_backend_stroke_gray:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ G } }
+\cs_new_protected:Npn \__color_backend_stroke_rgb:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ RG } }
+\cs_new_protected:Npn \__color_backend_fill_separation:nn #1#2
+  { \__kernel_backend_literal_pdf:n { /#1 ~ cs ~ #2 ~ scn } }
+\cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2
+  { \__kernel_backend_literal_pdf:n { /#1 ~ CS ~ #2 ~ SCN } }
 %% File: l3backend-box.dtx
 \cs_new_protected:Npn \__box_backend_clip:N #1
   {
@@ -283,34 +294,6 @@
   { \__draw_backend_literal:n { 1 ~ j } }
 \cs_new_protected:Npn \__draw_backend_join_bevel:
   { \__draw_backend_literal:n { 2 ~ j } }
-\cs_new_protected:Npn \__draw_backend_color_fill_cmyk:n #1
-  { \__draw_backend_color_select:n { #1 ~ k } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:n #1
-  { \__draw_backend_color_select:n { #1 ~ K } }
-\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1
-  { \__draw_backend_color_select:n { #1 ~ g } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1
-  { \__draw_backend_color_select:n { #1 ~ G } }
-\cs_new_protected:Npn \__draw_backend_color_fill_rgb:n #1
-  { \__draw_backend_color_select:n { #1 ~ rg } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:n #1
-  { \__draw_backend_color_select:n { #1 ~ RG } }
-\cs_new_protected:Npx \__draw_backend_color_select:n #1
-  {
-    \cs_if_exist:NTF \tex_pdfextension:D
-      { \tex_pdfextension:D colorstack }
-      { \tex_pdfcolorstack:D }
-        \exp_not:N \l__kernel_color_stack_int push {#1}
-      \group_insert_after:N \exp_not:N \__draw_backend_color_reset:
-  }
-\cs_new_protected:Npx \__draw_backend_color_reset:
-  {
-    \cs_if_exist:NTF \tex_pdfextension:D
-      { \tex_pdfextension:D colorstack }
-      { \tex_pdfcolorstack:D }
-        \exp_not:N \l__kernel_color_stack_int pop \scan_stop:
-  }
-\cs_generate_variant:Nn \__draw_backend_color_select:n { x }
 \cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4
   {
     \__kernel_backend_matrix:n { #1 ~ #2 ~ #3 ~ #4 }
diff --git a/texmf/tex/latex/l3backend/l3backend-xdvipdfmx.def b/texmf/tex/latex/l3backend/l3backend-xdvipdfmx.def
index 2a093aae..983dc39b 100644
--- a/texmf/tex/latex/l3backend/l3backend-xdvipdfmx.def
+++ b/texmf/tex/latex/l3backend/l3backend-xdvipdfmx.def
@@ -25,7 +25,7 @@
 %% 
 %% File: l3backend-basics.dtx
 \ProvidesExplFile
-  {l3backend-xdvipdfmx.def}{2020-06-18}{}
+  {l3backend-xdvipdfmx.def}{2020-08-07}{}
   {L3 backend support: xdvipdfmx}
 \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D
 \cs_new_protected:Npn \__kernel_backend_literal:n #1
@@ -42,37 +42,32 @@
   { \__kernel_backend_literal:n { x:grestore } }
 %% File: l3backend-color.dtx
 \cs_new_protected:Npn \__color_backend_pickup:N #1 { }
-\AtBeginDocument
+\cs_if_exist:cT { ver at color.sty }
   {
-    \cs_if_exist:cT { ver at color.sty }
+     \cs_set_protected:Npn \__color_backend_pickup:N #1
       {
-        \cs_set_protected:Npn \__color_backend_pickup:N #1
+        \exp_args:NV \tl_if_head_is_space:nTF \current at color
           {
-            \exp_args:NV \tl_if_head_is_space:nTF \current at color
-              {
-                \tl_set:Nx #1
-                   {
-                     { spot }
-                     { \exp_after:wN \use:n \current at color \c_space_tl 1 }
-                   }
-              }
-              {
-                \exp_last_unbraced:Nx \__color_backend_pickup:w
-                  { \current at color } \s__color_stop #1
-              }
+            \tl_set:Nx #1
+               {
+                 { \exp_after:wN \use:n \current at color }
+                 { 1 }
+               }
+          }
+          {
+            \exp_last_unbraced:Nx \__color_backend_pickup:w
+              { \current at color } \s__color_stop #1
           }
-        \cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
-          { \tl_set:Nn #3 { {#1} {#2} } }
       }
+    \cs_new_protected:Npn \__color_backend_pickup:w #1 ~ #2 \s__color_stop #3
+      { \tl_set:Nn #3 { {#1} {#2} } }
   }
-\cs_new_protected:Npn \__color_backend_cmyk:n #1
+\cs_new_protected:Npn \__color_backend_select_cmyk:n #1
   { \__color_backend_select:n { cmyk ~ #1 } }
-\cs_new_protected:Npn \__color_backend_gray:n #1
+\cs_new_protected:Npn \__color_backend_select_gray:n #1
   { \__color_backend_select:n { gray ~ #1 } }
-\cs_new_protected:Npn \__color_backend_rgb:n #1
+\cs_new_protected:Npn \__color_backend_select_rgb:n #1
   { \__color_backend_select:n { rgb ~ #1 } }
-\cs_new_protected:Npn \__color_backend_spot:n #1
-  { \__color_backend_select:n {#1} }
 \cs_new_protected:Npn \__color_backend_select:n #1
   {
     \__kernel_backend_literal:n { color~push~ #1 }
@@ -80,6 +75,24 @@
   }
 \cs_new_protected:Npn \__color_backend_reset:
   { \__kernel_backend_literal:n { color~pop } }
+\cs_new_protected:Npn \__color_backend_select_separation:nn #1#2
+  { \__color_backend_select:n {#1} }
+\cs_new_protected:Npn \__color_backend_fill_cmyk:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ k } }
+\cs_new_protected:Npn \__color_backend_fill_gray:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ g } }
+\cs_new_protected:Npn \__color_backend_fill_rgb:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ rg } }
+  \cs_new_protected:Npn \__color_backend_stroke_cmyk:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ K } }
+\cs_new_protected:Npn \__color_backend_stroke_gray:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ G } }
+\cs_new_protected:Npn \__color_backend_stroke_rgb:n #1
+  { \__kernel_backend_literal_pdf:n { #1 ~ RG } }
+\cs_new_protected:Npn \__color_backend_fill_separation:nn #1#2
+  { \__kernel_backend_literal_pdf:n { /#1 ~ cs ~ #2 ~ scn } }
+\cs_new_protected:Npn \__color_backend_stroke_separation:nn #1#2
+  { \__kernel_backend_literal_pdf:n { /#1 ~ CS ~ #2 ~ SCN } }
 %% File: l3backend-box.dtx
 \cs_new_protected:Npn \__box_backend_clip:N #1
   {
@@ -221,20 +234,6 @@
   { \__draw_backend_literal:n { 1 ~ j } }
 \cs_new_protected:Npn \__draw_backend_join_bevel:
   { \__draw_backend_literal:n { 2 ~ j } }
-\cs_new_protected:Npn \__draw_backend_color_fill_cmyk:n #1
-  { \__draw_backend_color_select:n { #1 ~ k } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_cmyk:n #1
-  { \__draw_backend_color_select:n { #1 ~ K } }
-\cs_new_protected:Npn \__draw_backend_color_fill_gray:n #1
-  { \__draw_backend_color_select:n { #1 ~ g } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_gray:n #1
-  { \__draw_backend_color_select:n { #1 ~ G } }
-\cs_new_protected:Npn \__draw_backend_color_fill_rgb:n #1
-  { \__draw_backend_color_select:n { #1 ~ rg } }
-\cs_new_protected:Npn \__draw_backend_color_stroke_rgb:n #1
-  { \__draw_backend_color_select:n { #1 ~ RG } }
-\cs_new_eq:NN \__draw_backend_color_select:n \__kernel_backend_literal_pdf:n
-\cs_generate_variant:Nn \__draw_backend_color_select:n { x }
 \cs_new_protected:Npn \__draw_backend_cm:nnnn #1#2#3#4
   {
     \__draw_backend_cm_decompose:nnnnN {#1} {#2} {#3} {#4}
@@ -315,8 +314,7 @@
     \__kernel_backend_scope_end:
   }
 %% File: l3backend-graphics.dtx
-\AtBeginDocument
-  { \cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n }
+\cs_new_eq:NN \__graphics_backend_getbb_eps:n \graphics_read_bb:n
 \int_new:N \g__graphics_track_int
 \cs_new_protected:Npn \__graphics_backend_include_eps:n #1
   {
@@ -518,15 +516,12 @@
 \cs_new:Npn \__pdf_backend_pageobject_ref:n #1
   { @page #1 }
 \bool_new:N \g__pdf_landscape_bool
-\AtBeginDocument
+\cs_if_exist:NT \landscape
   {
-    \cs_if_exist:NT \landscape
-      {
-        \tl_put_right:Nn \landscape
-          { \bool_gset_true:N \g__pdf_landscape_bool }
-        \tl_put_left:Nn \endlandscape
-          { \bool_gset_false:N \g__pdf_landscape_bool }
-      }
+    \tl_put_right:Nn \landscape
+      { \bool_gset_true:N \g__pdf_landscape_bool }
+    \tl_put_left:Nn \endlandscape
+      { \bool_gset_false:N \g__pdf_landscape_bool }
   }
 \int_new:N \g__pdf_backend_annotation_int
 \cs_new_protected:Npn \__pdf_backend_annotation:nnnn #1#2#3#4





More information about the latex3-commits mailing list.