[latex3-commits] [l3svn] branch master updated: Add \hbox_set_to_wd:Nnw and \vbox_set_to_ht:Nnw

noreply at latex-project.org noreply at latex-project.org
Thu Jun 8 09:31:14 CEST 2017


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

The following commit(s) were added to refs/heads/master by this push:
       new  5109ebb   Add \hbox_set_to_wd:Nnw and \vbox_set_to_ht:Nnw
5109ebb is described below

commit 5109ebb9341bce69ff3f2eec420bdc049221697e
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Jun 8 08:18:16 2017 +0100

    Add \hbox_set_to_wd:Nnw and \vbox_set_to_ht:Nnw
---
 l3kernel/l3box.dtx                      |   67 +++++++++++++++++++++++++++++++
 l3kernel/testfiles/m3expl001.luatex.tlg |    8 ++++
 l3kernel/testfiles/m3expl001.ptex.tlg   |    8 ++++
 l3kernel/testfiles/m3expl001.tlg        |    8 ++++
 l3kernel/testfiles/m3expl001.uptex.tlg  |    8 ++++
 l3kernel/testfiles/m3expl001.xetex.tlg  |    8 ++++
 l3kernel/testfiles/m3expl003.luatex.tlg |    8 ++++
 l3kernel/testfiles/m3expl003.ptex.tlg   |    8 ++++
 l3kernel/testfiles/m3expl003.tlg        |    8 ++++
 l3kernel/testfiles/m3expl003.uptex.tlg  |    8 ++++
 l3kernel/testfiles/m3expl003.xetex.tlg  |    8 ++++
 11 files changed, 147 insertions(+)

diff --git a/l3kernel/l3box.dtx b/l3kernel/l3box.dtx
index 5bc3bd3..511a261 100644
--- a/l3kernel/l3box.dtx
+++ b/l3kernel/l3box.dtx
@@ -423,6 +423,21 @@
 %   where the \meta{content} may not be a simple argument.
 % \end{function}
 %
+% \begin{function}[added = 2017-06-08]
+%   {
+%     \hbox_set_to_wd:Nnw,  \hbox_set_to_wd:cnw,
+%     \hbox_gset_to_wd:Nnw, \hbox_gset_to_wd:cnw
+%   }
+%   \begin{syntax}
+%     \cs{hbox_set_to_wd:Nnw} \meta{box} \Arg{dimexpr} \meta{contents} \cs{hbox_set_end:}
+%   \end{syntax}
+%   Typesets the \meta{contents} to the width given by the \meta{dimexpr}
+%   and then stores the result inside the \meta{box}. In contrast
+%   to \cs{hbox_set_to_wd:Nnn} this function does not absorb the argument
+%   when finding the \meta{content}, and so can be used in circumstances
+%   where the \meta{content} may not be a simple argument
+% \end{function}
+%
 % \begin{function}{\hbox_unpack:N, \hbox_unpack:c}
 %   \begin{syntax}
 %     \cs{hbox_unpack:N} \meta{box}
@@ -540,6 +555,22 @@
 %    where the \meta{content} may not be a simple argument.
 %  \end{function}
 %
+% \begin{function}[added = 2017-06-08]
+%   {
+%     \vbox_set_to_ht:Nnw,  \vbox_set_to_ht:cnw,
+%     \vbox_gset_to_ht:Nnw, \vbox_gset_to_ht:cnw
+%   }
+%   \begin{syntax}
+%     \cs{vbox_set_to_wd:Nnw} \meta{box} \Arg{dimexpr} \meta{contents} \cs{vbox_set_end:}
+%   \end{syntax}
+%   Typesets the \meta{contents} to the height given by the \meta{dimexpr}
+%   and then stores the result inside the \meta{box}. In contrast
+%   to \cs{vbox_set_to_ht:Nnn} this function does not absorb the argument
+%   when finding the \meta{content}, and so can be used in circumstances
+%   where the \meta{content} may not be a simple argument
+% \end{function}
+%
+%
 % \begin{function}[updated = 2011-10-22]{\vbox_set_split_to_ht:NNn}
 %   \begin{syntax}
 %      \cs{vbox_set_split_to_ht:NNn} \meta{box_1} \meta{box_2} \Arg{dimexpr}
