From 65c3e05fb1c80b23ce47a1cc4f4e5f5cbab6bd0b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 24 Apr 2014 20:55:21 +0000 Subject: sttools (24apr14) git-svn-id: svn://tug.org/texlive/trunk@33669 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/sttools/flushend.dtx | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'Master/texmf-dist/source/latex/sttools') diff --git a/Master/texmf-dist/source/latex/sttools/flushend.dtx b/Master/texmf-dist/source/latex/sttools/flushend.dtx index e2ca6861b07..21aacf2b6a4 100644 --- a/Master/texmf-dist/source/latex/sttools/flushend.dtx +++ b/Master/texmf-dist/source/latex/sttools/flushend.dtx @@ -42,7 +42,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{flushend} %<*package> - [2014/03/18 v2.1 Balancing columns in twocolumn mode] + [2014/04/24 v2.2 Balancing columns in twocolumn mode] % % %<*driver> @@ -59,7 +59,7 @@ % % \fi % -% \CheckSum{1306} +% \CheckSum{1312} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -84,6 +84,7 @@ % \changes{v1.1}{2012/05/29}{Converted to DTX file} % \changes{v2.0}{2014/03/03}{rewritten with new balance algorithm} % \changes{v2.1}{2014/03/18}{Switched debug option off} +% \changes{v2.2}{2014/04/24}{bugfix version: removing empty box at the right column end} % % \DoNotIndex{\newcommand,\newenvironment} % @@ -229,15 +230,22 @@ % \begin{macro}{\remove@lastbox@at@balancing} % It is used to remove empty box at the right column end. % \begin{macrocode} -\gdef\remove@lastbox@at@balancing{% - \unskip\unkern\unpenalty - \unskip\unkern\unpenalty - \unskip\unkern\unpenalty - {\setbox\z@\lastbox}% +\def\unskip@three@kern@penalty{% \unskip\unkern\unpenalty \unskip\unkern\unpenalty \unskip\unkern\unpenalty } +\gdef\remove@lastbox@at@balancing{% + \unskip@three@kern@penalty + \bgroup + \setbox\z@\lastbox + \ifdim\wd\z@>\z@ + \box\z@ + \else + \aftergroup\unskip@three@kern@penalty + \fi + \egroup + } % \end{macrocode} % \end{macro} % -- cgit v1.2.3