texlive[42588] Master/texmf-dist: multirow (26nov16)

commits+karl at tug.org commits+karl at tug.org
Sat Nov 26 23:45:24 CET 2016


Revision: 42588
          http://tug.org/svn/texlive?view=revision&revision=42588
Author:   karl
Date:     2016-11-26 23:45:23 +0100 (Sat, 26 Nov 2016)
Log Message:
-----------
multirow (26nov16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/multirow/README
    trunk/Master/texmf-dist/doc/latex/multirow/multirow.pdf
    trunk/Master/texmf-dist/source/latex/multirow/multirow.dtx
    trunk/Master/texmf-dist/tex/latex/multirow/bigdelim.sty
    trunk/Master/texmf-dist/tex/latex/multirow/bigstrut.sty
    trunk/Master/texmf-dist/tex/latex/multirow/multirow.sty

Modified: trunk/Master/texmf-dist/doc/latex/multirow/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/multirow/README	2016-11-26 22:45:12 UTC (rev 42587)
+++ trunk/Master/texmf-dist/doc/latex/multirow/README	2016-11-26 22:45:23 UTC (rev 42588)
@@ -1,6 +1,6 @@
-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 at vanoostrum.org>
@@ -7,7 +7,7 @@
 
  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:
 

Modified: trunk/Master/texmf-dist/doc/latex/multirow/multirow.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/multirow/multirow.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/multirow/multirow.dtx	2016-11-26 22:45:12 UTC (rev 42587)
+++ trunk/Master/texmf-dist/source/latex/multirow/multirow.dtx	2016-11-26 22:45:23 UTC (rev 42588)
@@ -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,10 +121,18 @@
 %   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
 % the defined width of the column in which the \cs{multirow} appears.
@@ -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 at cnta}
+% \changes{v2.2}{2016/11/25}{Eliminate \cs{multirow at cnta.}}
 % \begin{macro}{\multirow at cntb}
 % \begin{macro}{\multirow at dima}
 %   Define two counters and a length for internal use in \cs{multirow}.
 %    \begin{macrocode}
-\newcount\multirow at cnta
 \newcount\multirow at cntb
 \newlength\multirow at dima
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
-% \end{macro}
 % \begin{macro}{\multirow at setcolwidth}
 % This macro calculates \cs{multirow at 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 at setcolwidth#1{%
-    \ifx\TY at final\@undefined \multirow at colwidth=\hsize
+    \ifx\TY at final\multirow at undefined \multirow at colwidth=\hsize
     \else
       \ifx\TY at box\TY at box@v\multirow at 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 at 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 at cnta=#2%
+\def\@xmultirow[#1]#2[#3]#4[#5]#6{%
   \expandafter\multirow at piii#3\relax\end%
-  \multirow at dima=\multirow at cnta\ht\@arstrutbox
-  \advance\multirow at dima\multirow at cnta\dp\@arstrutbox
-  \ifnum\multirow at cnta<0\multirow at dima=-\multirow at dima\fi
+  \multirow at dima=#2\ht\@arstrutbox
+  \advance\multirow at dima#2\dp\@arstrutbox
+  \ifdim#2pt<\z@\multirow at dima=-\multirow at dima\fi
   \advance\multirow at dima \multirow at 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 at prefixb}).\\
 % We calculate the required shift  in \cs{multirow at dima}.
 %    \begin{macrocode}
-  \ifnum\multirow at cnta>0
+  \ifdim#2pt>\z@
     \if#1t\relax\multirow at dima=\ht0\else
       \multirow at dima=\ht\@arstrutbox
       \ifmultirow at prefixt \advance\multirow at dima\bigstrutjot\fi

Modified: trunk/Master/texmf-dist/tex/latex/multirow/bigdelim.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/multirow/bigdelim.sty	2016-11-26 22:45:12 UTC (rev 42587)
+++ trunk/Master/texmf-dist/tex/latex/multirow/bigdelim.sty	2016-11-26 22:45:23 UTC (rev 42588)
@@ -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]}}

Modified: trunk/Master/texmf-dist/tex/latex/multirow/bigstrut.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/multirow/bigstrut.sty	2016-11-26 22:45:12 UTC (rev 42587)
+++ trunk/Master/texmf-dist/tex/latex/multirow/bigstrut.sty	2016-11-26 22:45:23 UTC (rev 42588)
@@ -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]{%

Modified: trunk/Master/texmf-dist/tex/latex/multirow/multirow.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/multirow/multirow.sty	2016-11-26 22:45:12 UTC (rev 42587)
+++ trunk/Master/texmf-dist/tex/latex/multirow/multirow.sty	2016-11-26 22:45:23 UTC (rev 42588)
@@ -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 at colwidth}
-\newcount\multirow at cnta
 \newcount\multirow at cntb
 \newlength\multirow at dima
 \def\multirow at setcolwidth#1{%
-    \ifx\TY at final\@undefined \multirow at colwidth=\hsize
+    \ifx\TY at final\multirow at undefined \multirow at colwidth=\hsize
     \else
       \ifx\TY at box\TY at box@v\multirow at colwidth=\hsize
       \else \setbox0\hbox
@@ -114,11 +113,11 @@
     \else \multirow at cntb=#1#2#3%
     \fi
   \fi}
-\def\@xmultirow[#1]#2[#3]#4[#5]#6{\multirow at cnta=#2%
+\def\@xmultirow[#1]#2[#3]#4[#5]#6{%
   \expandafter\multirow at piii#3\relax\end%
-  \multirow at dima=\multirow at cnta\ht\@arstrutbox
-  \advance\multirow at dima\multirow at cnta\dp\@arstrutbox
-  \ifnum\multirow at cnta<0\multirow at dima=-\multirow at dima\fi
+  \multirow at dima=#2\ht\@arstrutbox
+  \advance\multirow at dima#2\dp\@arstrutbox
+  \ifdim#2pt<\z@\multirow at dima=-\multirow at dima\fi
   \advance\multirow at dima \multirow at cntb\bigstrutjot
   \if*#4\multirow at vbox{#1}{}{\hbox{\strut#6\strut}}%
   \else \if=#4\multirow at setcolwidth{#6}%
@@ -125,7 +124,7 @@
     \multirow at vbox{#1}{\hsize\multirow at colwidth\@parboxrestore}{\strut#6\strut\par}%
   \else \multirow at vbox{#1}{\hsize#4\@parboxrestore}{\strut#6\strut\par}%
   \fi \fi
-  \ifnum\multirow at cnta>0
+  \ifdim#2pt>\z@
     \if#1t\relax\multirow at dima=\ht0\else
       \multirow at dima=\ht\@arstrutbox
       \ifmultirow at prefixt \advance\multirow at dima\bigstrutjot\fi



More information about the tex-live-commits mailing list