[latex3-commits] [git/LaTeX3-latex3-latex3] coffins: Support for global coffin pole setting (45edfbf)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Jan 20 22:49:08 CET 2019


Repository : https://github.com/latex3/latex3
On branch  : coffins
Link       : https://github.com/latex3/latex3/commit/45edfbf0e93a5c42f22bc6a001c7d13171620e87

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

commit 45edfbf0e93a5c42f22bc6a001c7d13171620e87
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Jan 20 20:20:28 2019 +0000

    Support for global coffin pole setting


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

45edfbf0e93a5c42f22bc6a001c7d13171620e87
 l3kernel/l3coffins.dtx                  |   89 ++++++++++++++++++++++---------
 l3kernel/testfiles/m3expl001.luatex.tlg |   11 +++-
 l3kernel/testfiles/m3expl001.ptex.tlg   |   11 +++-
 l3kernel/testfiles/m3expl001.tlg        |   11 +++-
 l3kernel/testfiles/m3expl001.uptex.tlg  |   11 +++-
 l3kernel/testfiles/m3expl001.xetex.tlg  |   11 +++-
 l3kernel/testfiles/m3expl003.luatex.tlg |   11 +++-
 l3kernel/testfiles/m3expl003.ptex.tlg   |   11 +++-
 l3kernel/testfiles/m3expl003.tlg        |   11 +++-
 l3kernel/testfiles/m3expl003.uptex.tlg  |   11 +++-
 l3kernel/testfiles/m3expl003.xetex.tlg  |   11 +++-
 11 files changed, 155 insertions(+), 44 deletions(-)

diff --git a/l3kernel/l3coffins.dtx b/l3kernel/l3coffins.dtx
index f8de3e5..eaf7123 100644
--- a/l3kernel/l3coffins.dtx
+++ b/l3kernel/l3coffins.dtx
@@ -156,8 +156,11 @@
 %   environment in a coffin.
 % \end{function}
 %
-% \begin{function}[added = 2012-07-20]
-%   {\coffin_set_horizontal_pole:Nnn, \coffin_set_horizontal_pole:cnn}
+% \begin{function}[added = 2012-07-20, updated = 2019-01-20]
+%   {
+%     \coffin_set_horizontal_pole:Nnn, \coffin_set_horizontal_pole:cnn,
+%     \coffin_gset_horizontal_pole:Nnn, \coffin_gset_horizontal_pole:cnn
+%   }
 %   \begin{syntax}
 %     \cs{coffin_set_horizontal_pole:Nnn} \meta{coffin}
 %     ~~\Arg{pole} \Arg{offset}
@@ -168,8 +171,11 @@
 %   \meta{offset} should be given as a dimension expression.
 % \end{function}
 %
-% \begin{function}[added = 2012-07-20]
-%   {\coffin_set_vertical_pole:Nnn, \coffin_set_vertical_pole:cnn}
+% \begin{function}[added = 2012-07-20, updated = 2019-01-20]
+%   {
+%     \coffin_set_vertical_pole:Nnn, \coffin_set_vertical_pole:cnn,
+%     \coffin_gset_vertical_pole:Nnn, \coffin_gset_vertical_pole:cnn
+%   }
 %   \begin{syntax}
 %     \cs{coffin_set_vertical_pole:Nnn} \meta{coffin} \Arg{pole} \Arg{offset}
 %   \end{syntax}
@@ -972,34 +978,65 @@
 % \end{macro}
 %
 % \begin{macro}
-%   {\coffin_set_horizontal_pole:Nnn, \coffin_set_horizontal_pole:cnn}
-% \begin{macro}{\coffin_set_vertical_pole:Nnn, \coffin_set_vertical_pole:cnn}
-% \begin{macro}{\@@_set_pole:Nnn, \@@_set_pole:Nnx}
+%   {
+%     \coffin_set_horizontal_pole:Nnn, \coffin_set_horizontal_pole:cnn,
+%     \coffin_gset_horizontal_pole:Nnn, \coffin_gset_horizontal_pole:cnn,
+%   }
+% \begin{macro}
+%   {
+%     \coffin_set_vertical_pole:Nnn, \coffin_set_vertical_pole:cnn,
+%     \coffin_gset_vertical_pole:Nnn, \coffin_gset_vertical_pole:cnn,
+%   }
+% \begin{macro}{\@@_set_pole:NNNNnn}
+% \begin{macro}
+%   {
+%     \@@_set_pole:Nnn, \@@_set_pole:Nnx,
+%     \@@_gset_pole:Nnn, \@@_gset_pole:Nnx
+%   }
 %   Setting the pole of a coffin at the user/designer level requires a
 %   bit more care. The idea here is to provide a reasonable interface to
 %   the system, then to do the setting with full expansion. The
