From 2a5626b4b8303a76afa1948418fbd85b6e0ac566 Mon Sep 17 00:00:00 2001 From: David Carlisle Date: Tue, 14 Nov 2023 19:23:02 +0000 Subject: [PATCH] improve infinite glue shrinkage log message --- base/ltmarks.dtx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/base/ltmarks.dtx b/base/ltmarks.dtx index c5cbded78..d523df58c 100644 --- a/base/ltmarks.dtx +++ b/base/ltmarks.dtx @@ -898,6 +898,16 @@ % \begin{macro}{@@_prepare_and_extract:nnn} % % \begin{macrocode} +\cs_set_eq:cN{Ignore~infinite~glue~shrinkage~error}\c_max_dim +% \end{macrocode} +% \begin{macrocode} +\cs_new_protected:Npx \@@_vbox_set_split_to_maxdimen:NN #1#2 + { \tex_setbox:D #1 \tex_vsplit:D #2 to \exp_not:N\use:n{ + \use:c{Ignore~infinite~glue~shrinkage~error} + } + } +% \end{macrocode} +% \begin{macrocode} \cs_new_protected:Npn \@@_prepare_and_extract:nnn #1#2#3 { % \end{macrocode} % @@ -982,17 +992,17 @@ % \TeX{} error. Unfortunately this is something one cannot always % prevent. For example if there is infinite negative glue that is % canceled by infinite positive glue then we can't detect this case. -% however the splitting operation will balk, because it goes throw +% however the splitting operation will balk, because it goes through % the vertical material item by item and complains the moment it % finds any negative infinite glue, even though it is a harmless -% one if the material whole is considered as a whole. +% one if the material is considered as a whole. % We therefore, change the interaction mode, so that such errors % appear in the log, but do not stop the processing. % \begin{macrocode} \tl_set:Ne \l_@@_interaction_tl { \interactionmode \the\interactionmode\relax } - \interactionmode 0 - \vbox_set_split_to_ht:NNn \l_@@_ii_box \l_@@_box \c_max_dim + \interactionmode 0\scan_stop: + \@@_vbox_set_split_to_maxdimen:NN \l_@@_ii_box \l_@@_box \l_@@_interaction_tl % \end{macrocode} % After splitting we check if there is anything left in