texlive[42279] Master/texmf-dist: multirow (11oct16)

commits+karl at tug.org commits+karl at tug.org
Sun Oct 16 00:58:47 CEST 2016


Revision: 42279
          http://tug.org/svn/texlive?view=revision&revision=42279
Author:   karl
Date:     2016-10-16 00:58:47 +0200 (Sun, 16 Oct 2016)
Log Message:
-----------
multirow (11oct16)

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-10-15 22:58:34 UTC (rev 42278)
+++ trunk/Master/texmf-dist/doc/latex/multirow/README	2016-10-15 22:58:47 UTC (rev 42279)
@@ -1,6 +1,6 @@
-multirow.sty  V2.0 version (2016/09/27) 
-bigstruts.sty  V2.0 version (2016/09/27) 
-bigdelim.sty  V2.0 version (2016/09/27) 
+multirow.sty  V2.1 version (2016/10/11) 
+bigstruts.sty  V2.1 version (2016/10/11) 
+bigdelim.sty  V2.1 version (2016/10/11) 
 
 Original Author: Jerry Leichter
 Current Author:  Piet van Oostrum <piet at vanoostrum.org>
@@ -9,11 +9,20 @@
  License, as described in lppl.txt in the base LaTeX distribution.
  Either version 1 or, at your option, any later version.
 
+Installation:
+
+To generate the .sty files, run the command
+   tex multirow.ins
+and move the resulting .sty files to a place where LaTeX can find them, preferably
+..../tex/latex/multirow
+
+Usage:
+
 multirow.sty:
 
 Make an entry that will span multiple rows of a table.
 
-\multirow[vpos]{nrows}[bigstruts]{width}[fixup]{text}
+\multirow[vpos]{nrows}[bigstruts]{width}[vmove]{text}
 
 vpos is the vertical positioning: t. c. or b.
 
@@ -46,8 +55,8 @@
       The text is centered vertically within the range spanned by nrows,
 	  unless a vpos argument is given.
 
-fixup is a length used for fine tuning:  The text will be raised (or
-      lowered, if fixup is negative) by that length above (below) wherever
+vmove is a length used for fine tuning:  The text will be raised (or
+      lowered, if vmove is negative) by that length above (below) wherever
        it would otherwise have gone.
 
 For example (using both multirow and bigstrut)
@@ -79,49 +88,11 @@
 If any of the spanned rows are unusually large, or if you're using
 bigstrut.sty and \bigstrut's are used assymetrically about the centerline of
 the spanned rows, the vertical centering may not come out right.  Use the
-fixup argument in this case.
+vmove argument in this case.
 
 Just before "text" is expanded, the \multirowsetup macro is expanded to      
 set up any special environment.  Initially, \multirowsetup contains just
 \raggedright.  It can be redefined with \renewcommand.
-
-Bugs:  It's just about impossible to deal correctly with descenders.  The
-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 "text" does not.  This may result in a small
-missalignment.  About all that can be done is to do a final touchup on
-"text", using the fixup optional argument.  (Hint:  If you use a measure
-like .1ex, there's a reasonable chance that the fixup will still be correct
-if you change the point size.)
-
-\multirow is mainly designed for use with table, as opposed to array,
-environments.  It will not work well in an array environment since the lines
-have an extra \jot of space between them which it won't account for.  Fixing
-this is difficult in general, and doesn't seem worth it.  The bigstruts
-argument can be used to provide a semi-automatic fix:  First set
-\bigstrutjot to .5\jot.  Then simply repeat nrows as the bigstruts argument.
-This will be close, but probably not exact; you can use the fixup argument
-to refine the result.  (If you do this repeatedly, you'll probably want to
-wrap these steps up in a simple macro.  Note that the modified \bigstrutjot
-value will not give reasonable results if you have bigstruts and use this
-argument for its intended purpose elsewhere.  In that case, you might want 
-to set it locally.)
-
-If you use \multirow with the colortbl package you have to take
-precautions if you want to color the column that has the \multirow in it.
-colortbl works by coloring each cell separately. So if you use \multirow
-with a positive nrows value, colortbl will first color the top cell, then
-\multirow will typeset nrows cells starting with this cell, and later
-colortbl will color the other cells, effectively hiding the text in that
-area. This can be solved by putting the \multirow is the last row with a
-negative nrows value.
-Example:
-
- \begin{tabular}{l>{\columncolor{yellow}}l}
-   aaaa & \\
-   cccc & \\
-   dddd & \multirow{-3}*{bbbb}\\
- \end{tabular}
  
 bigstrut.sty:
 

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-10-15 22:58:34 UTC (rev 42278)
+++ trunk/Master/texmf-dist/source/latex/multirow/multirow.dtx	2016-10-15 22:58:47 UTC (rev 42279)
@@ -32,7 +32,7 @@
 %<multirow>\ProvidesPackage{multirow}%
 %<bigstrut>\ProvidesPackage{bigstrut}
 %<bigdelim>\ProvidesPackage{bigdelim}