-%   three-argument version is used internally to do a direct setting.
+%   three-argument versions are used internally to do a direct setting.
 %    \begin{macrocode}
 \cs_new_protected:Npn \coffin_set_horizontal_pole:Nnn #1#2#3
   {
-    \@@_if_exist:NT #1
-      {
-        \@@_set_pole:Nnx #1 {#2}
-          {
-            { 0pt } { \dim_eval:n {#3} }
-            { 1000pt } { 0pt }
-          }
-      }
+    \@@_set_pole:NNNNnn
+      l \prop_put:cnx \@@_reset_structure:N
+      #1 {#2}
+      { { 0pt } { \dim_eval:n {#3} } { 1000pt } { 0pt } }
   }
+\cs_generate_variant:Nn \coffin_set_horizontal_pole:Nnn { c }
+\cs_new_protected:Npn \coffin_gset_horizontal_pole:Nnn #1#2#3
+  {
+    \@@_set_pole:NNNNnn
+      g \prop_gput:cnx \@@_greset_structure:N
+      #1 {#2}
+      { { 0pt } { \dim_eval:n {#3} } { 1000pt } { 0pt } }
+  }
+\cs_generate_variant:Nn \coffin_gset_horizontal_pole:Nnn { c }
 \cs_new_protected:Npn \coffin_set_vertical_pole:Nnn #1#2#3
   {
-    \@@_if_exist:NT #1
+    \@@_set_pole:NNNNnn
+      l \prop_put:cnx \@@_reset_structure:N
+      #1 {#2}
+      { { \dim_eval:n {#3} } { 0pt } { 0pt } { 1000pt } }
+  }
+\cs_generate_variant:Nn \coffin_set_vertical_pole:Nnn { c }
+\cs_new_protected:Npn \coffin_gset_vertical_pole:Nnn #1#2#3
+  {
+    \@@_set_pole:NNNNnn
+      g \prop_gput:cnx \@@_greset_structure:N
+       #1 {#2}
+      { { \dim_eval:n {#3} } { 0pt } { 0pt } { 1000pt } }
+  }
+\cs_generate_variant:Nn \coffin_gset_vertical_pole:Nnn { c }
+\cs_new_protected:Npn \@@_set_pole:NNNNnn #1#2#3#4#5#6
+  {
+    \@@_if_exist:NT #4
       {
-        \@@_set_pole:Nnx #1 {#2}
-          {
-            { \dim_eval:n {#3} } { 0pt }
-            { 0pt } { 1000pt }
-          }
+        \prop_if_exist:cF { #1 _@@_poles_ \@@_to_value:N #4 _prop }
+          { #3 #4 }
+        #2 { #1 _@@_poles_ \@@_to_value:N #4 _prop } {#5} {#6}
       }
   }
 \cs_new_protected:Npn \@@_set_pole:Nnn #1#2#3
@@ -1007,9 +1044,13 @@
     \prop_put:cnn { l_@@_poles_ \@@_to_value:N #1 _prop }
       {#2} {#3}
   }
-\cs_generate_variant:Nn \coffin_set_horizontal_pole:Nnn { c }
-\cs_generate_variant:Nn \coffin_set_vertical_pole:Nnn { c }
 \cs_generate_variant:Nn \@@_set_pole:Nnn { Nnx }
+\cs_new_protected:Npn \@@_gset_pole:Nnn #1#2#3
+  {
+    \prop_put:cnn { g_@@_poles_ \@@_to_value:N #1 _prop }
+      {#2} {#3}
+  }
+\cs_generate_variant:Nn \@@_gset_pole:Nnn { Nnx }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 54c2b24..afb9566 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -5361,11 +5361,18 @@ Defining \__coffin_reset_structure:N on line ...
 Defining \__coffin_greset_structure:N on line ...
 Defining \__coffin_reset_structure:NNN on line ...
 Defining \coffin_set_horizontal_pole:Nnn on line ...
-Defining \coffin_set_vertical_pole:Nnn on line ...
-Defining \__coffin_set_pole:Nnn on line ...
 Defining \coffin_set_horizontal_pole:cnn on line ...
+Defining \coffin_gset_horizontal_pole:Nnn on line ...
+Defining \coffin_gset_horizontal_pole:cnn on line ...
+Defining \coffin_set_vertical_pole:Nnn on line ...
 Defining \coffin_set_vertical_pole:cnn on line ...
+Defining \coffin_gset_vertical_pole:Nnn on line ...
+Defining \coffin_gset_vertical_pole:cnn on line ...
+Defining \__coffin_set_pole:NNNNnn on line ...
+Defining \__coffin_set_pole:Nnn on line ...
 Defining \__coffin_set_pole:Nnx on line ...
+Defining \__coffin_gset_pole:Nnn on line ...
+Defining \__coffin_gset_pole:Nnx on line ...
 Defining \__coffin_update:N on line ...
 Defining \__coffin_gupdate:N on line ...
 Defining \__coffin_update_corners:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 059a527..9f1d872 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -5657,11 +5657,18 @@ Defining \__coffin_reset_structure:N on line ...
 Defining \__coffin_greset_structure:N on line ...
 Defining \__coffin_reset_structure:NNN on line ...
 Defining \coffin_set_horizontal_pole:Nnn on line ...
-Defining \coffin_set_vertical_pole:Nnn on line ...
-Defining \__coffin_set_pole:Nnn on line ...
 Defining \coffin_set_horizontal_pole:cnn on line ...
+Defining \coffin_gset_horizontal_pole:Nnn on line ...
+Defining \coffin_gset_horizontal_pole:cnn on line ...
+Defining \coffin_set_vertical_pole:Nnn on line ...
 Defining \coffin_set_vertical_pole:cnn on line ...
+Defining \coffin_gset_vertical_pole:Nnn on line ...
+Defining \coffin_gset_vertical_pole:cnn on line ...
+Defining \__coffin_set_pole:NNNNnn on line ...
+Defining \__coffin_set_pole:Nnn on line ...
 Defining \__coffin_set_pole:Nnx on line ...
+Defining \__coffin_gset_pole:Nnn on line ...
+Defining \__coffin_gset_pole:Nnx on line ...
 Defining \__coffin_update:N on line ...
 Defining \__coffin_gupdate:N on line ...
 Defining \__coffin_update_corners:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index 1f7f20b..62564c8 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -5657,11 +5657,18 @@ Defining \__coffin_reset_structure:N on line ...
 Defining \__coffin_greset_structure:N on line ...
 Defining \__coffin_reset_structure:NNN on line ...
 Defining \coffin_set_horizontal_pole:Nnn on line ...
-Defining \coffin_set_vertical_pole:Nnn on line ...
-Defining \__coffin_set_pole:Nnn on line ...
 Defining \coffin_set_horizontal_pole:cnn on line ...
+Defining \coffin_gset_horizontal_pole:Nnn on line ...
+Defining \coffin_gset_horizontal_pole:cnn on line ...
+Defining \coffin_set_vertical_pole:Nnn on line ...
 Defining \coffin_set_vertical_pole:cnn on line ...
+Defining \coffin_gset_vertical_pole:Nnn on line ...
+Defining \coffin_gset_vertical_pole:cnn on line ...
+Defining \__coffin_set_pole:NNNNnn on line ...
+Defining \__coffin_set_pole:Nnn on line ...
 Defining \__coffin_set_pole:Nnx on line ...
+Defining \__coffin_gset_pole:Nnn on line ...
+Defining \__coffin_gset_pole:Nnx on line ...
 Defining \__coffin_update:N on line ...
 Defining \__coffin_gupdate:N on line ...
 Defining \__coffin_update_corners:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 0ebfa51..1021a38 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -5654,11 +5654,18 @@ Defining \__coffin_reset_structure:N on line ...
 Defining \__coffin_greset_structure:N on line ...
 Defining \__coffin_reset_structure:NNN on line ...
 Defining \coffin_set_horizontal_pole:Nnn on line ...
-Defining \coffin_set_vertical_pole:Nnn on line ...
-Defining \__coffin_set_pole:Nnn on line ...
 Defining \coffin_set_horizontal_pole:cnn on line ...
+Defining \coffin_gset_horizontal_pole:Nnn on line ...
+Defining \coffin_gset_horizontal_pole:cnn on line ...
+Defining \coffin_set_vertical_pole:Nnn on line ...
 Defining \coffin_set_vertical_pole:cnn on line ...
+Defining \coffin_gset_vertical_pole:Nnn on line ...
+Defining \coffin_gset_vertical_pole:cnn on line ...
+Defining \__coffin_set_pole:NNNNnn on line ...
+Defining \__coffin_set_pole:Nnn on line ...
 Defining \__coffin_set_pole:Nnx on line ...
+Defining \__coffin_gset_pole:Nnn on line ...
+Defining \__coffin_gset_pole:Nnx on line ...
 Defining \__coffin_update:N on line ...
 Defining \__coffin_gupdate:N on line ...
 Defining \__coffin_update_corners:N on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index 4b3ec0d..87ea4cb 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -5372,11 +5372,18 @@ Defining \__coffin_reset_structure:N on line ...
 Defining \__coffin_greset_structure:N on line ...
 Defining \__coffin_reset_structure:NNN on line ...
 Defining \coffin_set_horizontal_pole:Nnn on line ...
-Defining \coffin_set_vertical_pole:Nnn on line ...
-Defining \__coffin_set_pole:Nnn on line ...
 Defining \coffin_set_horizontal_pole:cnn on line ...
+Defining \coffin_gset_horizontal_pole:Nnn on line ...
+Defining \coffin_gset_horizontal_pole:cnn on line ...
+Defining \coffin_set_vertical_pole:Nnn on line ...
 Defining \coffin_set_vertical_pole:cnn on line ...
+Defining \coffin_gset_vertical_pole:Nnn on line ...
+Defining \coffin_gset_vertical_pole:cnn on line ...
+Defining \__coffin_set_pole:NNNNnn on line ...
+Defining \__coffin_set_pole:Nnn on line ...
 Defining \__coffin_set_pole:Nnx on line ...
+Defining \__coffin_gset_pole:Nnn on line ...
+Defining \__coffin_gset_pole:Nnx on line ...
 Defining \__coffin_update:N on line ...
 Defining \__coffin_gupdate:N on line ...
 Defining \__coffin_update_corners:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 54c2b24..afb9566 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -5361,11 +5361,18 @@ Defining \__coffin_reset_structure:N on line ...
 Defining \__coffin_greset_structure:N on line ...
 Defining \__coffin_reset_structure:NNN on line ...
 Defining \coffin_set_horizontal_pole:Nnn on line ...
-Defining \coffin_set_vertical_pole:Nnn on line ...
-Defining \__coffin_set_pole:Nnn on line ...
 Defining \coffin_set_horizontal_pole:cnn on line ...
+Defining \coffin_gset_horizontal_pole:Nnn on line ...
+Defining \coffin_gset_horizontal_pole:cnn on line ...
+Defining \coffin_set_vertical_pole:Nnn on line ...
 Defining \coffin_set_vertical_pole:cnn on line ...
+Defining \coffin_gset_vertical_pole:Nnn on line ...
+Defining \coffin_gset_vertical_pole:cnn on line ...
+Defining \__coffin_set_pole:NNNNnn on line ...
+Defining \__coffin_set_pole:Nnn on line ...
 Defining \__coffin_set_pole:Nnx on line ...
+Defining \__coffin_gset_pole:Nnn on line ...
+Defining \__coffin_gset_pole:Nnx on line ...
 Defining \__coffin_update:N on line ...
 Defining \__coffin_gupdate:N on line ...
 Defining \__coffin_update_corners:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index 059a527..9f1d872 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -5657,11 +5657,18 @@ Defining \__coffin_reset_structure:N on line ...
 Defining \__coffin_greset_structure:N on line ...
 Defining \__coffin_reset_structure:NNN on line ...
 Defining \coffin_set_horizontal_pole:Nnn on line ...
-Defining \coffin_set_vertical_pole:Nnn on line ...
-Defining \__coffin_set_pole:Nnn on line ...
 Defining \coffin_set_horizontal_pole:cnn on line ...
+Defining \coffin_gset_horizontal_pole:Nnn on line ...
+Defining \coffin_gset_horizontal_pole:cnn on line ...
+Defining \coffin_set_vertical_pole:Nnn on line ...
 Defining \coffin_set_vertical_pole:cnn on line ...
+Defining \coffin_gset_vertical_pole:Nnn on line ...
+Defining \coffin_gset_vertical_pole:cnn on line ...
+Defining \__coffin_set_pole:NNNNnn on line ...
+Defining \__coffin_set_pole:Nnn on line ...
 Defining \__coffin_set_pole:Nnx on line ...
+Defining \__coffin_gset_pole:Nnn on line ...
+Defining \__coffin_gset_pole:Nnx on line ...
 Defining \__coffin_update:N on line ...
 Defining \__coffin_gupdate:N on line ...
 Defining \__coffin_update_corners:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 1f7f20b..62564c8 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -5657,11 +5657,18 @@ Defining \__coffin_reset_structure:N on line ...
 Defining \__coffin_greset_structure:N on line ...
 Defining \__coffin_reset_structure:NNN on line ...
 Defining \coffin_set_horizontal_pole:Nnn on line ...
-Defining \coffin_set_vertical_pole:Nnn on line ...
-Defining \__coffin_set_pole:Nnn on line ...
 Defining \coffin_set_horizontal_pole:cnn on line ...
+Defining \coffin_gset_horizontal_pole:Nnn on line ...
+Defining \coffin_gset_horizontal_pole:cnn on line ...
+Defining \coffin_set_vertical_pole:Nnn on line ...
 Defining \coffin_set_vertical_pole:cnn on line ...
+Defining \coffin_gset_vertical_pole:Nnn on line ...
+Defining \coffin_gset_vertical_pole:cnn on line ...
+Defining \__coffin_set_pole:NNNNnn on line ...
+Defining \__coffin_set_pole:Nnn on line ...
 Defining \__coffin_set_pole:Nnx on line ...
+Defining \__coffin_gset_pole:Nnn on line ...
+Defining \__coffin_gset_pole:Nnx on line ...
 Defining \__coffin_update:N on line ...
 Defining \__coffin_gupdate:N on line ...
 Defining \__coffin_update_corners:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 0ebfa51..1021a38 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -5654,11 +5654,18 @@ Defining \__coffin_reset_structure:N on line ...
 Defining \__coffin_greset_structure:N on line ...
 Defining \__coffin_reset_structure:NNN on line ...
 Defining \coffin_set_horizontal_pole:Nnn on line ...
-Defining \coffin_set_vertical_pole:Nnn on line ...
-Defining \__coffin_set_pole:Nnn on line ...
 Defining \coffin_set_horizontal_pole:cnn on line ...
+Defining \coffin_gset_horizontal_pole:Nnn on line ...
+Defining \coffin_gset_horizontal_pole:cnn on line ...
+Defining \coffin_set_vertical_pole:Nnn on line ...
 Defining \coffin_set_vertical_pole:cnn on line ...
+Defining \coffin_gset_vertical_pole:Nnn on line ...
+Defining \coffin_gset_vertical_pole:cnn on line ...
+Defining \__coffin_set_pole:NNNNnn on line ...
+Defining \__coffin_set_pole:Nnn on line ...
 Defining \__coffin_set_pole:Nnx on line ...
+Defining \__coffin_gset_pole:Nnn on line ...
+Defining \__coffin_gset_pole:Nnx on line ...
 Defining \__coffin_update:N on line ...
 Defining \__coffin_gupdate:N on line ...
 Defining \__coffin_update_corners:N on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index 4b3ec0d..87ea4cb 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -5372,11 +5372,18 @@ Defining \__coffin_reset_structure:N on line ...
 Defining \__coffin_greset_structure:N on line ...
 Defining \__coffin_reset_structure:NNN on line ...
 Defining \coffin_set_horizontal_pole:Nnn on line ...
-Defining \coffin_set_vertical_pole:Nnn on line ...
-Defining \__coffin_set_pole:Nnn on line ...
 Defining \coffin_set_horizontal_pole:cnn on line ...
+Defining \coffin_gset_horizontal_pole:Nnn on line ...
+Defining \coffin_gset_horizontal_pole:cnn on line ...
+Defining \coffin_set_vertical_pole:Nnn on line ...
 Defining \coffin_set_vertical_pole:cnn on line ...
+Defining \coffin_gset_vertical_pole:Nnn on line ...
+Defining \coffin_gset_vertical_pole:cnn on line ...
+Defining \__coffin_set_pole:NNNNnn on line ...
+Defining \__coffin_set_pole:Nnn on line ...
 Defining \__coffin_set_pole:Nnx on line ...
+Defining \__coffin_gset_pole:Nnn on line ...
+Defining \__coffin_gset_pole:Nnx on line ...
 Defining \__coffin_update:N on line ...
 Defining \__coffin_gupdate:N on line ...
 Defining \__coffin_update_corners:N on line ...





More information about the latex3-commits mailing list