@@ -1196,6 +1227,24 @@
 % \end{macro}
 % \end{macro}
 %
+% \begin{macro}{\hbox_set_to_wd:Nnw, \hbox_set_to_wd:cnw}
+% \begin{macro}{\hbox_gset_to_wd:Nnw, \hbox_gset_to_wd:cnw}
+%   Combining the above ideas.
+%    \begin{macrocode}
+\cs_new_protected:Npn \hbox_set_to_wd:Nnw #1#2
+  {
+    \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:w #2 \__dim_eval_end:
+      \c_group_begin_token
+        \group_begin:
+  }
+\cs_new_protected:Npn \hbox_gset_to_wd:Nnw
+  { \tex_global:D \hbox_set_to_wd:Nnw }
+\cs_generate_variant:Nn \hbox_set_to_wd:Nnw  { c }
+\cs_generate_variant:Nn \hbox_gset_to_wd:Nnw { c }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 %  \begin{macro}{\hbox_to_wd:nn}
 %  \begin{macro}{\hbox_to_zero:n}
 %  \testfile*
@@ -1358,6 +1407,24 @@
 % \end{macro}
 % \end{macro}
 %
+% \begin{macro}{\vbox_set_to_ht:Nnw, \vbox_set_to_ht:cnw}
+% \begin{macro}{\vbox_gset_to_ht:Nnw, \vbox_gset_to_ht:cnw}
+%   A combination of the above ideas.
+%    \begin{macrocode}
+\cs_new_protected:Npn \vbox_set_to_ht:Nnw #1#2
+  {
+    \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:w #2 \__dim_eval_end:
+      \c_group_begin_token
+        \group_begin:
+  }
+\cs_new_protected:Npn \vbox_gset_to_ht:Nnw
+  { \tex_global:D \vbox_set_to_ht:Nnw }
+\cs_generate_variant:Nn \vbox_set_to_ht:Nnw  { c }
+\cs_generate_variant:Nn \vbox_gset_to_ht:Nnw { c }
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 % \begin{macro}{\vbox_unpack:N, \vbox_unpack:c}
 % \begin{macro}{\vbox_unpack_clear:N, \vbox_unpack_clear:c}
 % \testfile*
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index d4f0278..028ff79 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -5059,6 +5059,10 @@ Defining \hbox_set:cw on line ...
 Defining \hbox_gset:cw on line ...
 Defining \hbox_set_end: on line ...
 Defining \hbox_gset_end: on line ...
+Defining \hbox_set_to_wd:Nnw on line ...
+Defining \hbox_gset_to_wd:Nnw on line ...
+Defining \hbox_set_to_wd:cnw on line ...
+Defining \hbox_gset_to_wd:cnw on line ...
 Defining \hbox_to_wd:nn on line ...
 Defining \hbox_to_zero:n on line ...
 Defining \hbox_overlap_left:n on line ...
@@ -5089,6 +5093,10 @@ Defining \vbox_set:cw on line ...
 Defining \vbox_gset:cw on line ...
 Defining \vbox_set_end: on line ...
 Defining \vbox_gset_end: on line ...
+Defining \vbox_set_to_ht:Nnw on line ...
+Defining \vbox_gset_to_ht:Nnw on line ...
+Defining \vbox_set_to_ht:cnw on line ...
+Defining \vbox_gset_to_ht:cnw on line ...
 Defining \vbox_unpack:N on line ...
 Defining \vbox_unpack_clear:N on line ...
 Defining \vbox_unpack:c on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index 1503b5d..47e2eb1 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -5049,6 +5049,10 @@ Defining \hbox_set:cw on line ...
 Defining \hbox_gset:cw on line ...
 Defining \hbox_set_end: on line ...
 Defining \hbox_gset_end: on line ...
