summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-26 22:45:23 +0000
committerKarl Berry <karl@freefriends.org>2016-11-26 22:45:23 +0000
commitf1f093e6f46e846382bc73efff615dd856604044 (patch)
treef9103e8c1e3d8a7782952359dc172b245e271dea /Master/texmf-dist
parent1047aeae9ba9b5a7f1b980914904fef6f2a0ed81 (diff)
multirow (26nov16)
git-svn-id: svn://tug.org/texlive/trunk@42588 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/multirow/README8
-rw-r--r--Master/texmf-dist/doc/latex/multirow/multirow.pdfbin609825 -> 607912 bytes
-rw-r--r--Master/texmf-dist/source/latex/multirow/multirow.dtx128
-rw-r--r--Master/texmf-dist/tex/latex/multirow/bigdelim.sty2
-rw-r--r--Master/texmf-dist/tex/latex/multirow/bigstrut.sty2
-rw-r--r--Master/texmf-dist/tex/latex/multirow/multirow.sty15
6 files changed, 116 insertions, 39 deletions
diff --git a/Master/texmf-dist/doc/latex/multirow/README b/Master/texmf-dist/doc/latex/multirow/README
index 2feb9c738cb..489418db201 100644
--- a/Master/texmf-dist/doc/latex/multirow/README
+++ b/Master/texmf-dist/doc/latex/multirow/README
@@ -1,13 +1,13 @@
-multirow.sty V2.1 version (2016/10/11)
-bigstruts.sty V2.1 version (2016/10/11)
-bigdelim.sty V2.1 version (2016/10/11)
+multirow.sty 2016/11/25 v2.2
+bigstruts.sty 2016/11/25 v2.2
+bigdelim.sty 2016/11/25 v2.2
Original Author: Jerry Leichter
Current Author: Piet van Oostrum <piet@vanoostrum.org>
This file may be distributed under the terms of the LaTeX Project Public
License, as described in lppl.txt in the base LaTeX distribution.
- Either version 1 or, at your option, any later version.
+ Either version 1.3 or, at your option, any later version.
Installation:
diff --git a/Master/texmf-dist/doc/latex/multirow/multirow.pdf b/Master/texmf-dist/doc/latex/multirow/multirow.pdf
index a0753f26c19..113f0273016 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 073967b6958..336e682858e 100644
--- a/Master/texmf-dist/source/latex/multirow/multirow.dtx
+++ b/Master/texmf-dist/source/latex/multirow/multirow.dtx
@@ -32,7 +32,7 @@
%<multirow>\ProvidesPackage{multirow}%
%<bigstrut>\ProvidesPackage{bigstrut}
%<bigdelim>\ProvidesPackage{bigdelim}
-%<multirow|bigstrut|bigdelim> [2016/10/11 v2.1
+%<multirow|bigstrut|bigdelim> [2016/11/25 v2.2
%<multirow> Span multiple rows of a table]%
%<bigstrut> Provide larger struts in tabulars]
%<bigdelim> Create big delimiters in tabular or array]
@@ -48,6 +48,10 @@
\usepackage{calc}
\usepackage{url}
\usepackage{tikz}
+\usepackage{hhline}
+\usepackage{color}
+\usepackage{etoolbox}
+\AtBeginEnvironment{macrocode}{\color{red}}
\newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}}
\DisableCrossrefs
\CodelineIndex
@@ -62,7 +66,7 @@
%</driver>
% \fi
%
-% \CheckSum{434}
+% \CheckSum{0}
%
% \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
@@ -117,9 +121,17 @@
% single multirow, to indicate a relationship between other rows; and
% \end{description}
%
-% \section{Changes in version 2.0}
+% \section{Changes in version 2}
% \label{sec:changes-2}
%
+%\subsection*{version 2.2}
+%
+% \begin{itemize}
+% \item Support for fractional values of \meta{nrows}.
+% \end{itemize}
+%
+%\subsection*{version 2.0}
+%
% \begin{itemize}
% \item \cs{multirow} now has an first optional parameter \oarg{vpos}.
% \item The \meta{width} parameter can be specified as \texttt{=} to use
@@ -145,7 +157,8 @@
% rows and columns that the text spans the multirow block. Usually this
% covers one column, but by combining it with \cs{multicolumn} more
% columns can be covered.
-% \changes{v2.1}{2016/10/06}{Rename \meta{fixup} to \meta{vmove} as in The LaTeX Companion.}
+% \changes{v2.1}{2016/10/06}{Rename \meta{fixup} to \meta{vmove} in the
+% documentation as in The LaTeX Companion.}
%
% The basic syntax is:
% \begin{quote}
@@ -161,7 +174,8 @@
% will over-write it. With a positive value of \meta{nrows} the
% spanned columns are this row and (\meta{nrows}-1) rows below
% it. With a negative value of \meta{nrows} they are this row and
-% (1-\meta{nrows}) above it.
+% (1-\meta{nrows}) above it. Fractional values are permitted for
+% \meta{nrows}; this allows for some fine-tuning.
%
% \item[\meta{bigstruts}] is mainly used if you've used the
% \Package{bigstrut} package. In that case it is the total number of uses of
@@ -179,7 +193,7 @@
% be used, and \texttt{=} to indicate that the specified width of the column in
% which the \cs{multirow} entry is set should be used.
%
-% \item[\meta{vmove}] is a length used for fine tuning: the text will be
+% \item[\meta{vmove}] is a length used for fine-tuning: the text will be
% raised (or lowered, if \meta{vmove} is negative) by that length
% above (below) wherever it would otherwise have gone.
%
@@ -203,7 +217,7 @@
%
% 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{tabulary}, \environment{supertabular}, \environment{ltablex},
% \environment{xtab}, \environment{longtable}, \environment{tabu},
% \environment{booktabs} and \environment{ctable}. For some of these you
% have to pay special attention to certain cases, see below.
@@ -438,16 +452,18 @@
% bottom row, which would make it stick out of the bottom. Therefore we
% applied a \meta{vmove} of 12mm. The \meta{vmove} usually requires some experimentation.
%
-% \subsection{Fine Tuning}
+% \subsection{Fine-Tuning}
% \label{sec:fine-tuning}
%
% If any of the spanned rows are unusually large, or if you're using the
% \Package{bigstrut} package and \cs{bigstrut}s are used asymetrically about the
% centerline of the spanned rows, the vertical centering may not come
-% out right. Use the \meta{vmove} parameter in this case.
+% out right. Use the \meta{vmove} parameter in this case. Sometimes it
+% may be more helpful to just use a larger value for \meta{nrows},
+% including fractional values. See an example in section~\ref{sec:dealing-with-tall}.
%
% It's just about impossible to deal correctly with descenders. The
-% text will be set up centred, but it may then have a baseline that
+% text will be set up centered, but it may then have a baseline that
% doesn't match the baseline of the stuff beside it, in particular if
% the stuff beside it has descenders and \meta{text} does not. This may
% result in a small misalignment. About all that can be done is to do a
@@ -500,10 +516,13 @@
% \end{tabular}
% \end{quote}
%
+%
+% \subsection{Multirow and colored cells}\label{sec:mult-color-cells}
+%
% If you use \cs{multirow} with the \Package{colortbl} package you have
% \index{colortbl=\Package{colortbl}|usage}
-% to take precautions if you want to colour the column that has the
-% \cs{multirow} in it. The \Package{colortbl} package works by colouring each cell
+% to take precautions if you want to color the column that has the
+% \cs{multirow} in it. The \Package{colortbl} package works by coloring each cell
% separately. So if you use \cs{multirow} with a positive \meta{nrows}
% value, \Package{colortbl} will first color the top cell, then
% \cs{multirow} will typeset \meta{nrows} cells starting with this cell,
@@ -529,7 +548,65 @@
% \end{tabular}
% \end{quote}
%
-% \subsection{Fine tuning the \meta{bigstruts} parameter}
+% \index{hhline=\Package{hhline}|usage}
+% When you use colored multirow cells together with the
+% \Package{hhline} package you may find some white stripes in your
+% colored multirow cell. For example:
+% \begin{quote}
+% \begin{verbatim}
+% \begin{tabular}{|>{\columncolor{red}}c|c|}
+% \hline
+% \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline
+% First data & 932\\ \hline
+% & 239\\ \hhline{|~|-|}
+% & 137\\ \hhline{|~|-|}
+% \multirow{-3}{*}{More data} & 319\\ \hline
+% Last data & 132\\ \hline
+% \end{tabular}
+% \end{verbatim}
+% \end{quote}
+%
+% \begin{quote}
+% \begin{tabular}{|>{\columncolor{red}}c|c|}
+% \hline
+% \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline
+% First data & 932\\ \hline
+% & 239\\ \hhline{|~|-|}
+% & 137\\ \hhline{|~|-|}
+% \multirow{-3}{*}{More data} & 319\\ \hline
+% Last data & 132\\ \hline
+% \end{tabular}
+% \end{quote}
+%
+% This can be solved by putting colored horizontal rules with the same
+% color in the colored multirow cell.
+% \begin{quote}
+% \begin{verbatim}
+% \begin{tabular}{|>{\columncolor{red}}c|c|}
+% \hline
+% \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline
+% First data & 932\\ \hline
+% & 239\\ \hhline{|>{\arrayrulecolor{red}}->{\arrayrulecolor{black}}|-|}
+% & 137\\ \hhline{|>{\arrayrulecolor{red}}->{\arrayrulecolor{black}}|-|}
+% \multirow{-3}{*}{More data} & 319\\ \hline
+% Last data & 132\\ \hline
+% \end{tabular}
+% \end{verbatim}
+% \end{quote}
+%
+% \begin{quote}
+% \begin{tabular}{|>{\columncolor{red}}c|c|}
+% \hline
+% \bfseries ColumnOne & \bfseries ColumnTwo\\ \hline
+% First data & 932\\ \hline
+% & 239\\ \hhline{|>{\arrayrulecolor{red}}->{\arrayrulecolor{black}}|-|}
+% & 137\\ \hhline{|>{\arrayrulecolor{red}}->{\arrayrulecolor{black}}|-|}
+% \multirow{-3}{*}{More data} & 319\\ \hline
+% Last data & 132\\ \hline
+% \end{tabular}
+% \end{quote}
+%
+% \subsection{Fine-tuning the \meta{bigstruts} parameter}
% \label{sect-refine-bigstrut}
%
% \cs{multirow} can calculate the height of the required multirow box
@@ -1175,8 +1252,8 @@
% \index{colortbl=\Package{colortbl}|usage}
% parameter. 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 non-integral values).
+% If there are unusually tall rows you may have to enlarge \meta{n}
+% (you can use fractional values).
% If you have horizontal lines that interact with the braces you are
% \index{hhline=\Package{hhline}|usage}
% advised to use the \Package{hhline} package to make the lines.
@@ -1369,18 +1446,16 @@
%
% \changes{v1.9}{2016/09/15}{Give \Package{multirow} its own temp
% registers, so that we can safely pass the box height to \Package{bigdelim}.}
-% \begin{macro}{\multirow@cnta}
+% \changes{v2.2}{2016/11/25}{Eliminate \cs{multirow@cnta.}}
% \begin{macro}{\multirow@cntb}
% \begin{macro}{\multirow@dima}
% Define two counters and a length for internal use in \cs{multirow}.
% \begin{macrocode}
-\newcount\multirow@cnta
\newcount\multirow@cntb
\newlength\multirow@dima
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
% \begin{macro}{\multirow@setcolwidth}
% This macro calculates \cs{multirow@colwidth} for an entry that has the
% \meta{width} given as ``\texttt{=}''. We check if we are inside a
@@ -1394,7 +1469,7 @@
% This algorithm is not perfect, but good enough in most cases.
% \begin{macrocode}
\def\multirow@setcolwidth#1{%
- \ifx\TY@final\@undefined \multirow@colwidth=\hsize
+ \ifx\TY@final\multirow@undefined \multirow@colwidth=\hsize
\else
\ifx\TY@box\TY@box@v\multirow@colwidth=\hsize
\else \setbox0\hbox
@@ -1474,13 +1549,16 @@
%
% This is the real workhorse. It starts with splitting the
% \meta{bigstruts} parameter, and then calculating the height of the multirow box.
-% \meta{nrows} is saved in \cs{multirow@cnta}.
+% \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.
% \begin{macrocode}
-\def\@xmultirow[#1]#2[#3]#4[#5]#6{\multirow@cnta=#2%
+\def\@xmultirow[#1]#2[#3]#4[#5]#6{%
\expandafter\multirow@piii#3\relax\end%
- \multirow@dima=\multirow@cnta\ht\@arstrutbox
- \advance\multirow@dima\multirow@cnta\dp\@arstrutbox
- \ifnum\multirow@cnta<0\multirow@dima=-\multirow@dima\fi
+ \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
% \end{macrocode}
% \changes{v1.9a}{2016/09/23}{Redo the \cs{vbox} calculation and positioning.}
@@ -1517,7 +1595,7 @@
% + (\cs{bigstrutjot} \cs{ifmultirow@prefixb}).\\
% We calculate the required shift in \cs{multirow@dima}.
% \begin{macrocode}
- \ifnum\multirow@cnta>0
+ \ifdim#2pt>\z@
\if#1t\relax\multirow@dima=\ht0\else
\multirow@dima=\ht\@arstrutbox
\ifmultirow@prefixt \advance\multirow@dima\bigstrutjot\fi
diff --git a/Master/texmf-dist/tex/latex/multirow/bigdelim.sty b/Master/texmf-dist/tex/latex/multirow/bigdelim.sty
index bb47c93d48b..499186a007b 100644
--- a/Master/texmf-dist/tex/latex/multirow/bigdelim.sty
+++ b/Master/texmf-dist/tex/latex/multirow/bigdelim.sty
@@ -23,7 +23,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bigdelim}
- [2016/10/11 v2.1
+ [2016/11/25 v2.2
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 f18debf971a..edcad6222bf 100644
--- a/Master/texmf-dist/tex/latex/multirow/bigstrut.sty
+++ b/Master/texmf-dist/tex/latex/multirow/bigstrut.sty
@@ -23,7 +23,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bigstrut}
- [2016/10/11 v2.1
+ [2016/11/25 v2.2
Provide larger struts in tabulars]
\@ifundefined{bigstrutjot}{\newdimen\bigstrutjot}{}\bigstrutjot=2pt
\newcommand\bigstrut[1][x]{%
diff --git a/Master/texmf-dist/tex/latex/multirow/multirow.sty b/Master/texmf-dist/tex/latex/multirow/multirow.sty
index 33853c8e365..2a67c0fda89 100644
--- a/Master/texmf-dist/tex/latex/multirow/multirow.sty
+++ b/Master/texmf-dist/tex/latex/multirow/multirow.sty
@@ -23,7 +23,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{multirow}%
- [2016/10/11 v2.1
+ [2016/11/25 v2.2
Span multiple rows of a table]%
\newif\ifmultirowdebug
\DeclareOption{debug}{\multirowdebugtrue}
@@ -82,11 +82,10 @@
}
\ProcessOptions
\newlength{\multirow@colwidth}
-\newcount\multirow@cnta
\newcount\multirow@cntb
\newlength\multirow@dima
\def\multirow@setcolwidth#1{%
- \ifx\TY@final\@undefined \multirow@colwidth=\hsize
+ \ifx\TY@final\multirow@undefined \multirow@colwidth=\hsize
\else
\ifx\TY@box\TY@box@v\multirow@colwidth=\hsize
\else \setbox0\hbox
@@ -114,18 +113,18 @@
\else \multirow@cntb=#1#2#3%
\fi
\fi}
-\def\@xmultirow[#1]#2[#3]#4[#5]#6{\multirow@cnta=#2%
+\def\@xmultirow[#1]#2[#3]#4[#5]#6{%
\expandafter\multirow@piii#3\relax\end%
- \multirow@dima=\multirow@cnta\ht\@arstrutbox
- \advance\multirow@dima\multirow@cnta\dp\@arstrutbox
- \ifnum\multirow@cnta<0\multirow@dima=-\multirow@dima\fi
+ \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
\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}%
\fi \fi
- \ifnum\multirow@cnta>0
+ \ifdim#2pt>\z@
\if#1t\relax\multirow@dima=\ht0\else
\multirow@dima=\ht\@arstrutbox
\ifmultirow@prefixt \advance\multirow@dima\bigstrutjot\fi