summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-01 22:50:59 +0000
committerKarl Berry <karl@freefriends.org>2019-01-01 22:50:59 +0000
commitd26dc81b1551a9fb8d750dda224e334eb6dd4e0b (patch)
tree82245aaa334aa0e0087a8933f53c35ccfed70d23 /Master/texmf-dist
parent98890e60b2f71ab52763c5ddeb6b68160de110c2 (diff)
multirow (1jan19)
git-svn-id: svn://tug.org/texlive/trunk@49572 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/multirow/README6
-rw-r--r--Master/texmf-dist/doc/latex/multirow/multirow.pdfbin614827 -> 611790 bytes
-rw-r--r--Master/texmf-dist/source/latex/multirow/multirow.dtx113
-rw-r--r--Master/texmf-dist/tex/latex/multirow/bigdelim.sty4
-rw-r--r--Master/texmf-dist/tex/latex/multirow/bigstrut.sty6
-rw-r--r--Master/texmf-dist/tex/latex/multirow/multirow.sty38
6 files changed, 95 insertions, 72 deletions
diff --git a/Master/texmf-dist/doc/latex/multirow/README b/Master/texmf-dist/doc/latex/multirow/README
index 34f4ee74aef..a58e4b61d05 100644
--- a/Master/texmf-dist/doc/latex/multirow/README
+++ b/Master/texmf-dist/doc/latex/multirow/README
@@ -1,6 +1,6 @@
-multirow.sty 2018/08/03 v2.3
-bigstruts.sty 2018/08/03 v2.3
-bigdelim.sty 2018/08/03 v2.3
+multirow.sty 2019/01/01 v2.4
+bigstruts.sty 2019/01/01 v2.4
+bigdelim.sty 2019/01/01 v2.4
Original Author: Jerry Leichter
Current Author: Piet van Oostrum <piet@vanoostrum.org>
diff --git a/Master/texmf-dist/doc/latex/multirow/multirow.pdf b/Master/texmf-dist/doc/latex/multirow/multirow.pdf
index bc34d7b38a6..0317556b4a7 100644
--- a/Master/texmf-dist/doc/latex/multirow/multirow.pdf
+++ b/Master/texmf-dist/doc/latex/multirow/multirow.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/multirow/multirow.dtx b/Master/texmf-dist/source/latex/multirow/multirow.dtx
index d79141407b5..1d1751daff1 100644
--- a/Master/texmf-dist/source/latex/multirow/multirow.dtx
+++ b/Master/texmf-dist/source/latex/multirow/multirow.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% Parts of this file, Copyright (C) 1994 by Jerry Leichter
-% Copyright (C) 2016, 2018 by Piet van Oostrum <piet@vanoostrum.org>
+% Copyright (C) 2016, 2018, 2019 by Piet van Oostrum <piet@vanoostrum.org>
% -------------------------------------------------------
%
% This file may be distributed and/or modified under the
@@ -24,7 +24,7 @@
%
%<multirow|bigstrut>%% Copyright (C) 1994 by Jerry Leichter
%<bigdelim>%% Copyright (C) 1994 by \O ystein Bache
-%% Copyright (C) 2016 , 2018 by Piet van Oostrum <piet@vanoostrum.org>
+%% Copyright (C) 2016 , 2018, 2019 by Piet van Oostrum <piet@vanoostrum.org>
%%
%
% \begin{macrocode}
@@ -32,7 +32,7 @@
%<multirow>\ProvidesPackage{multirow}%
%<bigstrut>\ProvidesPackage{bigstrut}
%<bigdelim>\ProvidesPackage{bigdelim}
-%<multirow|bigstrut|bigdelim> [2018/08/03 v2.3
+%<multirow|bigstrut|bigdelim> [2019/01/01 v2.4
%<multirow> Span multiple rows of a table]%
%<bigstrut> Provide larger struts in tabulars]
%<bigdelim> Create big delimiters in tabular or array]
@@ -87,6 +87,9 @@
% \changes{v1.7}{2016/09/13}{Give all the files the same version number}
% \changes{v2.0}{2016/09/27}{Release v2.0}
% \changes{v2.3}{2018/08/03}{Small bugfix}
+% \changes{v2.4}{2018/12/30}{Add \leavevmode in bigstrut.sty}
+% \changes{v2.4}{2019/01/01}{Make \meta{width} and \meta{vmove} in \cs{multirow}
+% \Package{calc} compatible}
%
% \GetFileInfo{multirow.sty}
%
@@ -125,6 +128,13 @@
% \section{Changes in version 2}
% \label{sec:changes-2}
%
+%\subsection*{version 2.4}
+%
+% \begin{itemize}
+% \item Add a \cs{leavevmode} in \Package{bigstrut} to force horizontal mode
+% \item Make \meta{width} and \meta{vmove} in \cs{multirow} \Package{calc} compatible
+% \end{itemize}
+%
%\subsection*{version 2.3}
%
% \begin{itemize}
@@ -220,8 +230,15 @@
% The text will be set in a \cs{parbox} of that width.
% If you give ``\texttt{=}'' in other situations, you will get strange
% results (usually a too wide column).
+%
% \end{description}
%
+% In \Package{multirow} version 2.4 and later, the \meta{width} and
+% \meta{vmove} arguments can be given as \Package{calc} expressions if
+% the \Package{calc} package is loaded. It is the responsibility of the
+% document writer to include the \Package{calc} package;
+% \Package{multirow} does not do this.
+%
% N.B. \cs{multirow} can be used in the \environment{tabular} environment and
% most derivatives of it, for example \environment{tabularx},
% \environment{tabulary}, \environment{supertabular}, \environment{ltablex},
@@ -237,7 +254,8 @@
%
% If you want to use both \cs{multirow} and \cs{multicolumn}
% \index{multicolumn=\verb!*+\multicolumn+|usage}
-% on the same entry, you must put the \cs{multirow} inside the \cs{multicolumn}. The other way around will not work.
+% on the same entry, you must put the \cs{multirow} inside the
+% \cs{multicolumn}. The other way around will not work.
% For example:
% \begin{verbatim}
% \multicolumn{2}{c}{\multirow{3}{*}{Multi-multi}}
@@ -399,13 +417,13 @@
% height of a row. It tries to center the text in that space, but that space
% is too low in this example. Therefore the text is at the top of the
% box. If you want it to be centered, you have to supply a \meta{vmove}
-% parameter to shift it down.
+% argument to shift it down.
% \item We have used an \cs{extrarowheight}\footnote{This is only
% available with the \Package{array} package, which \Package{tabulary}
% includes automatically.} of 2pt, to make a bit room between the
% \cs{hline} and the following text. However, this is not applied to the
% \cs{multirow}, because this is thought to be centered. In this case
-% you can give the \meta{vpos} parameter as \texttt{[t]}, in which case
+% you can give the \meta{vpos} argument as \texttt{[t]}, in which case
% \cs{multirow} will do the proper positioning.
% \end{enumerate}
%
@@ -522,7 +540,8 @@
% \bottomrule
% \end{tabular}
% \end{quote}
-%
+% In \Package{multirow} version 2.4 and later you can also directly use the expression
+% \verb|-\heightof{\Huge\bfseries B}-\heightof{f}| instead of \verb|-\shiftdown| for the \meta{vmove} argument.
%
% \subsection{Multirow and colored cells}\label{sec:mult-color-cells}
%
@@ -613,7 +632,7 @@
% \end{tabular}
% \end{quote}
%
-% \subsection{Fine-tuning the \meta{bigstruts} parameter}
+% \subsection{Fine-tuning the \meta{bigstruts} argument}
% \label{sect-refine-bigstrut}
%
% \cs{multirow} can calculate the height of the required multirow box
@@ -622,7 +641,7 @@
% not enough to properly position the box, especially when there is a
% \cs{bigstrut} on top of the first row and/or one on the bottom of the
% last row. In that case \cs{multirow} should be given additional
-% information. This is done by prefixing the \meta{bigstruts} parameter
+% information. This is done by prefixing the \meta{bigstruts} argument
% with a letter (or two) indicating which of these two are present.
%
% See the following examples:\\ (in these examples we have
@@ -707,7 +726,7 @@
% In the top box the \verb+\multirow[t]+ should be positioned on the
% same height as the \texttt{T}, but it is too high, because there is a
% \cs{bigstrut} in the bottom. We can correct that by specifying the
-% \meta{bigstruts} parameter as ``b 1'', i.e. using
+% \meta{bigstruts} argument as ``b 1'', i.e. using
% \verb+\multirow[t]{-3}[b 1]{*}{Multirow}+.
% \\[5mm]
% The possibilities for the prefix are:
@@ -1050,7 +1069,7 @@
% is probably better to make the struts a little bit bigger, or a bit
% smaller with \Package{booktabs}. After some experimentation it appeared
% that a \cs{bigstrutjot} of \texttt{7pt} was enough. Of course we added
-% the \meta{bigstruts} parameter of \texttt{[tb6]} to the second
+% the \meta{bigstruts} argument of \texttt{[tb6]} to the second
% multirow. Please note that this is not possible with our own struts,
% unless we cheat.
%
@@ -1144,7 +1163,7 @@
% \cs{bigstrut} if there are \cs{hline}s both before and after.
%
% Spaces after the \cs{bigstrut} are ignored, even if it has an optional
-% parameter. Spaces before the \cs{bigstrut} are generally ignored (by a
+% argument. Spaces before the \cs{bigstrut} are generally ignored (by a
% single \cs{unskip}).
%
% \DescribeMacro{\bigstrutjot}
@@ -1257,7 +1276,7 @@
% Also the commands may be
% used in the last row of the extension with a negative \meta{n}
% \index{colortbl=\Package{colortbl}|usage}
-% parameter. This is useful in combination with \Package{colortbl} (see
+% argument. This is useful in combination with \Package{colortbl} (see
% the discussion in section \ref{sec:multirow} on \Package{multirow}).
% If there are unusually tall rows you may have to enlarge \meta{n}
% (you can use fractional values).
@@ -1310,7 +1329,7 @@
% (\cs{leavevmode} added)}
% \changes{multirow v1.4}{}{modified by Piet van Oostrum to check for the special case that
% the width is given as an *. In this case the natural
-% width of the text parameter will be used and the parameter
+% width of the text argument will be used and the argument
% is processed in LR-mode.}
% \changes{multirow v1.5}{}{modified by Piet van Oostrum: Added a \texttt{\%} after \texttt{\cs{hbox}\{\#5\}\cs{vfill}}.\\
% Added \cs{strut}s around \#5 for better vertical positioning.
@@ -1501,7 +1520,7 @@
% vertically centered, or bottom-aligned. This is done by inserting
% \cs{vfill} in the proper places.\\
% Note: the \cs{relax} is to protect against an empty \meta{vpos}
-% parameter.
+% argument.
% \begin{macrocode}
\long\def\multirow@vbox#1#2#3{\setbox0\vtop to \multirow@dima{#2%
\if #1t\relax\else\vfill\fi
@@ -1511,7 +1530,7 @@
%
% \begin{macro}{\multirow}
% Make an entry that will span multiple rows of a table.\\
-% First collect all the parameters and replace missing optional parameters by their default values.
+% First collect all the arguments and replace missing optional arguments by their default values.
% \changes{v1.8}{2016/09/14}{Add the optional first parameter \meta{vpos}.}
% \begin{macrocode}
%% \multirow [vpos] {nrows} [bigstruts] {width} [vmove] {text}
@@ -1529,7 +1548,7 @@
% \begin{macro}{\multirow@prefixbtrue}
% \begin{macro}{\multirow@prefixbfalse}
% This macro splits off a \texttt{t}, \texttt{b}, or \texttt{tb} prefix
-% of the \meta{bigstruts} parameter, and sets \cs{multirow@cntb} to
+% of the \meta{bigstruts} argument, and sets \cs{multirow@cntb} to
% the numerical value. The prefix is remembered in two booleans:
% \cs{ifmultirow@prefixt} and \cs{ifmultirow@prefixb}.
% \begin{macrocode}
@@ -1555,35 +1574,37 @@
% \end{macro}
%
% This is the real workhorse. It starts with splitting the
-% \meta{bigstruts} parameter, and then calculating the height of the multirow box.
+% \meta{bigstruts} argument, and then calculating the height of the multirow box.
% \changes{v2.2}{2016/11/25}{Support fractional values for \meta{nrows}.}
% Because \meta{nrows} (\verb+#2+) can be fractional, we cannot use
% \cs{ifnum} to test for positive or negative. Therefore we use
% \cs{ifdim} by putting a unit (\texttt{pt}) after the number.
+% \changes{v2.4}{2019/01/01}{Support calc compatible expressions for \meta{width} and
+% \meta{vmove}.}
% \begin{macrocode}
\def\@xmultirow[#1]#2[#3]#4[#5]#6{%
\expandafter\multirow@piii#3\relax\end%
- \multirow@dima=#2\ht\@arstrutbox
- \advance\multirow@dima#2\dp\@arstrutbox
- \ifdim#2pt<\z@\multirow@dima=-\multirow@dima\fi
- \advance\multirow@dima \multirow@cntb\bigstrutjot
+ \setlength\multirow@dima{#2\ht\@arstrutbox}%
+ \addtolength\multirow@dima{#2\dp\@arstrutbox}%
+ \ifdim#2pt<\z@\setlength\multirow@dima{-\multirow@dima}\fi
+ \addtolength\multirow@dima{\multirow@cntb\bigstrutjot}%
% \end{macrocode}
% \changes{v1.9a}{2016/09/23}{Redo the \cs{vbox} calculation and positioning.}
% The text is set in a \cs{vbox} by calling \cs{multirow@vbox}. \\
-% If the \meta{width} parameter is \texttt{*} set just the text in the \cs{vbox}.
+% If the \meta{width} argument is \texttt{*} set just the text in the \cs{vbox}.
% \begin{macrocode}
\if*#4\multirow@vbox{#1}{}{\hbox{\strut#6\strut}}%
% \end{macrocode}
% Otherwise set it in a \cs{parbox} inside a \cs{vbox}. \\
-% If the \meta{width} parameter is given as ``\texttt{=}'', we calculate
+% If the \meta{width} argument is given as ``\texttt{=}'', we calculate
% \cs{multirow@colwidth} and use that as width of the \cs{parbox}.
% \begin{macrocode}
\else \if=#4\multirow@setcolwidth{#6}%
- \multirow@vbox{#1}{\hsize\multirow@colwidth\@parboxrestore}{\strut#6\strut\par}%
+ \multirow@vbox{#1}{\setlength\hsize{\multirow@colwidth}\@parboxrestore}{\strut#6\strut\par}%
% \end{macrocode}
-% Otherwise the given parameter is used as the width of the \cs{parbox}.
+% Otherwise the given argument is used as the width of the \cs{parbox}.
% \begin{macrocode}
- \else \multirow@vbox{#1}{\hsize#4\@parboxrestore}{\strut#6\strut\par}%
+ \else \multirow@vbox{#1}{\setlength\hsize{#4}\@parboxrestore}{\strut#6\strut\par}%
\fi \fi
% \end{macrocode}
% Now position the \cs{vbox} properly. More details are given in the
@@ -1603,11 +1624,11 @@
% We calculate the required shift in \cs{multirow@dima}.
% \begin{macrocode}
\ifdim#2pt>\z@
- \if#1t\relax\multirow@dima=\ht0\else
- \multirow@dima=\ht\@arstrutbox
- \ifmultirow@prefixt \advance\multirow@dima\bigstrutjot\fi
- \if#1b\relax \advance\multirow@dima\dp\@arstrutbox
- \ifmultirow@prefixb \advance\multirow@dima\bigstrutjot\fi
+ \if#1t\relax\setlength\multirow@dima{\ht0}\else
+ \setlength\multirow@dima{\ht\@arstrutbox}%
+ \ifmultirow@prefixt \addtolength\multirow@dima{\bigstrutjot}\fi
+ \if#1b\relax \addtolength\multirow@dima{\dp\@arstrutbox}%
+ \ifmultirow@prefixb \addtolength\multirow@dima{\bigstrutjot}\fi
\fi
\fi
% \end{macrocode}
@@ -1620,25 +1641,25 @@
% \begin{macrocode}
\else
\if#1b\relax\else
- \advance\multirow@dima-\dp\@arstrutbox
- \ifmultirow@prefixb \advance\multirow@dima-\bigstrutjot\fi
- \if#1t\relax\advance\multirow@dima-\ht\@arstrutbox
- \ifmultirow@prefixt \advance\multirow@dima-\bigstrutjot\fi
- \advance\multirow@dima\ht0
+ \addtolength\multirow@dima{-\dp\@arstrutbox}%
+ \ifmultirow@prefixb \addtolength\multirow@dima{-\bigstrutjot}\fi
+ \if#1t\relax\addtolength\multirow@dima{-\ht\@arstrutbox}%
+ \ifmultirow@prefixt \addtolength\multirow@dima{-\bigstrutjot}\fi
+ \addtolength\multirow@dima{\ht0}%
\fi
\fi
\fi
% \end{macrocode}
% \changes{v2.1}{2016/10/11}{Set depth of final \cs{vbox} to 0, to
% prevent a tall multirow line to push the following rows downwards.}
-% Finally, we add the \meta{vmove} parameter (\verb+#5+), and go into
+% Finally, we add the \meta{vmove} argument (\verb+#5+), and go into
% horizontal mode. Then we shift the box up by putting a \cs{vskip} above it,
% and add it to the output. Because of the \cs{vskip} the resulting box
% will have a height 0. We set the depth of the \cs{vbox}
% to 0, so that it will not influence the depth of the current row.\\
% If \cs{multirowdebug} is true, we show the box.
% \begin{macrocode}
- \advance\multirow@dima#5\relax
+ \addtolength\multirow@dima{#5}%
\leavevmode
\setbox0\vtop{\vskip-\multirow@dima\box0\vss}\dp0=\z@
\ifmultirowdebug{\showboxdepth=5 \showboxbreadth=10 \showbox0}\fi
@@ -1671,12 +1692,14 @@
% \end{macrocode}
% \end{macro}
%
+% \changes{bigstrut v2.4}{2018/12/30}{Add \cs{leavevmode}
+% at the beginning to force horizontal mode}
% \begin{macro}{\bigstrut}
% This macro inserts a strut. Depending on the optional parameter it extends
% above and/or below the standard array/tabular strut.
% \begin{macrocode}
\newcommand\bigstrut[1][x]{%
- \unskip\@tempdima=\ht\@arstrutbox \@tempdimb=\dp\@arstrutbox
+ \leavevmode\unskip\@tempdima=\ht\@arstrutbox \@tempdimb=\dp\@arstrutbox
\ifx #1b\relax \else \advance\@tempdima by \bigstrutjot\fi
\ifx #1t\relax \else \advance\@tempdimb by \bigstrutjot\fi
\hbox{\vrule \@height\@tempdima \@depth\@tempdimb \@width\z@}\ignorespaces}
@@ -1698,7 +1721,7 @@
\RequirePackage{multirow}
% \end{macrocode}
% \begin{macro}{\ldelim}
-% This macro typesets a left delimiter. It calls \cs{multirow} with the proper parameters.
+% This macro typesets a left delimiter. It calls \cs{multirow} with the proper arguments.
% The size of the delimiter is determined by putting a \cs{vbox} with the proper height and
% zero width next to it. The height is the one that \cs{multirow}
% already has calculated in \cs{multirow@dima}.
@@ -1715,7 +1738,7 @@
%
% \begin{macro}{\rdelim}
% This macro typesets a right delimiter. It calls \cs{multirow} with the
-% proper parameters, similar to \cs{ldelim}.
+% proper arguments, similar to \cs{ldelim}.
% \changes{bigdelim v2.3}{2018/08/03}{Replace \cs{textrm} by \cs{textnormal}}
% \begin{macrocode}
\newcommand\rdelim[3]{\@ifnextchar[{\@rdelim{#1}{#2}{#3}}{\@rdelim{#1}{#2}{#3}[\null]}}
@@ -1739,7 +1762,7 @@
%
% In this section we explain the \cs{vbox} positioning in \cs{multirow}.
% The positioning depends on the \meta{nrows}, \meta{vpos},
-% \meta{bigstruts} and \meta{vmove} parameters. The box is constructed with \cs{vtop}. The
+% \meta{bigstruts} and \meta{vmove} arguments. The box is constructed with \cs{vtop}. The
% algorithm of \cs{vtop} is described in \emph{The \TeX{}book}, p.~81.
%
% Each case is described by a figure. In the figure the lefthand column
@@ -1755,11 +1778,11 @@
%
% {topstrut} = \cs{bigstrutjot} if there is a \cs{bigstrut} on the top of
% the first row (as indicated by the \texttt{t} prefix in the
-% \meta{bigstruts} parameter), otherwise 0.
+% \meta{bigstruts} argument), otherwise 0.
%
% {botstrut} = \cs{bigstrutjot} if there is a \cs{bigstrut} on bottom of
% the last row (as indicated by the \texttt{b} prefix in the
-% \meta{bigstruts} parameter), otherwise 0.
+% \meta{bigstruts} argument), otherwise 0.
%
% h1 = $\textrm{height of a tabular row} + \textrm{topstrut}$
%
diff --git a/Master/texmf-dist/tex/latex/multirow/bigdelim.sty b/Master/texmf-dist/tex/latex/multirow/bigdelim.sty
index 766b5556e95..339052154ed 100644
--- a/Master/texmf-dist/tex/latex/multirow/bigdelim.sty
+++ b/Master/texmf-dist/tex/latex/multirow/bigdelim.sty
@@ -19,11 +19,11 @@
%% 2005/12/01 or later.
%%
%% Copyright (C) 1994 by \O ystein Bache
-%% Copyright (C) 2016 , 2018 by Piet van Oostrum <piet@vanoostrum.org>
+%% Copyright (C) 2016 , 2018, 2019 by Piet van Oostrum <piet@vanoostrum.org>
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bigdelim}
- [2018/08/03 v2.3
+ [2019/01/01 v2.4
Create big delimiters in tabular or array]
\RequirePackage{multirow}
\newcommand\ldelim[3]{\@ifnextchar[{\@ldelim{#1}{#2}{#3}}{\@ldelim{#1}{#2}{#3}[\null]}}
diff --git a/Master/texmf-dist/tex/latex/multirow/bigstrut.sty b/Master/texmf-dist/tex/latex/multirow/bigstrut.sty
index b9ce9834b29..eaa934c36d1 100644
--- a/Master/texmf-dist/tex/latex/multirow/bigstrut.sty
+++ b/Master/texmf-dist/tex/latex/multirow/bigstrut.sty
@@ -19,15 +19,15 @@
%% 2005/12/01 or later.
%%
%% Copyright (C) 1994 by Jerry Leichter
-%% Copyright (C) 2016 , 2018 by Piet van Oostrum <piet@vanoostrum.org>
+%% Copyright (C) 2016 , 2018, 2019 by Piet van Oostrum <piet@vanoostrum.org>
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bigstrut}
- [2018/08/03 v2.3
+ [2019/01/01 v2.4
Provide larger struts in tabulars]
\@ifundefined{bigstrutjot}{\newdimen\bigstrutjot}{}\bigstrutjot=2pt
\newcommand\bigstrut[1][x]{%
- \unskip\@tempdima=\ht\@arstrutbox \@tempdimb=\dp\@arstrutbox
+ \leavevmode\unskip\@tempdima=\ht\@arstrutbox \@tempdimb=\dp\@arstrutbox
\ifx #1b\relax \else \advance\@tempdima by \bigstrutjot\fi
\ifx #1t\relax \else \advance\@tempdimb by \bigstrutjot\fi
\hbox{\vrule \@height\@tempdima \@depth\@tempdimb \@width\z@}\ignorespaces}
diff --git a/Master/texmf-dist/tex/latex/multirow/multirow.sty b/Master/texmf-dist/tex/latex/multirow/multirow.sty
index b5798315f58..88c8ce3daab 100644
--- a/Master/texmf-dist/tex/latex/multirow/multirow.sty
+++ b/Master/texmf-dist/tex/latex/multirow/multirow.sty
@@ -19,11 +19,11 @@
%% 2005/12/01 or later.
%%
%% Copyright (C) 1994 by Jerry Leichter
-%% Copyright (C) 2016 , 2018 by Piet van Oostrum <piet@vanoostrum.org>
+%% Copyright (C) 2016 , 2018, 2019 by Piet van Oostrum <piet@vanoostrum.org>
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{multirow}%
- [2018/08/03 v2.3
+ [2019/01/01 v2.4
Span multiple rows of a table]%
\newif\ifmultirowdebug
\DeclareOption{debug}{\multirowdebugtrue}
@@ -115,34 +115,34 @@
\fi}
\def\@xmultirow[#1]#2[#3]#4[#5]#6{%
\expandafter\multirow@piii#3\relax\end%
- \multirow@dima=#2\ht\@arstrutbox
- \advance\multirow@dima#2\dp\@arstrutbox
- \ifdim#2pt<\z@\multirow@dima=-\multirow@dima\fi
- \advance\multirow@dima \multirow@cntb\bigstrutjot
+ \setlength\multirow@dima{#2\ht\@arstrutbox}%
+ \addtolength\multirow@dima{#2\dp\@arstrutbox}%
+ \ifdim#2pt<\z@\setlength\multirow@dima{-\multirow@dima}\fi
+ \addtolength\multirow@dima{\multirow@cntb\bigstrutjot}%
\if*#4\multirow@vbox{#1}{}{\hbox{\strut#6\strut}}%
\else \if=#4\multirow@setcolwidth{#6}%
- \multirow@vbox{#1}{\hsize\multirow@colwidth\@parboxrestore}{\strut#6\strut\par}%
- \else \multirow@vbox{#1}{\hsize#4\@parboxrestore}{\strut#6\strut\par}%
+ \multirow@vbox{#1}{\setlength\hsize{\multirow@colwidth}\@parboxrestore}{\strut#6\strut\par}%
+ \else \multirow@vbox{#1}{\setlength\hsize{#4}\@parboxrestore}{\strut#6\strut\par}%
\fi \fi
\ifdim#2pt>\z@
- \if#1t\relax\multirow@dima=\ht0\else
- \multirow@dima=\ht\@arstrutbox
- \ifmultirow@prefixt \advance\multirow@dima\bigstrutjot\fi
- \if#1b\relax \advance\multirow@dima\dp\@arstrutbox
- \ifmultirow@prefixb \advance\multirow@dima\bigstrutjot\fi
+ \if#1t\relax\setlength\multirow@dima{\ht0}\else
+ \setlength\multirow@dima{\ht\@arstrutbox}%
+ \ifmultirow@prefixt \addtolength\multirow@dima{\bigstrutjot}\fi
+ \if#1b\relax \addtolength\multirow@dima{\dp\@arstrutbox}%
+ \ifmultirow@prefixb \addtolength\multirow@dima{\bigstrutjot}\fi
\fi
\fi
\else
\if#1b\relax\else
- \advance\multirow@dima-\dp\@arstrutbox
- \ifmultirow@prefixb \advance\multirow@dima-\bigstrutjot\fi
- \if#1t\relax\advance\multirow@dima-\ht\@arstrutbox
- \ifmultirow@prefixt \advance\multirow@dima-\bigstrutjot\fi
- \advance\multirow@dima\ht0
+ \addtolength\multirow@dima{-\dp\@arstrutbox}%
+ \ifmultirow@prefixb \addtolength\multirow@dima{-\bigstrutjot}\fi
+ \if#1t\relax\addtolength\multirow@dima{-\ht\@arstrutbox}%
+ \ifmultirow@prefixt \addtolength\multirow@dima{-\bigstrutjot}\fi
+ \addtolength\multirow@dima{\ht0}%
\fi
\fi
\fi
- \advance\multirow@dima#5\relax
+ \addtolength\multirow@dima{#5}%
\leavevmode
\setbox0\vtop{\vskip-\multirow@dima\box0\vss}\dp0=\z@
\ifmultirowdebug{\showboxdepth=5 \showboxbreadth=10 \showbox0}\fi