+Defining \hbox_set_to_wd:Nnw on line ...
+Defining \hbox_gset_to_wd:Nnw on line ...
+Defining \hbox_set_to_wd:cnw on line ...
+Defining \hbox_gset_to_wd:cnw on line ...
 Defining \hbox_to_wd:nn on line ...
 Defining \hbox_to_zero:n on line ...
 Defining \hbox_overlap_left:n on line ...
@@ -5079,6 +5083,10 @@ Defining \vbox_set:cw on line ...
 Defining \vbox_gset:cw on line ...
 Defining \vbox_set_end: on line ...
 Defining \vbox_gset_end: on line ...
+Defining \vbox_set_to_ht:Nnw on line ...
+Defining \vbox_gset_to_ht:Nnw on line ...
+Defining \vbox_set_to_ht:cnw on line ...
+Defining \vbox_gset_to_ht:cnw on line ...
 Defining \vbox_unpack:N on line ...
 Defining \vbox_unpack_clear:N on line ...
 Defining \vbox_unpack:c on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index e983239..6fd1eee 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -5049,6 +5049,10 @@ Defining \hbox_set:cw on line ...
 Defining \hbox_gset:cw on line ...
 Defining \hbox_set_end: on line ...
 Defining \hbox_gset_end: on line ...
+Defining \hbox_set_to_wd:Nnw on line ...
+Defining \hbox_gset_to_wd:Nnw on line ...
+Defining \hbox_set_to_wd:cnw on line ...
+Defining \hbox_gset_to_wd:cnw on line ...
 Defining \hbox_to_wd:nn on line ...
 Defining \hbox_to_zero:n on line ...
 Defining \hbox_overlap_left:n on line ...
@@ -5079,6 +5083,10 @@ Defining \vbox_set:cw on line ...
 Defining \vbox_gset:cw on line ...
 Defining \vbox_set_end: on line ...
 Defining \vbox_gset_end: on line ...
+Defining \vbox_set_to_ht:Nnw on line ...
+Defining \vbox_gset_to_ht:Nnw on line ...
+Defining \vbox_set_to_ht:cnw on line ...
+Defining \vbox_gset_to_ht:cnw on line ...
 Defining \vbox_unpack:N on line ...
 Defining \vbox_unpack_clear:N on line ...
 Defining \vbox_unpack:c on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index 952c768..c06fe5b 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -5047,6 +5047,10 @@ Defining \hbox_set:cw on line ...
 Defining \hbox_gset:cw on line ...
 Defining \hbox_set_end: on line ...
 Defining \hbox_gset_end: on line ...
+Defining \hbox_set_to_wd:Nnw on line ...
+Defining \hbox_gset_to_wd:Nnw on line ...
+Defining \hbox_set_to_wd:cnw on line ...
+Defining \hbox_gset_to_wd:cnw on line ...
 Defining \hbox_to_wd:nn on line ...
 Defining \hbox_to_zero:n on line ...
 Defining \hbox_overlap_left:n on line ...
@@ -5077,6 +5081,10 @@ Defining \vbox_set:cw on line ...
 Defining \vbox_gset:cw on line ...
 Defining \vbox_set_end: on line ...
 Defining \vbox_gset_end: on line ...
+Defining \vbox_set_to_ht:Nnw on line ...
+Defining \vbox_gset_to_ht:Nnw on line ...
+Defining \vbox_set_to_ht:cnw on line ...
+Defining \vbox_gset_to_ht:cnw on line ...
 Defining \vbox_unpack:N on line ...
 Defining \vbox_unpack_clear:N on line ...
 Defining \vbox_unpack:c on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index f4d6555..1094d17 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -5037,6 +5037,10 @@ Defining \hbox_set:cw on line ...
 Defining \hbox_gset:cw on line ...
 Defining \hbox_set_end: on line ...
 Defining \hbox_gset_end: on line ...
