summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-04-18 22:41:37 +0000
committerKarl Berry <karl@freefriends.org>2022-04-18 22:41:37 +0000
commitbc5b115afdf168e711e21443172cac31d3fb63c2 (patch)
tree6e5776d1d139fe1e8dd3caf6ef13766c5e9d3233 /Master/texmf-dist/source
parenta6cffc35cf0b1e231c02517ef1d15927947a2b24 (diff)
adjmulticol (19apr22)
git-svn-id: svn://tug.org/texlive/trunk@63073 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/adjmulticol/adjmulticol.dtx38
1 files changed, 24 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/adjmulticol/adjmulticol.dtx b/Master/texmf-dist/source/latex/adjmulticol/adjmulticol.dtx
index 9ce7012f039..66d2f060e59 100644
--- a/Master/texmf-dist/source/latex/adjmulticol/adjmulticol.dtx
+++ b/Master/texmf-dist/source/latex/adjmulticol/adjmulticol.dtx
@@ -308,7 +308,7 @@
%</gobble>
%<style>\ProvidesPackage{adjmulticol}
%<*style>
-[2022/03/27 v1.3 Adjusted margins for multicolumn layout]
+[2022/04/17 v1.4 Adjusted margins for multicolumn layout]
% \end{macrocode}
%
%
@@ -364,6 +364,7 @@
%
% \begin{macro}{\adjmulticols}
% \changes{v1.3}{2022/03/27}{Do not try to balance one-column version}
+% \changes{v1.4}{2022/04/17}{Change the balancing of one-column}
% We have three mandatory arguments instead of one for |multicols|:
% the number of columns, the left margin delta and the right margin
% delta:
@@ -392,8 +393,7 @@
I therefore use 10 columns instead}%
\col@number10 \fi
\ifnum\col@number=\@ne\relax
- \let\balance@columns@out
- \multi@column@out
+ \let\balance@columns\adjmc@process@ne@column
\fi
% \end{macrocode}
%
@@ -500,19 +500,13 @@
%
%
% \begin{macro}{\adjmc@page@sofar}
+% \changes{v1.4}{2022/04/17}{No longer copying boxes for one column
+% version}
% We redefine |\page@sofar| to change the margins and allow for
% one-column output:
% \begin{macrocode}
\def\adjmc@page@sofar{%
% \end{macrocode}
-% If we have one column, the standard mechanisms leave empty space
-% instead of the first column. Ok, we use the fact that there is a
-% copy of the first column in |\mult@firstbox|\dots
-% \begin{macrocode}
- \ifnum\col@number=\@ne
- \setbox\mult@rightbox\box\mult@firstbox
- \fi
-% \end{macrocode}
% We redefine |\multicol@leftmargin| to introduce the shift of the
% box. We save the old code in |\adjmc@saved@leftmargin|
% \begin{macrocode}
@@ -534,15 +528,28 @@
% \end{macrocode}
%
% \end{macro}
+%
+% \begin{macro}{\adjmc@process@ne@column}
+% \changes{v1.4}{2022/04/17}{Added macro}
+% If we have one column, we do not need to balance it. Mostly stolen
+% from |multicol.sty|
+% \begin{macrocode}
+\def\adjmc@process@ne@column{%
+ \setbox\mult@firstbox\copy\mult@box}
+% \end{macrocode}
%
%
+% \end{macro}
+%
%\subsection{Not Balancing Columns}
%\label{sec:not_balance}
%
% The starred versions do not balance the columns.
%
% \begin{macro}{\adjmulticols*}
-% This follows the code of the \textsf{multicols} package:
+% \changes{v1.4}{2022/04/17}{Special code for one column version}
+% This follows the code of the \textsf{multicols} package with the
+% special check for one column:
% \begin{macrocode}
\newenvironment{adjmulticols*}{%
\ifinner
@@ -551,8 +558,11 @@
not make sense.\MessageBreak
Going to balance anyway}%
\else
- \let\balance@columns@out
- \multi@column@out
+ \ifnum\col@number=\@ne\relax
+ \let\balance@columns\adjmc@process@ne@column
+ \else
+ \let\balance@columns@out\multi@column@out
+ \fi
\fi
\adjmulticols}{%
\vfill