[latex3-commits] [git/LaTeX3-latex3-latex2e] master: Fix for issue #53 (6da3db0)

Frank Mittelbach frank.mittelbach at latex-project.org
Tue Jun 26 12:37:57 CEST 2018


Repository : https://github.com/latex3/latex2e
On branch  : master
Link       : https://github.com/latex3/latex2e/commit/6da3db08da0c66558631f283f71cbec85b073e9b

>---------------------------------------------------------------

commit 6da3db08da0c66558631f283f71cbec85b073e9b
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Tue Jun 26 12:37:57 2018 +0200

    Fix for issue #53


>---------------------------------------------------------------

6da3db08da0c66558631f283f71cbec85b073e9b
 required/tools/changes.txt               |    6 ++
 required/tools/multicol.dtx              |   22 +++-
 required/tools/testfiles/github-0053.lvt |   41 +++++++
 required/tools/testfiles/github-0053.tlg |  172 ++++++++++++++++++++++++++++++
 4 files changed, 238 insertions(+), 3 deletions(-)

diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index b4ae449..5f1af86 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -5,6 +5,12 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2018-06-26  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* multicol.dtx (subsection{Not balancing the columns}):
+	Re-add end penalty for multicols* environment to guard
+	against leftovers (git/53)
+
 2018-04-30  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* array.dtx Explicity place the row strut inside \\ before
diff --git a/required/tools/multicol.dtx b/required/tools/multicol.dtx
index b347d3e..0b72a3f 100644
--- a/required/tools/multicol.dtx
+++ b/required/tools/multicol.dtx
@@ -98,7 +98,7 @@
 %<driver> \ProvidesFile{multicol.drv}
 % \fi
 %         \ProvidesFile{multicol.dtx}
-          [2018/04/20 v1.8s  multicolumn formatting (FMi)]
+          [2018/06/26 v1.8t  multicolumn formatting (FMi)]
 %
 %
 %%
@@ -3899,8 +3899,24 @@
         not make sense.\MessageBreak
         Going to balance anyway}%
    \else
-     \let\balance at columns@out
-         \multi at column@out
+%    \end{macrocode}
+%    If we aren't balancing we change the |\balance at columns@out| to
+%    work like the normal output routine that cuts normal
+%    pages. However, there is a catch: In case the last page we cut
+%    (after seeing the end of the environment) is actually larger than
+%    a page (for example, if it contains more |\columnbreak| commands
+%    than columns) we end up with some leftover material that is
+%    returned to the main galley, but now the environment end penalty
+%    is missing. So we add another one here too. Of course that
+%    shouldn't be done if there is really only a single final page,
+%    but fortunately in that case we have just finished a page and any
+%    penalty on the recent contributions will be discarded, thus the
+%    extra one is harmless---puh.
+% \changes{v1.8t}{2018/06/26}{Re-add end penalty for
+%    \texttt{multicols*} environment to guard against leftovers (git/53)}
+%    \begin{macrocode}
+     \def\balance at columns@out
+         {\multi at column@out \penalty-\@Mvi }%
    \fi
    \begin{multicols}
 }
