[latex3-commits] [latex3/latex2e] ltmarks-enhance: much simpler this way now (and the marks always correct) documentation not yet updated and old code still mostly inside commented out (9963c28b)
github at latex-project.org
github at latex-project.org
Tue Nov 14 23:11:04 CET 2023
Repository : https://github.com/latex3/latex2e
On branch : ltmarks-enhance
Link : https://github.com/latex3/latex2e/commit/9963c28bf4d7038ca4cbb251eb3a95bef78cb070
>---------------------------------------------------------------
commit 9963c28bf4d7038ca4cbb251eb3a95bef78cb070
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Tue Nov 14 23:11:04 2023 +0100
much simpler this way now (and the marks always correct)
documentation not yet updated and old code still mostly inside commented out
>---------------------------------------------------------------
9963c28bf4d7038ca4cbb251eb3a95bef78cb070
base/ltmarks.dtx | 30 +++++++++++---------
base/testfiles-ltmarks/xmarks-009.tlg | 53 ++++++++++++++++++++++-------------
2 files changed, 50 insertions(+), 33 deletions(-)
diff --git a/base/ltmarks.dtx b/base/ltmarks.dtx
index f976e32a..dc583510 100644
--- a/base/ltmarks.dtx
+++ b/base/ltmarks.dtx
@@ -919,7 +919,7 @@
% infinite shrinkage in all cases, e.g., if there are several glues
% that cancel each other, but it is the best we can do.
% \begin{macrocode}
- \vbox_set_to_ht:Nnn \l_@@_box { -.5\c_max_dim }
+ \vbox_set:Nn \l_@@_box
{
#3
\tex_unskip:D
@@ -942,12 +942,12 @@
% check whether it contains infinitely shrinkable glue, using the
% same trick as before.
% \begin{macrocode}
- \vbox_set_to_ht:Nnn \l_@@_box { -.5\c_max_dim }
- {
- \vbox_unpack:N \l_@@_box
- \tex_kern:D \c_zero_dim % ensure that box
- % is not empty
- }
+% \vbox_set_to_ht:Nnn \l_@@_box { -.5\c_max_dim }
+% {
+% \vbox_unpack:N \l_@@_box
+% \tex_kern:D \c_zero_dim % ensure that box
+% % is not empty
+% }
% \end{macrocode}
% If we don't detect infinite negative glue then we unpack the box. If
% we do, we ignore it for the process of mark extraction. However, we
@@ -955,8 +955,10 @@
% is an ordinary box, like a marginal, that does contain something
% like \tn{vss}.
% \begin{macrocode}
- \int_compare:nNnT \tex_badness:D > 0
- { \vbox_unpack:N \l_@@_box }
+% \int_compare:nNnT \tex_badness:D > 0
+% {
+ \vbox_unpack:N \l_@@_box
+% }
}
}
% \end{macrocode}
@@ -970,10 +972,10 @@
% infinite shrinking glue. A simple \tn{kern} is enough to avoid
% this (the same was already done above).
% \begin{macrocode}
- \tex_kern:D \c_zero_dim
+% \tex_kern:D \c_zero_dim
}
- \int_compare:nNnTF \tex_badness:D > 0
- {
+% \int_compare:nNnTF \tex_badness:D > 0
+% {
% \end{macrocode}
% If the box had no infinite shrinkage (or rather if our test
% didn't show any) we vsplit it. Note that it
@@ -1012,13 +1014,13 @@
{ \vbox_unpack:N \l_@@_ii_box
\vbox_unpack:N \l_@@_box }
}
- }
+% }
% \end{macrocode}
% If the badness was zero (we actually tested for${}>0$ but it
% can't get negative) then we had infinite shrinkage, so we execute
% the code that handles that case:
% \begin{macrocode}
- { #2 }
+% { #2 }
}
% \end{macrocode}
% \end{macro}
diff --git a/base/testfiles-ltmarks/xmarks-009.tlg b/base/testfiles-ltmarks/xmarks-009.tlg
index 9c6ee11e..71a9556d 100644
--- a/base/testfiles-ltmarks/xmarks-009.tlg
+++ b/base/testfiles-ltmarks/xmarks-009.tlg
@@ -70,14 +70,14 @@ Marks: set 2e-right <- 'E' on line ...
Marks: set 2e-right-nonempty <- 'E' on line ...
Marks: set 2e-right <- 'F' on line ...
Marks: set 2e-right-nonempty <- 'F' on line ...
-! LaTeX mark Error: Infinite shrinkage found in 'page' region.
-For immediate help type H <return>.
- ...
+Marks: mark extraction needs recursion on line ...
+! Infinite glue shrinkage found in box being split.
+<argument> Glue shrinkage error above ignored !
l. ... }
-This is a coding error.
-The mark region 'page' contains some infinite negative glue allowing it to
-shrink to an arbitrarily small size. This makes it impossible to split the
-region apart to get at its marks. They are lost.
+The box you are \vsplitting contains some infinitely
+shrinkable glue, e.g., `\vss' or `\vskip 0pt minus 1fil'.
+Such glue doesn't belong there; but you can safely proceed,
+since the offensive shrinkability has been made finite.
Marks: 2e-left after material with infinite glue:
page (current):||||
page (previous):||||
@@ -86,15 +86,15 @@ Marks: 2e-left after material with infinite glue:
column (first):||||
column (second):||||
Marks: 2e-right after material with infinite glue:
- page (current):|C|C|C|
- page (previous):||||
+ page (current):|C|D|F|
+ page (previous):||A|C|
column (previous):||||
column (current):||||
column (first):||||
column (second):||||
Marks: 2e-right-nonempty after material with infinite glue:
- page (current):|C|C|C|
- page (previous):||||
+ page (current):|C|D|F|
+ page (previous):||A|C|
column (previous):||||
column (current):||||
column (first):||||
@@ -134,15 +134,15 @@ Marks: 2e-left after material with canceling infinite glue:
column (first):||||
column (second):||||
Marks: 2e-right after material with canceling infinite glue:
- page (current):|C|G|I|
- page (previous):|C|C|C|
+ page (current):|F|G|I|
+ page (previous):|C|D|F|
column (previous):||||
column (current):||||
column (first):||||
column (second):||||
Marks: 2e-right-nonempty after material with canceling infinite glue:
- page (current):|C|G|I|
- page (previous):|C|C|C|
+ page (current):|F|G|I|
+ page (previous):|C|D|F|
column (previous):||||
column (current):||||
column (first):||||
@@ -187,11 +187,26 @@ Marks: set 2e-right <- 'B2' on line ...
Marks: set 2e-right-nonempty <- 'B2' on line ...
Marks: set 2e-right <- 'A3' on line ...
Marks: set 2e-right-nonempty <- 'A3' on line ...
-LaTeX mark Warning: Infinite shrinkage found in box material -- marks not
-(mark) extracted on line ...
-> \l_first_marks_tl=.
+Marks: mark extraction needs recursion on line ...
+! Infinite glue shrinkage found in box being split.
+<argument> Glue shrinkage error above ignored !
+l. ... \l_last_marks_tl
+The box you are \vsplitting contains some infinitely
+shrinkable glue, e.g., `\vss' or `\vskip 0pt minus 1fil'.
+Such glue doesn't belong there; but you can safely proceed,
+since the offensive shrinkability has been made finite.
+Marks: extract last mark for class '2e-left' = B1
+Marks: extract first mark for class '2e-left' = A1
+Marks: extract last mark for class '2e-right' = A3
+Marks: extract first mark for class '2e-right' = A2
+Marks: extract last mark for class '2e-right-nonempty' = A3
+Marks: extract first mark for class '2e-right-nonempty' = A2
+Marks: no marks for class 'unused' on line ...
+> \l_first_marks_tl=\mark_insert:nn {2e-left}{A1}\mark_insert:nn
+{2e-right}{A2}\mark_insert:nn {2e-right-nonempty}{A2}.
<recently read> }
l. ...\tl_show:N \l_first_marks_tl
-> \l_last_marks_tl=.
+> \l_last_marks_tl=\mark_insert:nn {2e-left}{B1}\mark_insert:nn
+{2e-right}{A3}\mark_insert:nn {2e-right-nonempty}{A3}.
<recently read> }
l. ...\tl_show:N \l_last_marks_tl
More information about the latex3-commits
mailing list.