-%<multirow|bigstrut|bigdelim>           [2016/09/27 v2.0
+%<multirow|bigstrut|bigdelim>           [2016/10/11 v2.1
 %<multirow>                  Span multiple rows of a table]%
 %<bigstrut>                  Provide larger struts in tabulars]
 %<bigdelim>                  Create big delimiters in tabular or array]
@@ -45,6 +45,7 @@
 \usepackage{tabulary}
 \usepackage{longtable}
 \usepackage{booktabs}
+\usepackage{calc}
 \usepackage{url}
 \usepackage{tikz}
 \newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}}
@@ -61,7 +62,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{440}
+% \CheckSum{434}
 %
 % \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
@@ -144,10 +145,11 @@
 % 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.}
 %
 % The basic syntax is:
 % \begin{quote}
-%   \cmd{\multirow}\oarg{vpos}\marg{nrows}\oarg{bigstruts}\marg{width}\oarg{fixup}\marg{text}
+%   \cmd{\multirow}\oarg{vpos}\marg{nrows}\oarg{bigstruts}\marg{width}\oarg{vmove}\marg{text}
 % \end{quote}
 % where
 % \begin{description}
@@ -177,8 +179,8 @@
 %   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{fixup}] is a length used for fine tuning: the text will be
-%   raised (or lowered, if \meta{fixup} is negative) by that length
+% \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.
 %
 % \item[\meta{text}] is the actual text of the construct.  If the width
@@ -375,7 +377,7 @@
 % can make about the height is the number of rows${}\times{}$the normal
 % 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{fixup}