diff --git a/required/tools/testfiles/github-0053.lvt b/required/tools/testfiles/github-0053.lvt
new file mode 100644
index 0000000..964cc7a
--- /dev/null
+++ b/required/tools/testfiles/github-0053.lvt
@@ -0,0 +1,41 @@
+% https://github.com/latex3/latex2e/issues/53
+%
+% we should not loose the middle pages, nor should there be a problem after the environment
+
+\documentclass[a4paper]{article}
+\usepackage{multicol}
+
+\input{test2e}
+
+\showoutput
+
+\begin{document}
+
+\START
+
+\begin{multicols*}{2}
+
+\columnbreak
+C1
+
+\columnbreak
+C2
+
+\columnbreak
+C3
+
+\columnbreak
+C4
+
+\columnbreak
+C5
+
+\end{multicols*}
+
+Some more text
+
+\end{document}
+
+
+
+
diff --git a/required/tools/testfiles/github-0053.tlg b/required/tools/testfiles/github-0053.tlg
new file mode 100644
index 0000000..3cd9085
--- /dev/null
+++ b/required/tools/testfiles/github-0053.tlg
@@ -0,0 +1,172 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+Completed box being shipped out [1]
+\vbox(682.0+0.0)x398.0
+.\glue 17.0
+.\vbox(665.0+0.0)x345.0, shifted 53.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(598.0+0.0)x345.0
+...\write-{}
+...\glue(\topskip) 0.0
+...\hbox(598.0+1.94444)x345.0, glue set 5.0fil
+....\vbox(598.0+0.0)x167.5
+.....\glue(\topskip) 3.16669
+.....\hbox(6.83331+0.0)x167.5, glue set 140.27776fil
+......\hbox(0.0+0.0)x15.0
+......\OT1/cmr/m/n/10 C
+......\OT1/cmr/m/n/10 1
+......\penalty 10000
+......\glue(\parfillskip) 0.0 plus 1.0fil
+......\glue(\rightskip) 0.0
+.....\kern 0.0
+....\glue 0.0 plus 1.0fil minus 1.0fil
+....\rule(*+*)x0.0
+....\glue 0.0 plus 1.0fil minus 1.0fil
+....\vbox(598.0+0.0)x167.5
+.....\glue(\splittopskip) 3.16669
+.....\hbox(6.83331+0.0)x167.5, glue set 140.27776fil
+......\hbox(0.0+0.0)x15.0
+......\OT1/cmr/m/n/10 C
+......\OT1/cmr/m/n/10 2
+......\penalty 10000
+......\glue(\parfillskip) 0.0 plus 1.0fil
+......\glue(\rightskip) 0.0
+.....\kern 0.0
+....\hbox(4.30554+1.94444)x0.0, glue set - 5.55557fil
+.....\hbox(4.30554+1.94444)x5.55557
+.....\glue 0.0 plus 1.0fil minus 1.0fil
+...\kern -1.94444
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+...\glue 0.0 plus 1.0fil
+...\OT1/cmr/m/n/10 1
+...\glue 0.0 plus 1.0fil
+Completed box being shipped out [2]
+\vbox(682.0+0.0)x398.0
+.\glue 17.0
+.\vbox(665.0+0.0)x345.0, shifted 53.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(598.0+0.0)x345.0
+...\hbox(598.0+1.94444)x345.0, glue set 5.0fil
+....\vbox(598.0+0.0)x167.5
+.....\glue(\topskip) 3.16669
+.....\hbox(6.83331+0.0)x167.5, glue set 140.27776fil
+......\hbox(0.0+0.0)x15.0
+......\OT1/cmr/m/n/10 C
+......\OT1/cmr/m/n/10 3
+......\penalty 10000
+......\glue(\parfillskip) 0.0 plus 1.0fil
+......\glue(\rightskip) 0.0
+.....\kern 0.0
+.....\kern 0.0
+....\glue 0.0 plus 1.0fil minus 1.0fil
+....\rule(*+*)x0.0
+....\glue 0.0 plus 1.0fil minus 1.0fil
+....\vbox(598.0+0.0)x167.5
+.....\glue(\splittopskip) 3.16669
+.....\hbox(6.83331+0.0)x167.5, glue set 140.27776fil
+......\hbox(0.0+0.0)x15.0
+......\OT1/cmr/m/n/10 C
+......\OT1/cmr/m/n/10 4
+......\penalty 10000
+......\glue(\parfillskip) 0.0 plus 1.0fil
+......\glue(\rightskip) 0.0
+.....\kern 0.0
+.....\kern 0.0
+....\hbox(4.30554+1.94444)x0.0, glue set - 5.55557fil
+.....\hbox(4.30554+1.94444)x5.55557
+.....\glue 0.0 plus 1.0fil minus 1.0fil
+...\kern -1.94444
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+...\glue 0.0 plus 1.0fil
+...\OT1/cmr/m/n/10 2
+...\glue 0.0 plus 1.0fil
+Completed box being shipped out [3]
+\vbox(682.0+0.0)x398.0
+.\glue 17.0
+.\vbox(665.0+0.0)x345.0, shifted 53.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(598.0+0.0)x345.0
+...\hbox(598.0+1.94444)x345.0, glue set 5.0fil
+....\vbox(598.0+0.0)x167.5, glue set 588.0fil
+.....\glue(\topskip) 3.16669
+.....\hbox(6.83331+0.0)x167.5, glue set 140.27776fil
+......\hbox(0.0+0.0)x15.0
+......\OT1/cmr/m/n/10 C
+......\OT1/cmr/m/n/10 5
+......\penalty 10000
+......\glue(\parfillskip) 0.0 plus 1.0fil
+......\glue(\rightskip) 0.0
+.....\glue 0.0 plus 1.0fil
+.....\penalty 0
+....\glue 0.0 plus 1.0fil minus 1.0fil
+....\rule(*+*)x0.0
+....\glue 0.0 plus 1.0fil minus 1.0fil
+....\vbox(598.0+0.0)x167.5
+....\hbox(4.30554+1.94444)x0.0, glue set - 5.55557fil
+.....\hbox(4.30554+1.94444)x5.55557
+.....\glue 0.0 plus 1.0fil minus 1.0fil
+...\kern -1.94444
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+...\glue 0.0 plus 1.0fil
+...\OT1/cmr/m/n/10 3
+...\glue 0.0 plus 1.0fil
+Completed box being shipped out [4]
+\vbox(682.0+0.0)x398.0
+.\glue 17.0
+.\vbox(665.0+0.0)x345.0, shifted 53.0
+..\vbox(12.0+0.0)x345.0, glue set 12.0fil
+...\glue 0.0 plus 1.0fil
+...\hbox(0.0+0.0)x345.0
+..\glue 25.0
+..\glue(\lineskip) 0.0
+..\vbox(598.0+0.0)x345.0, glue set 587.9372fil
+...\glue(\topskip) 3.16669
+...\hbox(6.83331+0.0)x345.0, glue set 260.80542fil
+....\hbox(0.0+0.0)x15.0
+....\OT1/cmr/m/n/10 S
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 e
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 m
+....\OT1/cmr/m/n/10 o
+....\OT1/cmr/m/n/10 r
+....\OT1/cmr/m/n/10 e
+....\glue 3.33333 plus 1.66666 minus 1.11111
+....\OT1/cmr/m/n/10 t
+....\OT1/cmr/m/n/10 e
+....\OT1/cmr/m/n/10 x
+....\OT1/cmr/m/n/10 t
+....\penalty 10000
+....\glue(\parfillskip) 0.0 plus 1.0fil
+....\glue(\rightskip) 0.0
+...\glue 0.0 plus 1.0fil
+...\glue 0.0
+...\glue 0.0 plus 0.0001fil
+..\glue(\baselineskip) 23.55556
+..\hbox(6.44444+0.0)x345.0, glue set 170.0fil
+...\glue 0.0 plus 1.0fil
+...\OT1/cmr/m/n/10 4
+...\glue 0.0 plus 1.0fil
+(github-0053.aux)





More information about the latex3-commits mailing list