summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/sttools
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-04-24 20:55:21 +0000
committerKarl Berry <karl@freefriends.org>2014-04-24 20:55:21 +0000
commit65c3e05fb1c80b23ce47a1cc4f4e5f5cbab6bd0b (patch)
tree598e0a451de3b833184a7ee75de5069a12958236 /Master/texmf-dist/source/latex/sttools
parent6490b40d995e58060dcfc70648e086ff431bc8c3 (diff)
sttools (24apr14)
git-svn-id: svn://tug.org/texlive/trunk@33669 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/sttools')
-rw-r--r--Master/texmf-dist/source/latex/sttools/flushend.dtx22
1 files changed, 15 insertions, 7 deletions
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 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{flushend}
%<*package>
- [2014/03/18 v2.1 Balancing columns in twocolumn mode]
+ [2014/04/24 v2.2 Balancing columns in twocolumn mode]
%</package>
%
%<*driver>
@@ -59,7 +59,7 @@
%</driver>
% \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}
%