+Defining \hbox_set_to_wd:Nnw on line ...
+Defining \hbox_gset_to_wd:Nnw on line ...
+Defining \hbox_set_to_wd:cnw on line ...
+Defining \hbox_gset_to_wd:cnw on line ...
 Defining \hbox_to_wd:nn on line ...
 Defining \hbox_to_zero:n on line ...
 Defining \hbox_overlap_left:n on line ...
@@ -5067,6 +5071,10 @@ Defining \vbox_set:cw on line ...
 Defining \vbox_gset:cw on line ...
 Defining \vbox_set_end: on line ...
 Defining \vbox_gset_end: on line ...
+Defining \vbox_set_to_ht:Nnw on line ...
+Defining \vbox_gset_to_ht:Nnw on line ...
+Defining \vbox_set_to_ht:cnw on line ...
+Defining \vbox_gset_to_ht:cnw on line ...
 Defining \vbox_unpack:N on line ...
 Defining \vbox_unpack_clear:N on line ...
 Defining \vbox_unpack:c on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 717a897..88a09bf 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -5060,6 +5060,10 @@ Defining \hbox_set:cw on line ...
 Defining \hbox_gset:cw on line ...
 Defining \hbox_set_end: on line ...
 Defining \hbox_gset_end: on line ...
+Defining \hbox_set_to_wd:Nnw on line ...
+Defining \hbox_gset_to_wd:Nnw on line ...
+Defining \hbox_set_to_wd:cnw on line ...
+Defining \hbox_gset_to_wd:cnw on line ...
 Defining \hbox_to_wd:nn on line ...
 Defining \hbox_to_zero:n on line ...
 Defining \hbox_overlap_left:n on line ...
@@ -5090,6 +5094,10 @@ Defining \vbox_set:cw on line ...
 Defining \vbox_gset:cw on line ...
 Defining \vbox_set_end: on line ...
 Defining \vbox_gset_end: on line ...
+Defining \vbox_set_to_ht:Nnw on line ...
+Defining \vbox_gset_to_ht:Nnw on line ...
+Defining \vbox_set_to_ht:cnw on line ...
+Defining \vbox_gset_to_ht:cnw on line ...
 Defining \vbox_unpack:N on line ...
 Defining \vbox_unpack_clear:N on line ...
 Defining \vbox_unpack:c on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index f96c7df..5616a0c 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -5050,6 +5050,10 @@ Defining \hbox_set:cw on line ...
 Defining \hbox_gset:cw on line ...
 Defining \hbox_set_end: on line ...
 Defining \hbox_gset_end: on line ...
+Defining \hbox_set_to_wd:Nnw on line ...
+Defining \hbox_gset_to_wd:Nnw on line ...
+Defining \hbox_set_to_wd:cnw on line ...
+Defining \hbox_gset_to_wd:cnw on line ...
 Defining \hbox_to_wd:nn on line ...
 Defining \hbox_to_zero:n on line ...
 Defining \hbox_overlap_left:n on line ...
@@ -5080,6 +5084,10 @@ Defining \vbox_set:cw on line ...
 Defining \vbox_gset:cw on line ...
 Defining \vbox_set_end: on line ...
 Defining \vbox_gset_end: on line ...
+Defining \vbox_set_to_ht:Nnw on line ...
+Defining \vbox_gset_to_ht:Nnw on line ...
+Defining \vbox_set_to_ht:cnw on line ...
+Defining \vbox_gset_to_ht:cnw on line ...
 Defining \vbox_unpack:N on line ...
 Defining \vbox_unpack_clear:N on line ...
 Defining \vbox_unpack:c on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index 8ebd28f..f201b2e 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -5050,6 +5050,10 @@ Defining \hbox_set:cw on line ...
 Defining \hbox_gset:cw on line ...
 Defining \hbox_set_end: on line ...
 Defining \hbox_gset_end: on line ...
