diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3box.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3box.dtx | 65 |
1 files changed, 45 insertions, 20 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx index 7b27571dee6..4a1d1b34627 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx @@ -41,7 +41,7 @@ % }^^A % } % -% \date{Released 2017/07/15} +% \date{Released 2017/07/19} % % \maketitle % @@ -536,22 +536,22 @@ % \meta{dimexpr} and then stores the result inside the \meta{box}. % \end{function} % -% \begin{function}[updated = 2017-04-058] -% { -% \vbox_set:Nw, \vbox_set:cw, -% \vbox_set_end:, -% \vbox_gset:Nw, \vbox_gset:cw, -% \vbox_gset_end: -% } -% \begin{syntax} -% \cs{vbox_set:Nw} \meta{box} \meta{contents} \cs{vbox_set_end:} -% \end{syntax} -% Typesets the \meta{contents} at natural height and then stores the -% result inside the \meta{box}. In contrast -% to \cs{vbox_set:Nn} 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 = 2017-04-05] +% { +% \vbox_set:Nw, \vbox_set:cw, +% \vbox_set_end:, +% \vbox_gset:Nw, \vbox_gset:cw, +% \vbox_gset_end: +% } +% \begin{syntax} +% \cs{vbox_set:Nw} \meta{box} \meta{contents} \cs{vbox_set_end:} +% \end{syntax} +% Typesets the \meta{contents} at natural height and then stores the +% result inside the \meta{box}. In contrast +% to \cs{vbox_set:Nn} 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}[added = 2017-06-08] % { @@ -944,13 +944,18 @@ % \begin{macro}{\box_set_ht:Nn, \box_set_ht:cn} % \begin{macro}{\box_set_dp:Nn, \box_set_dp:cn} % \begin{macro}{\box_set_wd:Nn, \box_set_wd:cn} -% Measuring is easy: all primitive work. These primitives are not +% Setting the size is easy: all primitive work. These primitives are not % expandable, so the derived functions are not either. +% When debugging, the dimension expression |#2| is surrounded by +% parentheses to catch early termination. % \begin{macrocode} +\__debug_patch_args:nNNpn { {#1} { (#2) } } \cs_new_protected:Npn \box_set_dp:Nn #1#2 { \box_dp:N #1 \__dim_eval:w #2 \__dim_eval_end: } +\__debug_patch_args:nNNpn { {#1} { (#2) } } \cs_new_protected:Npn \box_set_ht:Nn #1#2 { \box_ht:N #1 \__dim_eval:w #2 \__dim_eval_end: } +\__debug_patch_args:nNNpn { {#1} { (#2) } } \cs_new_protected:Npn \box_set_wd:Nn #1#2 { \box_wd:N #1 \__dim_eval:w #2 \__dim_eval_end: } \cs_generate_variant:Nn \box_set_ht:Nn { c } @@ -980,13 +985,19 @@ % \begin{macro}{\box_move_up:nn, \box_move_down:nn} % \testfile* % Move box material in different directions. +% When debugging, the dimension expression |#1| is surrounded by +% parentheses to catch early termination. % \begin{macrocode} +\__debug_patch_args:nNNpn { { (#1) } {#2} } \cs_new_protected:Npn \box_move_left:nn #1#2 { \tex_moveleft:D \__dim_eval:w #1 \__dim_eval_end: #2 } +\__debug_patch_args:nNNpn { { (#1) } {#2} } \cs_new_protected:Npn \box_move_right:nn #1#2 { \tex_moveright:D \__dim_eval:w #1 \__dim_eval_end: #2 } +\__debug_patch_args:nNNpn { { (#1) } {#2} } \cs_new_protected:Npn \box_move_up:nn #1#2 { \tex_raise:D \__dim_eval:w #1 \__dim_eval_end: #2 } +\__debug_patch_args:nNNpn { { (#1) } {#2} } \cs_new_protected:Npn \box_move_down:nn #1#2 { \tex_lower:D \__dim_eval:w #1 \__dim_eval_end: #2 } % \end{macrocode} @@ -1183,7 +1194,9 @@ % \begin{macro}{\hbox_gset_to_wd:Nnn, \hbox_gset_to_wd:cnn} % \testfile* % Storing material in a horizontal box with a specified width. +% Again, put the dimension expression in parentheses when debugging. % \begin{macrocode} +\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} } \cs_new_protected:Npn \hbox_set_to_wd:Nnn #1#2#3 { \tex_setbox:D #1 \tex_hbox:D to \__dim_eval:w #2 \__dim_eval_end: @@ -1229,6 +1242,7 @@ % \begin{macro}{\hbox_gset_to_wd:Nnw, \hbox_gset_to_wd:cnw} % Combining the above ideas. % \begin{macrocode} +\__debug_patch_args:nNNpn { {#1} { (#2) } } \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: @@ -1248,6 +1262,7 @@ % \testfile* % Put a horizontal box directly into the input stream. % \begin{macrocode} +\__debug_patch_args:nNNpn { { (#1) } {#2} } \cs_new_protected:Npn \hbox_to_wd:nn #1#2 { \tex_hbox:D to \__dim_eval:w #1 \__dim_eval_end: @@ -1308,6 +1323,7 @@ % \testfile* % Put a vertical box directly into the input stream. % \begin{macrocode} +\__debug_patch_args:nNNpn { { (#1) } {#2} } \cs_new_protected:Npn \vbox_to_ht:nn #1#2 { \tex_vbox:D to \__dim_eval:w #1 \__dim_eval_end: @@ -1363,6 +1379,7 @@ % \testfile* % Storing material in a vertical box with a specified height. % \begin{macrocode} +\__debug_patch_args:nNNpn { {#1} { (#2) } {#3} } \cs_new_protected:Npn \vbox_set_to_ht:Nnn #1#2#3 { \tex_setbox:D #1 \tex_vbox:D to \__dim_eval:w #2 \__dim_eval_end: @@ -1409,6 +1426,7 @@ % \begin{macro}{\vbox_gset_to_ht:Nnw, \vbox_gset_to_ht:cnw} % A combination of the above ideas. % \begin{macrocode} +\__debug_patch_args:nNNpn { {#1} { (#2) } } \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: @@ -1440,6 +1458,7 @@ % \testfile* % Splitting a vertical box in two. % \begin{macrocode} +\__debug_patch_args:nNNpn { {#1} {#2} { (#3) } } \cs_new_protected:Npn \vbox_set_split_to_ht:NNn #1#2#3 { \tex_setbox:D #1 \tex_vsplit:D #2 to \__dim_eval:w #3 \__dim_eval_end: } % \end{macrocode} @@ -1984,8 +2003,14 @@ % % \begin{macro}[deprecated = 2018-12-31]{\box_resize:Nnn, \box_resize:cnn} % \begin{macrocode} -\cs_new_eq:NN \box_resize:Nnn \box_resize_to_wd_and_ht_plus_dp:Nnn -\cs_new_eq:NN \box_resize:cnn \box_resize_to_wd_and_ht_plus_dp:cnn +\__debug_deprecation:nnNNpn + { 2018-12-31 } { \box_resize_to_wd_and_ht_plus_dp:Nnn } +\cs_new_protected:Npn \box_resize:Nnn + { \box_resize_to_wd_and_ht_plus_dp:Nnn } +\__debug_deprecation:nnNNpn + { 2018-12-31 } { \box_resize_to_wd_and_ht_plus_dp:cnn } +\cs_new_protected:Npn \box_resize:cnn + { \box_resize_to_wd_and_ht_plus_dp:cnn } % \end{macrocode} % \end{macro} % |