From c14fe77571416f823736ed0c6deae5f4fc808b16 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 27 Sep 2016 21:06:23 +0000 Subject: multirow (27sep16) git-svn-id: svn://tug.org/texlive/trunk@42160 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/multirow/README | 43 +++- Master/texmf-dist/doc/latex/multirow/miscdoc.sty | 108 ---------- Master/texmf-dist/doc/latex/multirow/multirow.pdf | Bin 289984 -> 604111 bytes Master/texmf-dist/doc/latex/multirow/multirow.tex | 242 ---------------------- 4 files changed, 35 insertions(+), 358 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/multirow/miscdoc.sty delete mode 100644 Master/texmf-dist/doc/latex/multirow/multirow.tex (limited to 'Master/texmf-dist/doc/latex/multirow') diff --git a/Master/texmf-dist/doc/latex/multirow/README b/Master/texmf-dist/doc/latex/multirow/README index 51cd67a295a..75accccee51 100644 --- a/Master/texmf-dist/doc/latex/multirow/README +++ b/Master/texmf-dist/doc/latex/multirow/README @@ -1,15 +1,21 @@ - multirow.sty V1.6 version (5-May-2004) +multirow.sty V2.0 version (2016/09/27) +bigstruts.sty V2.0 version (2016/09/27) +bigdelim.sty V2.0 version (2016/09/27) - Author: Jerry Leichter - Piet van Oostrum +Original Author: Jerry Leichter +Current Author: Piet van Oostrum 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. +multirow.sty: + Make an entry that will span multiple rows of a table. -\multirow{nrows}[bigstruts]{width}[fixup]{text} +\multirow[vpos]{nrows}[bigstruts]{width}[fixup]{text} + +vpos is the vertical positioning: t. c. or b. nrows is the number of rows to span. It's up to you to leave the other rows empty, or the stuff created by \multirow will over-write it. @@ -24,15 +30,21 @@ bigstruts is mainly used if you've used bigstrut.sty. In that case it width is the width to which the text is to be set, or * to indicate that the text argument's natural width is to be used. - text is the actual text. If the width was set explicitly, the text will +text is the actual text. If the width was set explicitly, the text will be set in a parbox of that width; you can use \\ to force linebreaks where you like. - If the width was given as * the text will be set in LR mode. If you + If the width was given as * the text will be set in LR mode. If you want a multiline entry in this case you should use a tabular or array in the text parameter. - The text is centered vertically within the range spanned by nrows. + If the width is given as = the width will be taken from the + tabular column in which it appears. This only works for p{} + columns and similar, for example X columns in tabularx, and LCRJ + columns in tabulary. + + 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 @@ -110,4 +122,19 @@ Example: cccc & \\ dddd & \multirow{-3}*{bbbb}\\ \end{tabular} - \ No newline at end of file + +bigstrut.sty: + +\bigstrut[pos] where pos is t or b + + Add a bit of space above, below, or both a tabular row. The amount + is determined by \bigstrutjot. + +bigdelim.sty: + +\ldelim({n}{width}[text] +\rdelim){n}{width}[text] + +Put a big delimiter over n rows in a tabular, optionally preceded +(\ldelim) or followed (rdelim) by text. + diff --git a/Master/texmf-dist/doc/latex/multirow/miscdoc.sty b/Master/texmf-dist/doc/latex/multirow/miscdoc.sty deleted file mode 100644 index f23796da2b8..00000000000 --- a/Master/texmf-dist/doc/latex/multirow/miscdoc.sty +++ /dev/null @@ -1,108 +0,0 @@ -\ProvidesPackage{miscdoc}[2010/01/20 v1.2 documentation macros misc latex pkgs] - -% miscdoc.sty -% Copyright 2010 Robin Fairbairns -% -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% of this license or (at your option) any later version. -% The latest version of this license is in -% http://www.latex-project.org/lppl.txt -% and version 1.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% -% This work has the LPPL maintenance status `maintained'. -% -% The Current Maintainer of this work is Robin Fairbairns. -% -% This work consists of the file miscdoc.sty (only) - -\setcounter{errorcontextlines}{1274} - -% The package arose from a small exercise to document packages whose -% previous documentation consisted solely of comments in the package files. -% The macros here defined are lifted from the author's faq.sty -% (written for the UK TeX FAQ, CTAN:help/uk-tex-faq) or are inspired -% by others' work (credited where the author is known) ... except -% where they came as a flash of inspiration while actually writing the -% documentation. - -% this option suggested by Heiko Oberdiek, 2010-01-29 -\DeclareOption{hyper}{% - \AtEndOfPackage{% - \RequirePackage[pdfusetitle]{hyperref} - \RequirePackage{bookmark} - \bookmarksetup{numbered,open,openlevel=1} - } -} -\ProcessOptions\relax - -% note: T1 encoding assumed -\usepackage{lmodern} -\usepackage[T1]{fontenc} -\usepackage{booktabs} - -% from faq.sty -\newcommand\cs[1]{\texttt{\char`\\#1}} -\let\csx\cs -\def\bsbs{\cs{\char`\\}} - -% \cmdinvoke\cs -% \cs typeset as above -% may consist of optional or mandatory arguments; -% -% the `arguments' are simply typesett \texttt, as yet -- if something -% fancier is needed, there's a bunch of code needs rewriting here... -\DeclareRobustCommand\cmdinvoke{\@ifstar - {\let\@tempa\emph\@scmdinvoke}% - {\let\@tempa\relax\@scmdinvoke}% -} -\def\@scmdinvoke#1{\texttt{\symbol{92}#1}% - \futurelet\@let@token\@cmdinvoke -} -\def\@cmdinvoke{\ifx\@let@token\bgroup - \let\@tempb\@cmdinvoke@lbrace - \else - \ifx\@let@token[% ] - \let\@tempb\@cmdinvoke@lbrack - \else - \ifx\@let@token(% ) - \let\@tempb\@cmdinvoke@lparen - \else - \let\@tempb\@empty - \fi - \fi - \fi - \@tempb -} -\def\@cmdinvoke@lbrace#1{\penalty0\hskip0pt\relax - \texttt{\symbol{123}\@tempa{#1}\symbol{125}}% - \futurelet\@let@token\@cmdinvoke -} -\def\@cmdinvoke@lbrack[#1]{\penalty-150\hskip0pt\relax - \texttt{[\@tempa{#1}]}% - \futurelet\@let@token\@cmdinvoke -} -\def\@cmdinvoke@lparen(#1){\penalty-150\hskip0pt\relax - \texttt{(\@tempa{#1})}% - \futurelet\@let@token\@cmdinvoke -} -% and extension -- versions that take a single extra (delimiter) -% argument, such as \delcmdinvoke{lscrunge}( ... awful syntax, but... -\DeclareRobustCommand\delcmdinvoke{\@ifstar - {\let\@tempa\emph\@sdelcmdinvoke}% - {\let\@tempa\relax\@sdelcmdinvoke}% -} -\def\@sdelcmdinvoke#1#2{\texttt{\symbol{92}#1#2}% - \futurelet\@let@token\@cmdinvoke -} - -% sui generis -\newcommand\newitem{\par\addvspace{1ex}\noindent} - -% inspired by doc.sty in latex distribution -\newcommand\meta[1]{\ensuremath{\langle}\emph{#1}\ensuremath{\rangle}} - -% meaningful names, as in faq.sty -\let\environment\texttt -\let\Package\textsf diff --git a/Master/texmf-dist/doc/latex/multirow/multirow.pdf b/Master/texmf-dist/doc/latex/multirow/multirow.pdf index 947d7a41100..d1a20378433 100644 Binary files a/Master/texmf-dist/doc/latex/multirow/multirow.pdf and b/Master/texmf-dist/doc/latex/multirow/multirow.pdf differ diff --git a/Master/texmf-dist/doc/latex/multirow/multirow.tex b/Master/texmf-dist/doc/latex/multirow/multirow.tex deleted file mode 100644 index 66c14bfa66b..00000000000 --- a/Master/texmf-dist/doc/latex/multirow/multirow.tex +++ /dev/null @@ -1,242 +0,0 @@ -\documentclass[a4paper]{article} -\usepackage[a4paper]{geometry} -\usepackage{miscdoc,multirow,bigstrut,bigdelim,colortbl} -\newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}} - -\begin{document} -\title{The \Package{multirow}, - \Package{bigstrut} and - \Package{bigdelim} packages} -\author{Piet van Oostrum\thanks{catalogued ``active author''}\\ - \O{}ystein Bache\\ - Jerry Leichter\thanks{Documentation put together by Robin - Fairbairns}} -\maketitle - -\section{Introduction} -These packages offer a series of extensions to the standard \LaTeX{} -\texttt{tabular} environment. Their respective functions are: -\begin{description} -\item[\Package{multirow}] which provides a construction for table cells - that span more than one row of the table; -\item[\Package{bigdelim}] which creates an appropriately-sized - delimiter (for example, brace, parenthesis or bracket) to fit in a - single multirow, to indicate a relationship between other rows; and -\item[\Package{bigstrut}] which creates struts which (slightly) stretch - the table row in which they sit. -\end{description} - -\section{Using \Package{multirow}}\label{sec:multirow} - -The basic syntax is: -\begin{quote} - \cmdinvoke*{multirow}{nrows}[bigstruts]{width}[fixup]{text} -\end{quote} -where -\begin{description} -\item[\emph{nrows}] is the number of rows to span. It's up to you to - leave the other rows empty, or the stuff created by \cs{multirow} - will over-write it. With a positive value of \emph{nrows} the - spanned columns are this row and (\emph{nrows}-1) rows below - it. With a negative value of \emph{nrows} they are this row and - (1-\emph{nrows}) above it. -\item[\emph{bigstruts}] is mainly used if you've used the - \Package{bigstrut}. In that case it is the total number of uses of - \cs{bigstrut} within the rows being spanned. Count 2 uses for each - \cs{bigstrut}, 1 for each \cmdinvoke*{bigstrut}[x] where \emph{x} is - either \texttt{t} or \texttt{b}. The default is 0. -\item[\emph{width}] is the width to which the text is to be set, or - \texttt{*} to indicate that the text argument's natural width is to - be used. -\item[\emph{text}] is the actual text of the construct. If the width - was set explicitly, the text will be set in a \cs{parbox} of that - width; you can use \bsbs{} to force linebreaks where you like. - - If the width was given as \texttt{*} the text will be set in LR - mode. If you want a multiline entry in this case you should use a - \texttt{tabular} or \texttt{array} environment in the text - parameter. -\item[\emph{fixup}] is a length used for fine tuning: the text will be - raised (or lowered, if \emph{fixup} is negative) by that length - above (below) wherever it would otherwise have gone. -\end{description} -For example (using both multirow and bigstrut): -\begin{quote} -\begin{verbatim} -\newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}} -\begin{tabular}{|c|c|} -\hline -\multirow{4}{1in}{Common g text} & Column g2a\\ - & Column g2b \\ - & Column g2c \\ - & Column g2d \\ -\hline -\multirow{3}[6]*{Common g text} & Column g2a\bigstrut\\\cline{2-2} - & Column g2b \bigstrut\\\cline{2-2} - & Column g2c \bigstrut\\ -\hline -\multirow{4}[8]{1in}{Common g text} & Column g2a\bigstrut\\\cline{2-2} - & Column g2b \bigstrut\\\cline{2-2} - & Column g2c \bigstrut\\\cline{2-2} - & Column g2d \bigstrut\\ -\hline -\multirow{4}*{\minitab[c]{Common \\ g text}} & Column g2a\\ - & Column g2b \\ - & Column g2c \\ - & Column g2d \\ -\hline -\end{tabular} -\end{verbatim} -\end{quote} -which will appear as: -\begin{quote} - \begin{tabular}{|c|c|} - \hline - \multirow{4}{1in}{Common g text} & Column g2a\\ - & Column g2b \\ - & Column g2c \\ - & Column g2d \\ - \hline - \multirow{3}[6]*{Common g text} & Column g2a\bigstrut\\\cline{2-2} - & Column g2b \bigstrut\\\cline{2-2} - & Column g2c \bigstrut\\ - \hline - \multirow{4}[8]{1in}{Common g text} & Column g2a\bigstrut\\\cline{2-2} - & Column g2b \bigstrut\\\cline{2-2} - & Column g2c \bigstrut\\\cline{2-2} - & Column g2d \bigstrut\\ - \hline - \multirow{4}*{\minitab[c]{Common \\ g text}} & Column g2a\\ - & Column g2b \\ - & Column g2c \\ - & Column g2d \\ - \hline - \end{tabular} -\end{quote} - -If any of the spanned rows are unusually large, or if you're using the -\Package{bigstrut} and \cs{bigstrut}s are used asymetrically about the -centerline of the spanned rows, the vertical centering may not come -out right. Use the fixup argument in this case. - -Just before \emph{text} is expanded, the \cs{multirowsetup} macro is -expanded to set up any special environment. Initially, -\cs{multirowsetup} contains just \cs{raggedright}. It may be -redefined with \cs{renewcommand}. - -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 -doesn't match the baseline of the stuff beside it, in particular if -the stuff beside it has descenders and \emph{text} does not. This may -result in a small misalignment. About all that can be done is to do a -final touchup on \emph{text}, using the fixup optional argument. -(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 -size.) - -\cs{multirow} is mainly designed for use with \environment{table}, as -opposed to \environment{array}, environments. It will not work well in an -array environment since the lines have an extra \texttt{jot} of space -between them which it won't account for. Fixing this is difficult in -general, and doesn't seem worth it. The \emph{bigstruts} argument may -be used to provide a semi-automatic fix: First set \cs{bigstrutjot} to -\texttt{.5}\cs{jot}. Then simply repeat \emph{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 \cs{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 \cs{multirow} with the \Package{colortbl} package you have -to take precautions if you want to colour the column that has the -\cs{multirow} in it. \Package{colortbl} works by colouring each cell -separately. So if you use \cs{multirow} with a positive \emph{nrows} -value, \Package{colortbl} will first color the top cell, then -\cs{multirow} will typeset \emph{nrows} cells starting with this cell, -and later \Package{colortbl} will color the other cells, effectively -hiding the text in that area. This can be solved by putting the -\cs{multirow} in the last row with a negative \emph{nrows} value. -See, for example: -\begin{quote} -\begin{verbatim} -\begin{tabular}{l>{\columncolor{yellow}}l} - aaaa & \\ - cccc & \\ - dddd & \multirow{-3}*{bbbb}\\ -\end{tabular} -\end{verbatim} -\end{quote} -which will produce: -\begin{quote} - \begin{tabular}{l>{\columncolor{yellow}}l} - aaaa & \\ - cccc & \\ - dddd & \multirow{-3}*{bbbb}\\ - \end{tabular} -\end{quote} - -\section{Using \Package{bigstrut}} - -\cmdinvoke*{bigstrut}[x] produces a strut which is \cs{bigstrutjot} -(\texttt{2pt} by default) higher, lower, or both than the standard -array/table strut. Use it in table entries that are adjacent to -\cs{hline}s to leave an extra bit of space\,---\,according to the -TeXbook (page 246), ``This is a little touch that improves the -appearance of boxed tables; look for it as a mark of quality.'' - -Although you could use \cs{bigstrut} in an array, there isn't normally -much point since arrays are `opened up' by \cs{jot} anyway. - -\cmdinvoke{bigstrut}[t] adds height; \cmdinvoke{bigstrut}[b] adds -depth. Just \cs{bigstrut} adds both. So: Use -\cmdinvoke{bigstrut}[t] in the row just \emph{after} an \cs{hline}; -\cmdinvoke{bigstrut}[b] in the row just \emph{before}; and -\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 -argument. Spaces before the \cs{bigstrut} are generally ignored (by a -single \unskip). - -Note: The \Package{multirow} package makes use of \cs{bigstrutjot}. If -both styles are used, they can be used in either order, as each checks -to see if the other has already defined \cs{bigstrutjot}. However, -the default values they set are different: if only \Package{multirow} -is used, \cs{bigstrutjot} will be set to \texttt{3pt}. If -\Package{bigstrut} is used, with or without \Package{multirow}, -\cs{bigstrutjot} will be \texttt{2pt}. - -\section{Using \Package{bigdelim}} - -The package is for working in a \environment{table} or \environment{array} -environment, in which the \Package{multirow} packages is also used. - -Syntax of use is -\begin{quote} - \delcmdinvoke*{ldelim}({n}{width}[text]\\ - \delcmdinvoke*{rdelim}){n}{width}[text] -\end{quote} -The commands are used in a column of a \environment{tabular} or -\environment{array}; they create a big parenthesis, brace or whatever -delimiter that extends over the \emph{n} rows starting at the one -containing the command. Corresponding cells in the following rows -must be explicitly given (as empty cells). - -The first parameter is a delimiter to be used, e.g., \cs{\char`\{} -\cs{\char`\}} \texttt{[} \texttt{]} \texttt{(} \texttt{)}\,---\,in fact, -anything that can be used with \cs{left} or \cs{right}, as appropriate. - -The optional \emph{text} is set centred to the left of \cs{ldelim} or -to the right of \cs{rdelim}. The \emph{width} is that reserved for -the delimiter and its text; with a current copy of the -\Package{multirow} package, the \emph{width} may be given as -\texttt{*}, but that may cause the delimiters to be too small. - -Also with a recent version of \Package{multirow} the commands may be -used in the last row of the extension with a negative \emph{n} -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 \emph{n} (you -can use non-integral values). - -\end{document} -- cgit v1.2.3