+Defining \hbox_set_to_wd:Nnw on line ...
+Defining \hbox_gset_to_wd:Nnw on line ...
+Defining \hbox_set_to_wd:cnw on line ...
+Defining \hbox_gset_to_wd:cnw on line ...
 Defining \hbox_to_wd:nn on line ...
 Defining \hbox_to_zero:n on line ...
 Defining \hbox_overlap_left:n on line ...
@@ -5080,6 +5084,10 @@ Defining \vbox_set:cw on line ...
 Defining \vbox_gset:cw on line ...
 Defining \vbox_set_end: on line ...
 Defining \vbox_gset_end: on line ...
+Defining \vbox_set_to_ht:Nnw on line ...
+Defining \vbox_gset_to_ht:Nnw on line ...
+Defining \vbox_set_to_ht:cnw on line ...
+Defining \vbox_gset_to_ht:cnw on line ...
 Defining \vbox_unpack:N on line ...
 Defining \vbox_unpack_clear:N on line ...
 Defining \vbox_unpack:c on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index 09bdaea..8a660ca 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -5048,6 +5048,10 @@ Defining \hbox_set:cw on line ...
 Defining \hbox_gset:cw on line ...
 Defining \hbox_set_end: on line ...
 Defining \hbox_gset_end: on line ...
+Defining \hbox_set_to_wd:Nnw on line ...
+Defining \hbox_gset_to_wd:Nnw on line ...
+Defining \hbox_set_to_wd:cnw on line ...
+Defining \hbox_gset_to_wd:cnw on line ...
 Defining \hbox_to_wd:nn on line ...
 Defining \hbox_to_zero:n on line ...
 Defining \hbox_overlap_left:n on line ...
@@ -5078,6 +5082,10 @@ Defining \vbox_set:cw on line ...
 Defining \vbox_gset:cw on line ...
 Defining \vbox_set_end: on line ...
 Defining \vbox_gset_end: on line ...
+Defining \vbox_set_to_ht:Nnw on line ...
+Defining \vbox_gset_to_ht:Nnw on line ...
+Defining \vbox_set_to_ht:cnw on line ...
+Defining \vbox_gset_to_ht:cnw on line ...
 Defining \vbox_unpack:N on line ...
 Defining \vbox_unpack_clear:N on line ...
 Defining \vbox_unpack:c on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index d6befd0..1b5d9c0 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -5038,6 +5038,10 @@ Defining \hbox_set:cw on line ...
 Defining \hbox_gset:cw on line ...
 Defining \hbox_set_end: on line ...
 Defining \hbox_gset_end: on line ...
+Defining \hbox_set_to_wd:Nnw on line ...
+Defining \hbox_gset_to_wd:Nnw on line ...
+Defining \hbox_set_to_wd:cnw on line ...
+Defining \hbox_gset_to_wd:cnw on line ...
 Defining \hbox_to_wd:nn on line ...
 Defining \hbox_to_zero:n on line ...
 Defining \hbox_overlap_left:n on line ...
@@ -5068,6 +5072,10 @@ Defining \vbox_set:cw on line ...
 Defining \vbox_gset:cw on line ...
 Defining \vbox_set_end: on line ...
 Defining \vbox_gset_end: on line ...
+Defining \vbox_set_to_ht:Nnw on line ...
+Defining \vbox_gset_to_ht:Nnw on line ...
+Defining \vbox_set_to_ht:cnw on line ...
+Defining \vbox_gset_to_ht:cnw on line ...
 Defining \vbox_unpack:N on line ...
 Defining \vbox_unpack_clear:N on line ...
 Defining \vbox_unpack:c on line ...

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list