texlive[74941] Master/texmf-dist: sttools (14apr25)
commits+karl at tug.org
commits+karl at tug.org
Mon Apr 14 21:50:09 CEST 2025
Revision: 74941
https://tug.org/svn/texlive?view=revision&revision=74941
Author: karl
Date: 2025-04-14 21:50:09 +0200 (Mon, 14 Apr 2025)
Log Message:
-----------
sttools (14apr25)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/sttools/README.md
trunk/Master/texmf-dist/doc/latex/sttools/cuted.pdf
trunk/Master/texmf-dist/doc/latex/sttools/flushend.pdf
trunk/Master/texmf-dist/doc/latex/sttools/stabular.pdf
trunk/Master/texmf-dist/doc/latex/sttools/sttools.pdf
trunk/Master/texmf-dist/source/latex/sttools/cuted.dtx
trunk/Master/texmf-dist/source/latex/sttools/flushend.dtx
trunk/Master/texmf-dist/source/latex/sttools/stabular.dtx
trunk/Master/texmf-dist/source/latex/sttools/sttools.dtx
trunk/Master/texmf-dist/tex/latex/sttools/cuted.sty
trunk/Master/texmf-dist/tex/latex/sttools/flushend.sty
trunk/Master/texmf-dist/tex/latex/sttools/stabular.sty
Modified: trunk/Master/texmf-dist/doc/latex/sttools/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/sttools/README.md 2025-04-14 19:49:54 UTC (rev 74940)
+++ trunk/Master/texmf-dist/doc/latex/sttools/README.md 2025-04-14 19:50:09 UTC (rev 74941)
@@ -1,4 +1,4 @@
-README for sttools, v3.0 2021/10/04
+README for sttools, v3.1 2025/04/14
INTRODUCTION
============
@@ -9,12 +9,15 @@
PACKAGES
========
-* cuted.sty, v2.0 2021/10/04:
- – puts some material page width wide at any place on twocolumn page
- with existing text reformatted under inserted material;
- \preCutedStrip{h... i} and \postCutedStrip{h... i} can be used to add
+* cuted.sty, v2.4 2025/01/29:
+ – puts some material page width wide at any place on a twocolumn page
+ with existing text reformatted under the inserted material;
+ \preCutedStrip{h... i} and \postCutedStrip{h... i} can be used to add.
extra stuff before and after the strip;
+ – switch between onecolumn and twocolumn in the same document
+ with commands: \switchonecolumn and \switchtwocolumn;
(2021/10/04): rewrite with new balance algorithm and options.
+ (2025/01/29): bugfix version with improved funcionality.
* floatpag.sty, v2.0 2021/10/04:
– sets pagestyle for floats page;
@@ -21,7 +24,7 @@
(2021/10/04): removed latex209 compatibility; added rotated dblfloat
support;
-* flushend.sty, v4.0 2021/10/04:
+* flushend.sty, v4.2 2025/02/11:
– balances page in twocolumn mode;
(2014/03/03): totally rewritten with new algorithm to support footnotes,
top floats and column break before one line section title;
@@ -35,21 +38,24 @@
(2020/10/14): bugfix development and test;
(2020/10/16): bugfix version: modern with noautobase;
(2021/10/04): another rewrite with new balance algorithm and options;
+ (2025/02/11): adapt to the latest latex kernel and a new hook;
* marginal.sty, v1.1 2012/05/29:
– enlarges room for marginal inserts;
- (2016/06/28): removed from the bundle;
+ (2016/06/28): removed from the bundle;
* midfloat.sty, v1.1 2012/05/29:
– inserts onecolumn stuff in twocolumn page;
TODO: extend to work on both columns;
+ TODO: to be removed as it is not used?;
-* stabular.sty, v2.1 2021/10/04:
+* stabular.sty, v2.2 2025/04/10:
– modifies tabular environment;
(2014/03/20): removed extra stuff and left only possibility to break
on page boundary;
added tabular variant from array package;
(2021/10/04): sync with array bugfix version for tabular;
+ (2025/04/10): code polishing;
* stfloats.sty, v3.3 2017/03/27:
– enriches floats output mechanism;
@@ -57,7 +63,7 @@
(2017/03/27): compatibility bugfix with 2017-05-01 latexrelease;
* texsort.sty, v1.1 2012/05/29:
- - sorts numerical values;
+ – sorts numerical values;
TODO: extend (rewrite) to support alphanumerical values
for sorting.
Modified: trunk/Master/texmf-dist/doc/latex/sttools/cuted.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/sttools/flushend.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/sttools/stabular.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/sttools/sttools.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/sttools/cuted.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/sttools/cuted.dtx 2025-04-14 19:49:54 UTC (rev 74940)
+++ trunk/Master/texmf-dist/source/latex/sttools/cuted.dtx 2025-04-14 19:50:09 UTC (rev 74941)
@@ -47,7 +47,7 @@
\ProvidesFile{cuted.dtx}
%</driver>
%<*package>
-%% Copyright (C) 1997-2021 by Sigitas Tolu\v{s}is <sigitas at vtex.lt>
+%% Copyright (C) 1997-2025 by Sigitas Tolu\v{s}is <sigitas at vtex.lt>
%% UAB VTeX, Mokslininkų 2A, LT-08412 Vilnius, Lithuania
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
@@ -61,15 +61,15 @@
%% PURPOSE: Insert some onecolumn material in full-width on double-column page.
%%
%</package>
-%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
%<package>\ProvidesPackage{cuted}
%<*package>
- [2021/10/04 v2.0 Mixing onecolumn and twocolumn modes]
+ [2025/01/29 v2.4 Mixing onecolumn and twocolumn modes (ST)]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
-\usepackage{cuted}[2021/10/04]
+\usepackage{cuted}[2025/01/29]
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -113,6 +113,7 @@
% \changes{}{2002/06/11}{added options unskipbreak and autobase}
% \changes{v1.4}{2012/05/29}{Converted to DTX file}
% \changes{v2.0}{2021/10/04}{rewrite with new balance algorithm and options}
+% \changes{v2.4}{2025/01/29}{bugfix version with improved funcionality}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
@@ -135,6 +136,8 @@
% with new cropped balancing algorithm version and new options
% from |flushend.sty, v4.0|.
%
+% It is extended to mix onecolumn and twocolumn typesetting in the same document
+%
% \section{Usage}
%
% \DescribeMacro{strip}
@@ -171,6 +174,14 @@
% on the right column. Seems, it should be unnecessary as current version
% uses |pagediscards| dimensions to restore original vertical skip.
%
+% \newpage
+%
+% \DescribeMacro{\switchonecolumn}
+% \\\noindent Starts onecolumn typesetting from the current page.
+%
+% \DescribeMacro{\switchtwocolumn}
+% \\\noindent Starts twocolumn typesetting from the current page.
+%
% \subsection{Package options}
%
% \begin{description}
@@ -290,22 +301,58 @@
\def\oldcolsbreak#1{\global\At at ViperColsBreak{#1}}
\def\on at stripcols@break{%
- %%
%% adds original vertical page break skip
%%
- \begingroup
- \setbox\cuted@@tempbox at var\vbox{\pagediscards}%
- \ifvoid\cuted@@tempbox at var
+ \ifdim\strip at page@discards=\z@
+ \else
+ \vskip\strip at page@discards
+ \fi
+ }
+\def\set at makecol@colht{%
+ \@ifundefined{viper at page@total}{}{%
+ \if at firstcolumn
+ \edef\cur at colht{\viper at page@total}%
\else
- \global\var@@pagediscards at ht=\ht\cuted@@tempbox at var
- \global\advance\var@@pagediscards at ht by\dp\cuted@@tempbox at var
+ \global\let\viper at page@total\relax
\fi
- \endgroup
- \ifdim\var@@pagediscards at ht=\z@
+ }%
+ }
+\gdef\cuted at makecol{%
+ \ifvoid\footins
+ \setbox\@outputbox \box\@cclv
\else
- \vskip\var@@pagediscards at ht
+ \setbox\@outputbox \vbox {%
+ \boxmaxdepth \@maxdepth
+ \unvbox \@cclv
+ \vskip \skip\footins
+ \color at begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox \footins
+ \color at endgroup
+ }%
\fi
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global \let \@midlist \@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \let\cur at colht\@colht \set at makecol@colht
+ \setbox\@outputbox \vbox to\cur at colht{%
+ \@texttop
+ \dimen@ \dp\@outputbox
+ \unvbox \@outputbox
+ \vskip -\dimen@
+ \@textbottom
+ }%
+ \fi
+ \global \maxdepth \@maxdepth
}
+\@ifundefined{normal at makecol}
+ {\let\@makecol\cuted at makecol}
+ {\let\normal at makecol\cuted at makecol}
\def\@outputdblcol{%
\if at firstcolumn
@@ -329,6 +376,13 @@
\fi
\else
\global\@firstcolumntrue
+ \@ifundefined{viper at page@total}{}{%
+ \setbox\@outputbox\vbox{%
+ \unvbox\@outputbox
+ \vskip-\viper at page@total
+ }%
+ \global\let\viper at page@total\relax
+ }%
\setbox\@outputbox\vbox{%
\hb at xt@\textwidth{%
\hb at xt@\columnwidth{\box\@leftcolumn \hss}%
@@ -342,7 +396,9 @@
\else
\setbox\@outputbox\vbox to\textheight{%
\box\hold at viper
- \box\@outputbox
+ \ifvoid\@viper
+ \box\@outputbox
+ \fi
\vss
}%
\fi
@@ -365,6 +421,7 @@
\endgroup
\fi
}
+\newdimen\strip at page@discards \strip at page@discards=\z@
\def\strip{%
\ifinner
\@parmoderr
@@ -372,6 +429,10 @@
\else
\viper at penalty=-\@Mv
\fi
+ \bgroup
+ \expandafter\setbox\expandafter\z@\expandafter\vbox\expandafter{\pagediscards}%
+ \global\strip at page@discards=\dimexpr\ht\z at +\dp\z@\relax
+ \egroup
\global\setbox\@viper\vbox\bgroup
\hsize\textwidth
\@parboxrestore
@@ -390,7 +451,7 @@
\else
\par
\penalty-\@Mv
- \noindent
+ \quitvmode
\fi
\fi
}
@@ -406,7 +467,7 @@
\ifvoid\@viper
\else
\advance\@pageht by\@pagedp
- \ifvoid\footins
+ \ifvoid\footins
\else
\advance\@pageht by\ht\footins
\advance\@pageht by\skip\footins
@@ -511,7 +572,9 @@
\unskip\unkern\unpenalty
\on at stripcols@break
\the\At at ViperColsBreak
- \unvbox\@holdpg
+ \setbox\@tempboxa\vbox{\null\unvbox\@holdpg}%
+ \set at split@topskip at to\z@
+ \setbox\z@\vsplit\@tempboxa to\p@ \unvbox\@tempboxa %% removes topskip
}%
\global\At at ViperColsBreak{}%
\ht at viper=.5\ht\@holdpg
@@ -691,6 +754,7 @@
%%
%% finalize cuted page
%%
+ \csname hold at viper@hook\endcsname
\ifvoid\hold at viper
\global\setbox\hold at viper\vbox{%
\unvbox\cuted@@tempbox at var
@@ -716,6 +780,7 @@
}%
\fi
\ifdim\@colht>\@reqcolroom
+ \csname end at viper@hook\endcsname
\global\setbox\hold at viper\vbox{%
\unvbox\hold at viper
\box\@viper
@@ -769,7 +834,9 @@
\global\setbox\hold at viper\vbox{%
\unvbox\hold at viper
\set at split@topskip at to{\z@ plus2\p@}%
- \vsplit\@viper to\@colht
+ \setbox\@tempboxa\vsplit\@viper to\@colht
+ \csname split at viper@hook\endcsname
+ \box\@tempboxa
\vss
}%
\vbox{}%
@@ -777,15 +844,67 @@
\newpage
\fi
}
+\def\switchonecolumn{%
+ \bgroup
+ \stripsep\z@\begin{strip}\end{strip}%
+ \egroup
+ \global\@colht\textheight
+ \global\vsize\@colht
+ \global\@colroom \@colht
+ \global\columnwidth\textwidth
+ \global\hsize\columnwidth
+ \global\linewidth\columnwidth
+ \global\@twocolumnfalse
+ \col at number \@ne
+ \@floatplacement
+ \unvbox\hold at viper
+ }
+\def\switchtwocolumn{%
+ \ifdim \dimexpr\@colht-\pagetotal\relax<2.5\baselineskip
+ \clearpage
+ \else
+ \par
+ \fi
+ \global\columnwidth\textwidth
+ \global\advance\columnwidth-\columnsep
+ \global\divide\columnwidth\tw@
+ \global\hsize\columnwidth
+ \global\linewidth\columnwidth
+ \global\@twocolumntrue
+ \global\@firstcolumntrue
+ \col at number \tw@
+ \xdef\viper at page@total{\the\@colht}%
+ \global\advance\@colht-\pagetotal
+ \global\advance\@colht-\stripsep
+ }
\def\check at floats#1{%
\begingroup
\global#1\z@
\def\@elt##1{%
- \setbox\@tempboxa\vbox{\copy #1\vskip\floatsep}%
- \global\advance##1 by\ht\@tempboxa
+ \setbox\@tempboxa\vbox{\unvcopy ##1\vskip\floatsep}%
}%
- \ifx\@toplist\@empty \else \@toplist \fi
- \ifx\@botlist\@empty \else \@botlist \fi
+ \ifx\@toplist\@empty
+ \else
+ \setbox\@tempboxa \vbox{}%
+ \@toplist
+ \setbox\@tempboxa\vbox{%
+ \unvbox\@tempboxa
+ \vskip -\floatsep
+ \topfigrule
+ \vskip \textfloatsep
+ }%
+ \global\advance#1 by\ht\@tempboxa
+ \fi
+ \ifx\@botlist\@empty
+ \else
+ \setbox\@tempboxa\vbox{%
+ \vskip \textfloatsep
+ \botfigrule
+ }%
+ \@botlist
+ \global\advance#1 by-\floatsep
+ \global\advance#1 by\ht\@tempboxa
+ \fi
\endgroup
}
\output{%
Modified: trunk/Master/texmf-dist/source/latex/sttools/flushend.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/sttools/flushend.dtx 2025-04-14 19:49:54 UTC (rev 74940)
+++ trunk/Master/texmf-dist/source/latex/sttools/flushend.dtx 2025-04-14 19:50:09 UTC (rev 74941)
@@ -61,10 +61,10 @@
%% PURPOSE: Balanced columns on last page in twocolumn mode.
%%
%</package>
-%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
%<package>\ProvidesPackage{flushend}
%<*package>
- [2021/10/04 v4.0 Balancing columns in twocolumn mode]
+ [2025/02/11 v4.2 Balancing columns in twocolumn mode (ST)]
%</package>
%
%<*driver>
@@ -399,7 +399,7 @@
}
\def\set at split@topskip at to#1{%
- \splittopskip=#1\relax
+ \splittopskip=#1\relax
\vfuzz=\maxdimen
\vbadness=\maxdimen
}
@@ -507,7 +507,7 @@
%%
%% Looking for the top floats on the right column.
%%
- %% Top box is considered as float if box's height
+ %% Top box is considered as float if box's height
%% is larger then \top@@floatbox at min.
%% So, it is a dangerous feature to be used carefully.
%%
@@ -545,7 +545,7 @@
\advance\flushend@@lastskip at b \dp\flushend@@tempbox at a
\fi
\advance\flushend@@lastskip at b -\flushend@@lastskip at a
- \flushend@@lastskip at b=-\flushend@@lastskip at b
+ \flushend@@lastskip at b=-\flushend@@lastskip at b
\xdef\top@@floatbox at ht{\the\flushend@@lastskip at b}%
\var@@temp at a=3\p@
\else
@@ -561,7 +561,7 @@
\def\set at outputbox@with at footnote@and at float{%
%%
- %% The main unit formatting balanced columns.
+ %% The main unit formatting balanced columns.
%%
%% \flushend@@tempbox at a - left column
%% \flushend@@tempbox at c - left column with natural dimensions
@@ -692,7 +692,7 @@
\fi
\var@@temp at spread=\z@
\fi
- \fi
+ \fi
\fi
\else
\ifdim\var@@temp at spread>\z@
@@ -748,7 +748,7 @@
\else
\vss
\fi
- \fi
+ \fi
\fi
}%
\else
@@ -776,7 +776,7 @@
\else
\vss
\fi
- \fi
+ \fi
\fi
}%
\fi
@@ -807,7 +807,7 @@
\else
\vss
\fi
- \fi
+ \fi
\fi
}%
\else
@@ -827,7 +827,7 @@
\else
\vss
\fi
- \fi
+ \fi
\fi
}%
\fi
@@ -862,6 +862,7 @@
\hrule\@height\flushend@@page at rule width\columnwidth
\vskip-\flushend@@page at rule
\hrule\@height\z@ width\columnwidth
+ \csname oldbreak at flushend@hook\endcsname
\penalty\z@
\ifdim\var@@temp at a>\z@
\ifdim\var@@temp at a>\dp\strutbox
@@ -991,10 +992,7 @@
%%
\global\let\saved at orig@@outputdblcol\@outputdblcol
\global\let\balanced@@outputdblcol\last at outputdblcol
- \edef\enddocument{%
- \unexpanded{\let\@outputdblcol\balanced@@outputdblcol}%
- \unexpanded\expandafter{\enddocument}%
- }%
+ \g at addto@macro\@kernel at after@enddocument{\let\@outputdblcol\balanced@@outputdblcol}%
\g at addto@macro\footnoterule{\vskip\z@}%
\savingvdiscards=\@ne
}
Modified: trunk/Master/texmf-dist/source/latex/sttools/stabular.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/sttools/stabular.dtx 2025-04-14 19:49:54 UTC (rev 74940)
+++ trunk/Master/texmf-dist/source/latex/sttools/stabular.dtx 2025-04-14 19:50:09 UTC (rev 74941)
@@ -64,7 +64,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{stabular}
%<*package>
- [2021/10/04 v2.1 Improve tabular environment]
+ [2025/04/10 v2.2 Improve tabular environment (ST)]
%</package>
%
%<*driver>
@@ -81,7 +81,7 @@
%</driver>
% \fi
%
-% \CheckSum{239}
+% \CheckSum{233}
%
% \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
@@ -145,12 +145,6 @@
%
%
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{stabular}[2014/03/20]
-% \end{macrocode}
-%
-%
-% \begin{macrocode}
\def\use@@pkg@@array@@variant{0}
\DeclareOption{array}{\def\use@@pkg@@array@@variant{1}}
\ProcessOptions*
@@ -245,7 +239,7 @@
\lineskip\z@ \baselineskip\z@
\m at th
\let\\\@arraycr \let\tabularnewline\\
- %%\let\par\@empty
+ %%\let\par\@empty
\@preamble
}
\def\pkgarray@@stabarray{\@ifnextchar[{\pkgarray@@sarray}{\pkgarray@@sarray[c]}}
@@ -255,13 +249,13 @@
\edef\@halignto{to\the\dimen@}\pkgarray@@stabular}
\def\pkgarray@@stabular{%
\leavevmode
- \bgroup
- \col at sep\tabcolsep
+ \bgroup
+ \col at sep\tabcolsep
\let\d at llarbegin\begingroup
\let\d at llarend\endgroup
\pkgarray@@stabarray
}
-\def\pkgarray at endstabular{\crcr\egroup\egroup\gdef\@preamble{}\egroup}
+\def\pkgarray at endstabular{\endarray\egroup}
\expandafter\let\csname pkgarray at endstabular*\endcsname\pkgarray at endstabular
% \end{macrocode}
%
@@ -272,10 +266,10 @@
\@ifpackageloaded{array}{}{\RequirePackage{array}}%
\let\stabular\pkgarray at stabular
\expandafter\let\csname stabular*\expandafter\endcsname
- \csname pkgarray at stabular*\endcsname
+ \csname pkgarray at stabular*\endcsname
\let\endstabular\pkgarray at endstabular
\expandafter\let\csname endstabular*\expandafter\endcsname
- \csname pkgarray at endstabular*\endcsname
+ \csname pkgarray at endstabular*\endcsname
\fi
% \end{macrocode}
%
Modified: trunk/Master/texmf-dist/source/latex/sttools/sttools.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/sttools/sttools.dtx 2025-04-14 19:49:54 UTC (rev 74940)
+++ trunk/Master/texmf-dist/source/latex/sttools/sttools.dtx 2025-04-14 19:50:09 UTC (rev 74941)
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2021 by Sigitas Tolu\v{s}is <sigitas at vtex.lt>
+% Copyright (C) 2025 by Sigitas Tolu\v{s}is <sigitas at vtex.lt>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -62,7 +62,7 @@
% \GetFileInfo{sttools.dtx}
% \title{The \textsf{sttools} collection}
% \author{Sigitas Tolu\v{s}is \\ \url{sigitas at vtex.lt}}
-% \date{2021.10.04}
+% \date{2025.04.14}
%
% \maketitle
%
@@ -75,17 +75,20 @@
%
% \begin{itemize}
%
-% \item \textbf{cuted.sty, v2.0 2021/10/04} -- place some material
+% \item \textbf{cuted.sty, v2.4 2025/01/29} -- place some material
% page width wide at any
% place on twocolumn page with existing text reformatted under inserted
% material; \\\texttt{\cs{preCutedStrip}\marg{...} and \cs{postCutedStrip}\marg{...}
% can be used to add extra stuff before and after the |strip|};
+% -- switch between onecolumn and twocolumn in the same document
+% with commands: \cs{switchonecolumn} and \cs{switchtwocolumn};
% \\\texttt{(2021/10/04): rewrite with new balance algorithm and options}.
+% \\\texttt{(2025/01/29): bugfix version with improved funcionality}.
%
% \item \textbf{floatpag.sty, v2.0 2021/10/04} -- set pagestyle for floats page;
% \\ \texttt{(2021/10/04): removed latex209 compatibility; added rotated dblfloat support};
%
-% \item \textbf{flushend.sty, v4.0 2021/10/04} -- balance page in twocolumn mode;
+% \item \textbf{flushend.sty, v4.2 2025/02/11} -- balance page in twocolumn mode;
% \\\texttt{(2014/03/03): totally rewritten with new algorithm to support footnotes,
% top floats and column break before one line section title.
% \\(2014/04/24): bugfix version;
@@ -97,16 +100,19 @@
% \\(2017/03/27): bugfix for get@@footnoterule@@box; options for some checks on/off;
% \\(2020/10/14): bugfix development and test;
% \\(2020/10/16): bugfix version: modern with noautobase;
-% \\(2021/10/04): another rewrite with new balance algorithm and options}.
+% \\(2021/10/04): another rewrite with new balance algorithm and options;
+% \\(2025/02/11): adapt to the latest latex kernel and a new hook}.
%
% \item \textbf{midfloat.sty, v1.1 2012/05/29} -- insert onecolumn stuff in twocolumn
% page; \\\texttt{TODO: extend to work on both columns};
+% \\\texttt{TODO: to be removed as it is not used?};
%
-% \item \textbf{stabular.sty, v2.1 2021/10/04} -- use modified tabular environment;
+% \item \textbf{stabular.sty, v2.2 2025/04/10} -- use modified tabular environment;
% \\\texttt{(2014/03/20): removed extra stuff and left only possibility to break
% on page boundary;
% \\added tabular variant from array packag;
-% \\(2021/10/04): sync with array bugfix version for tabular}.
+% \\(2021/10/04): sync with array bugfix version for tabular;
+% \\(2025/04/10): code polishing}.
%
% \item \textbf{stfloats.sty, v3.3 2017/03/27} -- enable enriched floats output mechanism;
% \\\texttt{(2016/06/28): compatibility bugfix with 2015 latexrelease;
Modified: trunk/Master/texmf-dist/tex/latex/sttools/cuted.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/sttools/cuted.sty 2025-04-14 19:49:54 UTC (rev 74940)
+++ trunk/Master/texmf-dist/tex/latex/sttools/cuted.sty 2025-04-14 19:50:09 UTC (rev 74941)
@@ -6,7 +6,7 @@
%%
%% cuted.dtx (with options: `package')
%%
-%% Copyright (C) 1997-2021 by Sigitas Tolu\v{s}is <sigitas at vtex.lt>
+%% Copyright (C) 1997-2025 by Sigitas Tolu\v{s}is <sigitas at vtex.lt>
%% UAB VTeX, Mokslininkų 2A, LT-08412 Vilnius, Lithuania
%% --------------------------------------------------------------------------
%% This work may be distributed and/or modified under the
@@ -19,9 +19,9 @@
%%
%% PURPOSE: Insert some onecolumn material in full-width on double-column page.
%%
-\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\ProvidesPackage{cuted}
- [2021/10/04 v2.0 Mixing onecolumn and twocolumn modes]
+ [2025/01/29 v2.4 Mixing onecolumn and twocolumn modes (ST)]
\newif\if at right@column at spread \@right at column@spreadtrue
\newif\if at right@column at shrink \@right at column@shrinktrue
@@ -98,22 +98,58 @@
\def\oldcolsbreak#1{\global\At at ViperColsBreak{#1}}
\def\on at stripcols@break{%
- %%
%% adds original vertical page break skip
%%
- \begingroup
- \setbox\cuted@@tempbox at var\vbox{\pagediscards}%
- \ifvoid\cuted@@tempbox at var
+ \ifdim\strip at page@discards=\z@
+ \else
+ \vskip\strip at page@discards
+ \fi
+ }
+\def\set at makecol@colht{%
+ \@ifundefined{viper at page@total}{}{%
+ \if at firstcolumn
+ \edef\cur at colht{\viper at page@total}%
\else
- \global\var@@pagediscards at ht=\ht\cuted@@tempbox at var
- \global\advance\var@@pagediscards at ht by\dp\cuted@@tempbox at var
+ \global\let\viper at page@total\relax
\fi
- \endgroup
- \ifdim\var@@pagediscards at ht=\z@
+ }%
+ }
+\gdef\cuted at makecol{%
+ \ifvoid\footins
+ \setbox\@outputbox \box\@cclv
\else
- \vskip\var@@pagediscards at ht
+ \setbox\@outputbox \vbox {%
+ \boxmaxdepth \@maxdepth
+ \unvbox \@cclv
+ \vskip \skip\footins
+ \color at begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox \footins
+ \color at endgroup
+ }%
\fi
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global \let \@midlist \@empty
+ \@combinefloats
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \let\cur at colht\@colht \set at makecol@colht
+ \setbox\@outputbox \vbox to\cur at colht{%
+ \@texttop
+ \dimen@ \dp\@outputbox
+ \unvbox \@outputbox
+ \vskip -\dimen@
+ \@textbottom
+ }%
+ \fi
+ \global \maxdepth \@maxdepth
}
+\@ifundefined{normal at makecol}
+ {\let\@makecol\cuted at makecol}
+ {\let\normal at makecol\cuted at makecol}
\def\@outputdblcol{%
\if at firstcolumn
@@ -137,6 +173,13 @@
\fi
\else
\global\@firstcolumntrue
+ \@ifundefined{viper at page@total}{}{%
+ \setbox\@outputbox\vbox{%
+ \unvbox\@outputbox
+ \vskip-\viper at page@total
+ }%
+ \global\let\viper at page@total\relax
+ }%
\setbox\@outputbox\vbox{%
\hb at xt@\textwidth{%
\hb at xt@\columnwidth{\box\@leftcolumn \hss}%
@@ -150,7 +193,9 @@
\else
\setbox\@outputbox\vbox to\textheight{%
\box\hold at viper
- \box\@outputbox
+ \ifvoid\@viper
+ \box\@outputbox
+ \fi
\vss
}%
\fi
@@ -173,6 +218,7 @@
\endgroup
\fi
}
+\newdimen\strip at page@discards \strip at page@discards=\z@
\def\strip{%
\ifinner
\@parmoderr
@@ -180,6 +226,10 @@
\else
\viper at penalty=-\@Mv
\fi
+ \bgroup
+ \expandafter\setbox\expandafter\z@\expandafter\vbox\expandafter{\pagediscards}%
+ \global\strip at page@discards=\dimexpr\ht\z at +\dp\z@\relax
+ \egroup
\global\setbox\@viper\vbox\bgroup
\hsize\textwidth
\@parboxrestore
@@ -198,7 +248,7 @@
\else
\par
\penalty-\@Mv
- \noindent
+ \quitvmode
\fi
\fi
}
@@ -319,7 +369,9 @@
\unskip\unkern\unpenalty
\on at stripcols@break
\the\At at ViperColsBreak
- \unvbox\@holdpg
+ \setbox\@tempboxa\vbox{\null\unvbox\@holdpg}%
+ \set at split@topskip at to\z@
+ \setbox\z@\vsplit\@tempboxa to\p@ \unvbox\@tempboxa %% removes topskip
}%
\global\At at ViperColsBreak{}%
\ht at viper=.5\ht\@holdpg
@@ -499,6 +551,7 @@
%%
%% finalize cuted page
%%
+ \csname hold at viper@hook\endcsname
\ifvoid\hold at viper
\global\setbox\hold at viper\vbox{%
\unvbox\cuted@@tempbox at var
@@ -524,6 +577,7 @@
}%
\fi
\ifdim\@colht>\@reqcolroom
+ \csname end at viper@hook\endcsname
\global\setbox\hold at viper\vbox{%
\unvbox\hold at viper
\box\@viper
@@ -577,7 +631,9 @@
\global\setbox\hold at viper\vbox{%
\unvbox\hold at viper
\set at split@topskip at to{\z@ plus2\p@}%
- \vsplit\@viper to\@colht
+ \setbox\@tempboxa\vsplit\@viper to\@colht
+ \csname split at viper@hook\endcsname
+ \box\@tempboxa
\vss
}%
\vbox{}%
@@ -585,15 +641,67 @@
\newpage
\fi
}
+\def\switchonecolumn{%
+ \bgroup
+ \stripsep\z@\begin{strip}\end{strip}%
+ \egroup
+ \global\@colht\textheight
+ \global\vsize\@colht
+ \global\@colroom \@colht
+ \global\columnwidth\textwidth
+ \global\hsize\columnwidth
+ \global\linewidth\columnwidth
+ \global\@twocolumnfalse
+ \col at number \@ne
+ \@floatplacement
+ \unvbox\hold at viper
+ }
+\def\switchtwocolumn{%
+ \ifdim \dimexpr\@colht-\pagetotal\relax<2.5\baselineskip
+ \clearpage
+ \else
+ \par
+ \fi
+ \global\columnwidth\textwidth
+ \global\advance\columnwidth-\columnsep
+ \global\divide\columnwidth\tw@
+ \global\hsize\columnwidth
+ \global\linewidth\columnwidth
+ \global\@twocolumntrue
+ \global\@firstcolumntrue
+ \col at number \tw@
+ \xdef\viper at page@total{\the\@colht}%
+ \global\advance\@colht-\pagetotal
+ \global\advance\@colht-\stripsep
+ }
\def\check at floats#1{%
\begingroup
\global#1\z@
\def\@elt##1{%
- \setbox\@tempboxa\vbox{\copy #1\vskip\floatsep}%
- \global\advance##1 by\ht\@tempboxa
+ \setbox\@tempboxa\vbox{\unvcopy ##1\vskip\floatsep}%
}%
- \ifx\@toplist\@empty \else \@toplist \fi
- \ifx\@botlist\@empty \else \@botlist \fi
+ \ifx\@toplist\@empty
+ \else
+ \setbox\@tempboxa \vbox{}%
+ \@toplist
+ \setbox\@tempboxa\vbox{%
+ \unvbox\@tempboxa
+ \vskip -\floatsep
+ \topfigrule
+ \vskip \textfloatsep
+ }%
+ \global\advance#1 by\ht\@tempboxa
+ \fi
+ \ifx\@botlist\@empty
+ \else
+ \setbox\@tempboxa\vbox{%
+ \vskip \textfloatsep
+ \botfigrule
+ }%
+ \@botlist
+ \global\advance#1 by-\floatsep
+ \global\advance#1 by\ht\@tempboxa
+ \fi
\endgroup
}
\output{%
Modified: trunk/Master/texmf-dist/tex/latex/sttools/flushend.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/sttools/flushend.sty 2025-04-14 19:49:54 UTC (rev 74940)
+++ trunk/Master/texmf-dist/tex/latex/sttools/flushend.sty 2025-04-14 19:50:09 UTC (rev 74941)
@@ -19,9 +19,9 @@
%%
%% PURPOSE: Balanced columns on last page in twocolumn mode.
%%
-\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\ProvidesPackage{flushend}
- [2021/10/04 v4.0 Balancing columns in twocolumn mode]
+ [2025/02/11 v4.2 Balancing columns in twocolumn mode (ST)]
\newif\if at footnote@check \@footnote at checktrue
\newif\if at right@column at spread \@right at column@spreadtrue
@@ -616,6 +616,7 @@
\hrule\@height\flushend@@page at rule width\columnwidth
\vskip-\flushend@@page at rule
\hrule\@height\z@ width\columnwidth
+ \csname oldbreak at flushend@hook\endcsname
\penalty\z@
\ifdim\var@@temp at a>\z@
\ifdim\var@@temp at a>\dp\strutbox
@@ -745,10 +746,7 @@
%%
\global\let\saved at orig@@outputdblcol\@outputdblcol
\global\let\balanced@@outputdblcol\last at outputdblcol
- \edef\enddocument{%
- \unexpanded{\let\@outputdblcol\balanced@@outputdblcol}%
- \unexpanded\expandafter{\enddocument}%
- }%
+ \g at addto@macro\@kernel at after@enddocument{\let\@outputdblcol\balanced@@outputdblcol}%
\g at addto@macro\footnoterule{\vskip\z@}%
\savingvdiscards=\@ne
}
Modified: trunk/Master/texmf-dist/tex/latex/sttools/stabular.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/sttools/stabular.sty 2025-04-14 19:49:54 UTC (rev 74940)
+++ trunk/Master/texmf-dist/tex/latex/sttools/stabular.sty 2025-04-14 19:50:09 UTC (rev 74941)
@@ -21,9 +21,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{stabular}
- [2021/10/04 v2.1 Improve tabular environment]
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{stabular}[2014/03/20]
+ [2025/04/10 v2.2 Improve tabular environment (ST)]
\def\use@@pkg@@array@@variant{0}
\DeclareOption{array}{\def\use@@pkg@@array@@variant{1}}
\ProcessOptions*
@@ -99,7 +97,7 @@
\let\d at llarend\endgroup
\pkgarray@@stabarray
}
-\def\pkgarray at endstabular{\crcr\egroup\egroup\gdef\@preamble{}\egroup}
+\def\pkgarray at endstabular{\endarray\egroup}
\expandafter\let\csname pkgarray at endstabular*\endcsname\pkgarray at endstabular
\ifcase\use@@pkg@@array@@variant
\else
More information about the tex-live-commits
mailing list.