diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3box.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3box.dtx | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx index 239228d0917..0b06dae64f2 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3box.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3box.dtx @@ -24,7 +24,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3box.dtx 6805 2016-12-28 22:15:52Z joseph $ +\GetIdInfo$Id: l3box.dtx 6943 2017-02-17 16:47:59Z bruno $ {L3 Experimental boxes} %</driver|package> %<*driver> @@ -915,13 +915,14 @@ % % \begin{macro}{\box_show:N, \box_show:c} % \begin{macro}{\box_show:Nnn, \box_show:cnn} -% Essentially a wrapper around the internal function. +% Essentially a wrapper around the internal function, but evaluating +% the breadth and depth arguments now outside the group. % \begin{macrocode} \cs_new_protected:Npn \box_show:N #1 { \box_show:Nnn #1 \c_max_int \c_max_int } \cs_generate_variant:Nn \box_show:N { c } -\cs_new_protected:Npn \box_show:Nnn - { \@@_show:NNnn \c_one } +\cs_new_protected:Npn \box_show:Nnn #1#2#3 + { \@@_show:NNff 1 #1 { \int_eval:n {#2} } { \int_eval:n {#3} } } \cs_generate_variant:Nn \box_show:Nnn { c } % \end{macrocode} % \end{macro} @@ -929,29 +930,28 @@ % % \begin{macro}{\box_log:N, \box_log:c} % \begin{macro}{\box_log:Nnn, \box_log:cnn} +% \begin{macro}[aux]{\@@_log:nNnn} % Getting \TeX{} to write to the log without interruption the run is done by % altering the interaction mode. For that, the \eTeX{} extensions are needed. % \begin{macrocode} \cs_new_protected:Npn \box_log:N #1 { \box_log:Nnn #1 \c_max_int \c_max_int } \cs_generate_variant:Nn \box_log:N { c } -\cs_new_protected:Npn \box_log:Nnn #1#2#3 +\cs_new_protected:Npn \box_log:Nnn + { \exp_args:No \@@_log:nNnn { \tex_the:D \etex_interactionmode:D } } +\cs_new_protected:Npn \@@_log:nNnn #1#2#3#4 { - \use:x - { - \etex_interactionmode:D \c_zero - \@@_show:NNnn \c_zero \exp_not:N #1 - { \int_eval:n {#2} } { \int_eval:n {#3} } - \etex_interactionmode:D - = \tex_the:D \etex_interactionmode:D \scan_stop: - } + \int_set:Nn \etex_interactionmode:D { 0 } + \@@_show:NNff 0 #2 { \int_eval:n {#3} } { \int_eval:n {#4} } + \int_set:Nn \etex_interactionmode:D {#1} } \cs_generate_variant:Nn \box_log:Nnn { c } % \end{macrocode} % \end{macro} % \end{macro} +% \end{macro} % -% \begin{macro}[aux]{\@@_show:NNnn} +% \begin{macro}[aux]{\@@_show:NNnn, \@@_show:NNff} % The internal auxiliary to actually do the output uses a group to deal % with breadth and depth values. The \cs{use:n} here gives better output % appearance. Setting \tn{tracingonline} and \tn{errorcontextlines} is @@ -959,19 +959,22 @@ % \begin{macrocode} \cs_new_protected:Npn \@@_show:NNnn #1#2#3#4 { - \group_begin: - \int_set:Nn \tex_showboxbreadth:D {#3} - \int_set:Nn \tex_showboxdepth:D {#4} - \int_set_eq:NN \tex_tracingonline:D #1 - \int_set:Nn \tex_errorcontextlines:D { - \c_one } - \box_if_exist:NTF #2 - { \tex_showbox:D \use:n {#2} } - { - \__msg_kernel_error:nnx { kernel } { variable-not-defined } - { \token_to_str:N #2 } - } - \group_end: + \box_if_exist:NTF #2 + { + \group_begin: + \int_set:Nn \tex_showboxbreadth:D {#3} + \int_set:Nn \tex_showboxdepth:D {#4} + \int_set:Nn \tex_tracingonline:D {#1} + \int_set:Nn \tex_errorcontextlines:D { -1 } + \tex_showbox:D \use:n {#2} + \group_end: + } + { + \__msg_kernel_error:nnx { kernel } { variable-not-defined } + { \token_to_str:N #2 } + } } +\cs_generate_variant:Nn \@@_show:NNnn { NNff } % \end{macrocode} % \end{macro} % |