+% box. If you want it to be centered, you have to supply a \meta{vmove}
 % parameter to shift it down.
 % \item We have used an \cs{extrarowheight}\footnote{This is only
 % available with the \Package{array} package, which \Package{tabulary}
@@ -434,7 +436,7 @@
 %
 % In this case the text would be centered somewhere in the
 % bottom row, which would make it stick out of the bottom. Therefore we
-% applied a \meta{fixup} of 12mm. The \meta{fixup} usually requires some experimentation.
+% applied a \meta{vmove} of 12mm. The \meta{vmove} usually requires some experimentation.
 %
 % \subsection{Fine Tuning}
 % \label{sec:fine-tuning}
@@ -442,7 +444,7 @@
 % 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{fixup} parameter in this case.
+% out right.  Use the \meta{vmove} parameter in this case.
 %
 % 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
@@ -449,16 +451,55 @@
 % 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
-% final touchup on \meta{text}, using the fixup optional parameter.
+% final touchup on \meta{text}, using the \meta{vmove} optional parameter.
 % (Hint:  If you use a measure like \texttt{.1ex}, there's a reasonable
-% chance that the fixup will still be correct if you change the point
+% chance that the \meta{vmove} will still be correct if you change the point
 % size.)
 %
 % \cs{multirow} is mainly designed for use with \environment{tabular}, as
 % opposed to \environment{array}, environments.  It might not work well in an
 % array environment if there are big formulas in some rows; in that case you can use the
-% \meta{fixup} parameter to refine the result.
+% \meta{vmove} parameter to refine the result.
 %
+% In some cases you might want to align the multirow entry with the top
+% of the other row cells, for example if you have a large capital in it.
+% when you use \meta{vpos} = \texttt{[t]}, the baselines will be
+% aligned, which is the wrong thing in this case. You can then do the
+% positioning with the \meta{vmove} parameter and let \LaTeX{} calculate
+% the amount. For example:
+%
+% \begin{quote}
+% \begin{verbatim}
+% \usepackage{calc}
+% \newlength{\shiftdown}
+% \setlength{\shiftdown}{\heightof{\Huge\bfseries B}-\heightof{f}}
+% . . .
+% \begin{tabular}{cll}
+%   \toprule
+%   \multirow[t]{5}{*}[-\shiftdown]{\Huge\bfseries B} 
+%                     & foo  & Lorem ipsum dolor sit    \\
+%                     & bar  & Maecenas sed purus       \\
+%                     & baz  & Nullam luctus id tellus  \\
+%                     & qux  & Aenean consequat commodo \\
+%   \bottomrule
+% \end{tabular}
+% \end{verbatim}
+% \end{quote}
+%
+% \begin{quote}
+% \newlength{\shiftdown}
+% \setlength{\shiftdown}{\heightof{\Huge\bfseries B}-\heightof{f}}
+% \begin{tabular}{cll}
+%   \toprule
+%   \multirow[t]{5}{*}[-\shiftdown]{\Huge\bfseries B} 
+%                     & foo  & Lorem ipsum dolor sit    \\
+%                     & bar  & Maecenas sed purus       \\
+%                     & baz  & Nullam luctus id tellus  \\
+%                     & qux  & Aenean consequat commodo \\
+%   \bottomrule
+% \end{tabular}
+% \end{quote}
+%
 % 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
@@ -769,7 +810,7 @@
 % specifies that it should cover 3 rows. However, the second row is not
 % the vertical center in this case because the third row is much taller.
 %
-% To remedy this, the \meta{fixup} parameter could be used. However, in
+% To remedy this, the \meta{vmove} parameter could be used. However, in
 % this case it would be easier to pretend that \cs{multirow} spans 6
 % rows (the total number of lines in the last column). So use
 % \verb+\multirow{6}+\ldots{} and we get:
@@ -1391,7 +1432,7 @@
 % First collect all the parameters and replace missing optional parameters by their default values.
 % \changes{v1.8}{2016/09/14}{Add the optional first parameter \meta{vpos}.}
 %    \begin{macrocode}
-%% \multirow [vpos] {nrows} [bigstruts] {width} [fixup] {text}
+%% \multirow [vpos] {nrows} [bigstruts] {width} [vmove] {text}
 \newcommand\multirow[2][c]{\@multirow[#1]{#2}}
 \def\@multirow[#1]#2{\@ifnextchar[{\@@multirow[#1]#2}{\@@multirow[#1]#2[0]}}
 \def\@@multirow[#1]#2[#3]#4{\@ifnextchar[{\@xmultirow[#1]{#2}[#3]{#4}}%
@@ -1461,12 +1502,9 @@
   \fi \fi
 %    \end{macrocode}
 % Now position the \cs{vbox} properly. More details are given in the
-% appendix. We set the depth of the \cs{vbox}
-% to 0, so that it will not influence the depth of the current row. The
-% overview of the shift amount can be found in section~\ref{sec:overview}.
-%    \begin{macrocode}
-  \dp0=\z@
-%    \end{macrocode}
+% appendix. The overview of the calculation of the shift amount can be
+% found in section~\ref{sec:overview}.
+%
 % If \meta{nrows}${}> 0$: \\
 % If \meta{vpos} = \texttt{[t]}, then the box is already positioned
 % correctly (the baseline is on the baseline of the row). However, later
@@ -1489,7 +1527,8 @@
     \fi
 %    \end{macrocode}
 % If \meta{nrows}${}< 0$: \\
-% If \meta{vpos} = \texttt{[t]}, shift the box up $\textrm{H} - \textrm{h1} -\textrm{h2} + \textrm{h}$.  See fig.~\ref{fig:bot-t}.\\
+% If \meta{vpos} = \texttt{[t]}, shift the box up $\textrm{H} -
+% \textrm{h1} -\textrm{h2} + \textrm{h}$.  See fig.~\ref{fig:bot-t}.\\
 % If \meta{vpos} = \texttt{[c]}, shift the box up $\textrm{H} - \textrm{h2}$.  See fig.~\ref{fig:bot-c}.\\
 % If \meta{vpos} = \texttt{[b]}, shift the box up H.  See fig.~\ref{fig:bot-b}.\\
 % H is the current value of \cs{multirow at dima}.
@@ -1505,17 +1544,20 @@
     \fi
   \fi
 %    \end{macrocode}
-% Finally, we add the \meta{fixup} parameter (\verb+#5+), and go into
+% \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
 % 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. \\
+% 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 at dima#5\relax
   \leavevmode
-  \ifmultirowdebug\setbox0\vtop{\vskip-\multirow at dima\box0\vss}%
-    {\showboxdepth=5 \showboxbreadth=10 \showbox0}\box0
-  \else\vtop{\vskip-\multirow at dima\box0\vss}\fi
+  \setbox0\vtop{\vskip-\multirow at dima\box0\vss}\dp0=\z@
+  \ifmultirowdebug{\showboxdepth=5 \showboxbreadth=10 \showbox0}\fi
+  \box0
 }
 %    \end{macrocode}
 % \end{macro}
@@ -1610,7 +1652,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{fixup} parameters. The box is constructed with \cs{vtop}. The
+% \meta{bigstruts} and \meta{vmove} parameters. 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
@@ -1637,8 +1679,8 @@
 % h2 = $\textrm{depth of a tabular row} + \textrm{botstrut}$
 %
 % Note: the following descriptions describe the vertical shift of the
-% box without taking the \meta{fixup} into account. In all cases
-% \meta{fixup} has to be added if it is given.
+% box without taking the \meta{vmove} into account. In all cases
+% \meta{vmove} has to be added if it is given.
 %
 % \subsection{Case \meta{nrows}${}> 0$}
 %
@@ -1656,7 +1698,8 @@
 %
 % Alternatively, we could have omitted the \cs{vskip} in this case,
 % thereby leaving the baseline undisturbed, but this would make the code
-% unsymmetrical. Therefore we choose to set the shift amount to h here.
+% unsymmetrical. Moreover, this would not work when a non-zero
+% \meta{vmove} is present. Therefore we choose to set the shift amount to h here.
 %
 % \begin{figure}[htpb]
 %   \centering

Modified: trunk/Master/texmf-dist/tex/latex/multirow/bigdelim.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/multirow/bigdelim.sty	2016-10-15 22:58:34 UTC (rev 42278)
+++ trunk/Master/texmf-dist/tex/latex/multirow/bigdelim.sty	2016-10-15 22:58:47 UTC (rev 42279)
@@ -23,7 +23,7 @@
 %%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{bigdelim}
-           [2016/09/27 v2.0
+           [2016/10/11 v2.1
                   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-10-15 22:58:34 UTC (rev 42278)
+++ trunk/Master/texmf-dist/tex/latex/multirow/bigstrut.sty	2016-10-15 22:58:47 UTC (rev 42279)
@@ -23,7 +23,7 @@
 %%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{bigstrut}
-           [2016/09/27 v2.0
+           [2016/10/11 v2.1
                   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-10-15 22:58:34 UTC (rev 42278)
+++ trunk/Master/texmf-dist/tex/latex/multirow/multirow.sty	2016-10-15 22:58:47 UTC (rev 42279)
@@ -23,7 +23,7 @@
 %%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{multirow}%
-           [2016/09/27 v2.0
+           [2016/10/11 v2.1
                   Span multiple rows of a table]%
 \newif\ifmultirowdebug
 \DeclareOption{debug}{\multirowdebugtrue}
@@ -97,7 +97,7 @@
 \long\def\multirow at vbox#1#2#3{\setbox0\vtop to \multirow at dima{#2%
     \if #1t\relax\else\vfill\fi
     \multirowsetup #3\if #1b\relax\else\vfill\fi}}
-%% \multirow [vpos] {nrows} [bigstruts] {width} [fixup] {text}
+%% \multirow [vpos] {nrows} [bigstruts] {width} [vmove] {text}
 \newcommand\multirow[2][c]{\@multirow[#1]{#2}}
 \def\@multirow[#1]#2{\@ifnextchar[{\@@multirow[#1]#2}{\@@multirow[#1]#2[0]}}
 \def\@@multirow[#1]#2[#3]#4{\@ifnextchar[{\@xmultirow[#1]{#2}[#3]{#4}}%
@@ -125,7 +125,6 @@
     \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
-  \dp0=\z@
   \ifnum\multirow at cnta>0
     \if#1t\relax\multirow at dima=\ht0\else
       \multirow at dima=\ht\@arstrutbox
@@ -146,9 +145,9 @@
   \fi
   \advance\multirow at dima#5\relax
   \leavevmode
-  \ifmultirowdebug\setbox0\vtop{\vskip-\multirow at dima\box0\vss}%
-    {\showboxdepth=5 \showboxbreadth=10 \showbox0}\box0
-  \else\vtop{\vskip-\multirow at dima\box0\vss}\fi
+  \setbox0\vtop{\vskip-\multirow at dima\box0\vss}\dp0=\z@
+  \ifmultirowdebug{\showboxdepth=5 \showboxbreadth=10 \showbox0}\fi
+  \box0
 }
 \@ifundefined{bigstrutjot}{\newdimen\bigstrutjot \bigstrutjot=\jot}{}
 \endinput



More information about the tex-live-commits mailing list