From 2e9f3d4c5505449dcb952eda85a9f94979511477 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 30 Jun 2006 13:14:33 +0000 Subject: makecell 0.1c update git-svn-id: svn://tug.org/texlive/trunk@1728 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/makecell/README | 12 + .../texmf-dist/doc/latex/makecell/makecell-rus.pdf | Bin 231866 -> 0 bytes .../texmf-dist/doc/latex/makecell/makecell-rus.tex | 251 ++++++++---- Master/texmf-dist/doc/latex/makecell/makecell.pdf | Bin 169569 -> 186580 bytes Master/texmf-dist/doc/latex/makecell/makecell.xml | 52 +-- .../texmf-dist/source/latex/makecell/makecell.dtx | 422 ++++++++++++++++----- Master/texmf-dist/tex/latex/makecell/makecell.sty | 58 ++- Master/texmf-dist/tpm/makecell.tpm | 10 +- 8 files changed, 592 insertions(+), 213 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/makecell/README delete mode 100644 Master/texmf-dist/doc/latex/makecell/makecell-rus.pdf (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/makecell/README b/Master/texmf-dist/doc/latex/makecell/README new file mode 100644 index 00000000000..b20342c2dc2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/makecell/README @@ -0,0 +1,12 @@ +makecell 0.1c +Tabular column heads and multilined cells. + + Package offers a command, based on one-column tabular environment, + which allows to support a common layout for tabular column heads + in whole document. Another offered command is for creation of + multilined tabular cells. There are also: 1) a macro, which + changes vertical spaces around all cells in tabular, like in tabls + package, but based on macros of array package; 2) macros for + multirow cells/heads, which use macro from multirow package. + +Documentation: makecell.pdf. \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/makecell/makecell-rus.pdf b/Master/texmf-dist/doc/latex/makecell/makecell-rus.pdf deleted file mode 100644 index a0307b3da14..00000000000 Binary files a/Master/texmf-dist/doc/latex/makecell/makecell-rus.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/makecell/makecell-rus.tex b/Master/texmf-dist/doc/latex/makecell/makecell-rus.tex index 5b4ceb57713..bd5d1b07690 100644 --- a/Master/texmf-dist/doc/latex/makecell/makecell-rus.tex +++ b/Master/texmf-dist/doc/latex/makecell/makecell-rus.tex @@ -2,7 +2,7 @@ % % makecell.dtx - tabular column heads and multilined cells. % Russian documentation. -% (c) 2005 Olga Lapko (Lapko.O@g23.relcom.ru) +% (c) 2005--2006 Olga Lapko (Lapko.O@g23.relcom.ru) % % This program is provided under the terms of the % LaTeX Project Public License distributed from CTAN @@ -21,10 +21,16 @@ \IfFileExists{rotating.sty}{\usepackage{rotating}}{} \IfFileExists{footmisc.sty}{\usepackage[perpage]{footmisc}}{} \IfFileExists{multirow.sty}{\usepackage{multirow}}{} -\IfFileExists{caption.sty}{\usepackage[font=small,labelfont=bf,labelsep=period]{caption}[2004/11/28] \IfFileExists{hyperref.sty}{\usepackage[unicode]{hyperref}}{} \IfFileExists{hypcap.sty}{\usepackage{hypcap}}{} -\IfFileExists{floatrow.sty}{\usepackage[font=small,style=plaintop,captionskip=5pt]{floatrow}}{\let\ttabbox\relax}}{} +\IfFileExists{caption.sty} + {\usepackage[font=small,labelfont=bf,labelsep=period]{caption}[2004/11/28] + \IfFileExists{floatrow.sty} + {\usepackage[font=small,style=plaintop,captionskip=5pt]{floatrow}} + {}}{} +\makeatletter +\@ifundefined{ttabbox}{\let\ttabbox\relax}{} +\makeatother \usepackage{tabularx} \EnableCrossrefs \CodelineIndex @@ -51,21 +57,24 @@ % \author{% % Ольга Лапко\\ % {\tt Lapko.O@g23.relcom.ru} } -% \date{2005/07/02} +% \date{2006/06/28} % \maketitle % \begin{abstract} -% Данный пакет предлагает команду |\thead|, использующую окружение одноколоночной -% таблицы для заголовков табличных колонок. Макрокоманда позволяет создать единообразное -% оформление для заголовков табличных колонок в документе. Ещё одна команда, |\makecell|, +% Данный пакет помогает создать единое оформление для таблиц во всём +% документе. Команда |\thead|, использующая окружение одноколоночной +% таблицы, позволяет создать единообразное оформление для заголовков +% табличных колонок в документе. Ещё одна команда, |\makecell|, % предлагается для создания многострочных ячеек в таблицах. % -% Также предлагается: \quad 1)\nobreak\enskip макрокоманда |\makegapedcells|, которая -% изменяет вертикальные отбивки вокруг табличных ячеек (аналогично пакету \pkg{tabls}); \quad -% 2)\nobreak\enskip макрокоманды |\multirowhead| и |\multirowcell|, использующие -% макрокоманду |\multirow| из пакета \pkg{multirow}.\smallskip +% Также предлагается: \quad 1)\nobreak\enskip макрокоманда |\makegapedcells|, +% которая изменяет вертикальные отбивки вокруг табличных ячеек, аналогично +% пакету \pkg{tabls}, но использует пакет \pkg{array}. (Макрокоманда +% |\makegapedcells| переопределяет макрокоманду |\@classz| этого пакета. +% Макрокоманда |\nomakegapedcells| отменяет переопределение.); \quad +% 2)\nobreak\enskip макрокоманды |\multirowhead| и |\multirowcell|, +% использующие макрокоманду |\multirow| из пакета \pkg{multirow}.% +% \smallskip % -% Данный пакет использует пакет \pkg{array}. (Макрокоманда |\makegapedcells| также -% временно переопределяет макрокоманду |\@classz| этого пакета.) % \end{abstract} % % \section{Табличные ячейки и заголовки колонок} @@ -81,12 +90,12 @@ % \begin{quote} % |\makecell|\oarg{vertical or/and horizontal alignment}\marg{cell text} % \end{quote} -% Для вертикальной выключки используются обозначения \texttt{t}, \texttt{b}, или \texttt{c} "--- -% эти буквы используются в дополнительном аргументе окружений \env{tabular} или \texttt{array}. -% Для горизонтальной выключки вы можете использовать обозначения -% \texttt{r}, \texttt{l}, или \texttt{c}, или более сложные: -% |{p{3cm}}|. Поскольку данный пакет загружает пакет \pkg{array}, вы можете -% использовать и такие определения выключки: |{>{\parindent1cm}p{3cm}}|. +% Для вертикальной выключки используются обозначения \texttt{t}, \texttt{b}, +% или \texttt{c} "--- эти буквы используются в дополнительном аргументе окружений +% \env{tabular} или \texttt{array}. Для горизонтальной выключки вы можете +% использовать обозначения \texttt{r}, \texttt{l}, или \texttt{c}, или более +% сложные: |{p{3cm}}|. Поскольку данный пакет загружает пакет \pkg{array}, вы +% можете использовать и такие определения выключки: |{>{\parindent1cm}p{3cm}}|. %\begin{verbatim} %\begin{tabular}{|c|c|} %\hline @@ -123,26 +132,33 @@ % \hline % \makecell*[{{p{3cm}}}]{Cell long text with predefined width} & 52--58\\ % \hline -% \makecell[{{>{\parindent1em}p{3cm}}}]{Cell long text with predefined width} & 52--58\\ +% \makecell[{{>{\parindent1em}p{3cm}}}]{Cell long text with predefined width} & +% 52--58\\ % \hline % \end{tabular}} % \end{table} % % |*|-форма команды, |\makecell*|, создаёт вертикальные отбивки равные |\jot|. % -% \emph{Замечание}. При определении выключки колонки типа |{p{3cm}}| в дополнительном аргументе, -% нужно соблюдать следующие правила: \quad 1)\nobreak\enskip если есть -% обозначение вертикальной выключки, взять выключку колонки в группу: |[c{p{3cm}}]|; \quad +% \emph{Замечание}. При определении выключки колонки типа |{p{3cm}}| в +% дополнительном аргументе, нужно соблюдать следующие правила: +% \quad 1)\nobreak\enskip если есть +% обозначение вертикальной выключки, взять выключку колонки в группу: +% |[c{p{3cm}}]|; \quad % 2)\nobreak\enskip если его нет, взять выключку -% колонки в двойную группу "--- |[{{p{3cm}}}]| или добавить пустую группу "--- |[{}{p{3cm}}]|. -% Будьте внимательны с вертикальной выключкой ячейки при задании выключки колонки в виде абзаца: -% например, нужно использовать |{b{3cm}}| для выключки по нижней линии. +% колонки в двойную группу "--- |[{{p{3cm}}}]| или добавить пустую группу +% "--- |[{}{p{3cm}}]|. +% Будьте внимательны с вертикальной выключкой ячейки при задании выключки +% колонки в виде абзаца: +% например, нужно использовать |{b{3cm}}| для выключки по нижней линии +% (и |{m{3cm}}| для выключки по средней линии). % % \DescribeMacro{\thead} -% Макрокоманда создаёт окружение одноколоночной таблицы для заголовков колонок с предопределёнными -% общими параметрами выключки и интерлиньяжа (см.~табл.~\ref{tab:thead}). Эта макрокоманда использует -% общие установки для заголовков колонок: шрифт, выключку, интерлиньяж, вертикальные отбивки вокруг -% (см. разд.~\ref{sec:tsets}). +% Макрокоманда создаёт окружение одноколоночной таблицы для заголовков колонок +% с предопределёнными +% общими параметрами выключки и интерлиньяжа (см.~табл.~\ref{tab:thead}). +% Эта макрокоманда использует общие установки для заголовков колонок: шрифт, +% выключку, интерлиньяж, вертикальные отбивки вокруг (см. разд.~\ref{sec:tsets}). %\begin{verbatim} %\renewcommand\theadset{\def\arraystretch{.85}}% %\begin{tabular}{|l|c|} @@ -173,8 +189,9 @@ % \DescribeMacro{\rothead} % Создаёт заголовки колонок, развёрнутые на 90$^\circ$ против часовой стрелки. % Макрокоманда использует те же установки шрифта и интерлиньяжа как и предыдущая, -% но выключка колонки изменена на |p{\rotheadsize}| с выравниванием вправо (|\raggedright|): -% в результате левый край строк заголовка оказывается на одной базовой линии. +% но выключка колонки изменена на |p{\rotheadsize}| с выравниванием вправо +% (|\raggedright|): в результате левый край строк заголовка оказывается +% на одной базовой линии. % % \DescribeMacro{\rotheadsize} % Данный параметр определяет ширину колонки для развёрнутых вертикально заголовков. @@ -219,30 +236,32 @@ % Команда |\cellset| используется также командой |\thead|. % % \DescribeMacro{\cellset} -% Установки интерлиньяжа для табличных ячеек. Здесь можно использовать следующие команды: +% Установки интерлиньяжа для табличных ячеек. Здесь можно использовать следующие +% команды: % \begin{quote} -% |\renewcommand\theadcell{\renewcommand\arraytretch{1}%|\\ +% |\renewcommand\cellset{\renewcommand\arraytretch{1}%|\\ % | \setlength\extrarowheight{0pt}}| % \end{quote} % как определено в данном пакете. -% Данные установки используются как командой |\makecell| так и командой |\thead| (|\rothead|). +% Данные установки используются как командой |\makecell| так и командой |\thead| +% (|\rothead|). % % \DescribeMacro{\cellalign} -% Выключка по умолчанию для табличных ячеек. Пакет предлагает вертикальную и горизонтальную -% выключку по центру, определённую следующим образом: +% Выключка по умолчанию для табличных ячеек. Пакет предлагает вертикальную и +% горизонтальную выключку по центру, определённую следующим образом: % \begin{quote} % |\renewcommand\cellalign{cc}| % \end{quote} % % \DescribeMacro{\cellgape} -% Определяет вертикальные отбивки вокруг ячейки (|\makecell|), используя, если нужно, команду |\gape|. -% Она определена как: +% Определяет вертикальные отбивки вокруг ячейки (|\makecell|), используя, +% если нужно, команду |\gape|. Она определена как: % \begin{quote} % |\renewcommand\cellgape{}| % \end{quote} % Можно определить макрокоманду как % \begin{quote} -% |\renewcommand\cellgape{\gape*{1pt}}| +% |\renewcommand\cellgape{\Gape[1pt]}| % \end{quote} % или % \begin{quote} @@ -250,6 +269,10 @@ % \end{quote} % (См. также разд.~\ref{sec:gape} о команде |\gape|.) % +% \DescribeMacro{\cellrotangle} +% Угол поворота для развёрнутых ячеек и заголовков колонок. +% По умолчанию задан угол 90 (против часовой стрелки). +% % \subsection{Установки для заголовков колонок}\label{sec:tsets} % % В данном разделе приведены команды, которые позволяют настроить оформление заголовков @@ -260,16 +283,18 @@ % \begin{quote} % |\renewcommand\theadfont{\foonotesize}| % \end{quote} -% как определено в данном пакете. +% как определено в данном пакете (здесь учитывается, что задана +% команда \verb|\small| для шрифта самой таблицы). % Следующий пример задаёт курсивное начертание % \begin{quote} % |\renewcommand\theadfont{\itshape}| % \end{quote} % % \DescribeMacro{\theadset} -% Установки интерлиньяжа для заголовков колонок. Здесь можно использовать следующие команды: +% Установки интерлиньяжа для заголовков колонок. Здесь можно использовать следующие +% команды: % \begin{quote} -% |\renewcommand\theadcell{\renewcommand\arraytretch{1}%|\\ +% |\renewcommand\theadset{\renewcommand\arraytretch{1}%|\\ % | \setlength\extrarowheight{0pt}}| % \end{quote} % @@ -302,9 +327,10 @@ % на необходимую величину. % % \DescribeMacro{\gape} -% Первая макрокоманда изменяет бокс на величину |\jot| (обычно 3\,pt). Она задаётся дополнительным -% и обязательным аргументами, как и команда |\smash|, (пере)определённая пакетом \pkg{amsmath}. -% Дополнительный аргумент задаёт изменение только высоты (\texttt{t}) или только глубины +% Первая макрокоманда изменяет бокс на величину |\jot| (обычно 3\,pt). Она задаётся +% дополнительным и обязательным аргументами, как и команда |\smash|, +% (пере)определённая пакетом \pkg{amsmath}. Дополнительный аргумент задаёт +% изменение только высоты (\texttt{t}) или только глубины % (\texttt{b}). Обязательный включает собственно текст. % \begin{quote} % |\gape|\oarg{\texttt{t} or \texttt{b}}\marg{text} @@ -376,9 +402,10 @@ % Эти команды можно использовать, например, в первом и последнем рядах таблицы. % % \emph{Замечание}. Если -% вы используете пакет \pkg{bigstrut}, обратите внимание, что эти три команды дублируют \cmd{\bigstrut}, -% \cmd{\bigstrut[t]}, и \cmd{\bigstrut[b]} соответственно. Обратите также внимание что величина, -% изменяющая \cmd{\strut} в команде \cmd{\topstrut} и других равна \cmd{\jot}, а команда +% вы используете пакет \pkg{bigstrut}, обратите внимание, что эти три команды +% дублируют \cmd{\bigstrut}, \cmd{\bigstrut[t]}, и \cmd{\bigstrut[b]} соответственно. +% Обратите также внимание что величина, изменяющая \cmd{\strut} в команде +% \cmd{\topstrut} и других равна \cmd{\jot}, а команда % \cmd{\bigstrut} и использует специальную величину \cmd{\bigstrutjot}. % % \section{Как изменить вертикальные отбивки во всей таблице}\label{sec:beta} @@ -388,8 +415,8 @@ % создание необходимых отбивок вокруг ячеек таблицы. % % \DescribeMacro{\setcellgapes} -% Определяет параметры для вертикальных отбивок. Команда похожа на команду |\gape*| без -% аргумента \marg{text}: +% Определяет параметры для вертикальных отбивок. Команда похожа на команду |\gape*| +% без аргумента \marg{text}: % \begin{quote} % |\setcellgapes|\oarg{\texttt{t} or \texttt{b}}\marg{value} % \end{quote} @@ -406,7 +433,8 @@ % % Макрокоманда \cmd{\makegapedcells} временно переопределяет макрокоманду % |\@classz| из пакета \pkg{array}, поэтому используйте её осто\-рожно. -% Вводите команду |\makegapedcells| внутри группы или внутри окружения (см.~табл.~\ref{tab:gaped}): +% Вводите команду |\makegapedcells| внутри группы или внутри окружения +% (см.~табл.~\ref{tab:gaped}): %\begin{verbatim} %\begin{table}[h] %\makegapedcells @@ -417,7 +445,8 @@ % \begin{table} % \makegapedcells % \ttabbox -% {\caption{Пример многострочных ячеек с дополнительными вертикальными отбивками}\label{tab:gaped}}% +% {\caption{Пример многострочных ячеек с дополнительными вертикальными отбивками}%^^A +% \label{tab:gaped}}% % {\begin{tabular}{|c|c|} % \hline % Cell text & 28--31\\ @@ -432,35 +461,39 @@ % \hline % \makecell*[{{p{3cm}}}]{Cell long text with predefined width} & 52--58\\ % \hline -% \makecell[{{>{\parindent1em}p{3cm}}}]{Cell long text with predefined width} & 52--58\\ +% \makecell[{{>{\parindent1em}p{3cm}}}]{Cell long text with predefined width} & +% 52--58\\ % \hline % \end{tabular}} % \end{table} % -% Обратите внимание, что отбивка заданная в |\setcellgapes| и отбивки, которые создаёт макрокоманда -% |\gape| (|\Gape|) в командах ячеек (обычно в |\thead| или в |\makecell*|) суммируются. +% Обратите внимание, что отбивка заданная в |\setcellgapes| и отбивки, которые +% создаёт макрокоманда |\gape| (|\Gape|) в командах ячеек (обычно в |\thead| +% или в |\makecell*|) суммируются. % % \section{Заголовки колонок и ячейки, занимающие несколько рядов} % -% Следующие примеры показывают использование макрокоманд, использующих команду |\multirow| -% из пакета \pkg{multirow}.\nopagebreak +% Следующие примеры показывают использование макрокоманд, использующих команду +% |\multirow| из пакета \pkg{multirow}.\nopagebreak % % В начале краткое повторение значений аргументов макрокоманды |\multirow|: % \begin{quote} % |\multirow|\marg{nrow}\oarg{njot}\marg{width}\oarg{vmove}\marg{contents} % \end{quote} % \marg{nrow} задаёт число рядов (то есть строк текста); -% \oarg{njot} обычно используется если вы используете пакет \pkg{bigstrut}: делает дополнительную -% настройку вертикального положения (см. пояснения в пакете \pkg{mutirow}); -% \marg{width} определяет ширину включённого текста, знак |*| используется для указания, что -% используется натуральная ширина включённого текста; -% \oarg{vmove} величина, используемая для тонкой настройки: текст может быть поднят (или -% опущен, если \meta{vmove} отрицательна) на эту величину; +% \oarg{njot} обычно используется если вы используете пакет \pkg{bigstrut}: делает +% дополнительную настройку вертикального положения (см. пояснения в пакете +% \pkg{mutirow}); +% \marg{width} определяет ширину включённого текста, знак |*| используется +% для указания, что используется натуральная ширина включённого текста; +% \oarg{vmove} величина, используемая для тонкой настройки: текст может быть +% поднят (или опущен, если \meta{vmove} отрицательна) на эту величину; % \marg{contents} <<многорядный>> текст.\smallskip\pagebreak[3] % % \DescribeMacro{\multirowcell} % \DescribeMacro{\multirowthead} -% Эти две команды используют следующие аргументы (пример использует команду |\multirowcell|): +% Эти две команды используют следующие аргументы (пример использует команду +% |\multirowcell|): % \begin{quote} % |\multirowcell|\marg{nrow}\oarg{vmove}\oarg{v or/and h alignment}\marg{contents} % \end{quote} @@ -468,9 +501,11 @@ % Вместо дополнительного аргумента \oarg{njot} для вертикальной настройки % используется дополнительный аргумент \oarg{vmove}. % В качестве аргумента \marg{width} макрокоманды |\multirowcell| и |\multirowthead| -% используют натуральную величину включённого текста (то есть используется аргумент |*|). +% используют натуральную величину включённого текста (то есть используется +% аргумент |*|). % -% Первый пример (табл.~\ref{tab:mrowI}) с <<многорядными>> заголовками табличных колонок и ячейками: +% Первый пример (табл.~\ref{tab:mrowI}) с <<многорядными>> заголовками +% табличных колонок и ячейками: %\begin{verbatim} %\renewcommand\theadset{\def\arraystretch{.85}}% %\begin{tabular}{|l|c|c|} @@ -516,17 +551,20 @@ % \cline{1-2} % \makecell[r]{Right aligned\\ cell text} & D & \\ % \hline -% \makecell[b]{Bottom aligned\\ cell text} & E & \multirowcell{5}[1ex][r]{37--43\\52--58}\\ +% \makecell[b]{Bottom aligned\\ cell text} & E & +% \multirowcell{5}[1ex][r]{37--43\\52--58}\\ % \cline{1-2} % \makecell[{{p{5cm}}}]{Cell long long long long text with predefined width} & F & \\ % \cline{1-2} -% \makecell[{{>{\parindent1em}p{5cm}}}]{Cell long long long long text with predefined width} & G & \\ +% \makecell[{{>{\parindent1em}p{5cm}}}]{Cell long long long long text with +% predefined width} & G & \\ % \hline % \end{tabular}} % \end{table} % -% Второй пример (табл.~\ref{tab:mrowII}) с <<многорядными>> заголовками колонок и ячейками -% использует команду |\makegapedcells|. Команда |\theadgape| ничего не делает: +% Второй пример (табл.~\ref{tab:mrowII}) с <<многорядными>> заголовками колонок +% и ячейками использует команду |\makegapedcells|. Команда |\theadgape| ничего +% не делает: %\begin{verbatim} %\makegapedcells %\renewcommand\theadset{\def\arraystretch{.85}}% @@ -537,7 +575,8 @@ %\renewcommand\theadset{\def\arraystretch{.85}}% %\renewcommand\theadgape{} % \ttabbox -% {\caption{Пример <<многорядных>> ячеек с дополнительными вертикальными отбивками}\label{tab:mrowII}}% +% {\caption{Пример <<многорядных>> ячеек с дополнительными вертикальными +% отбивками}\label{tab:mrowII}}% % {\begin{tabular}{|l|c|c|} % \hline % \multirowthead{4}{First Column head}& @@ -554,18 +593,20 @@ % \cline{1-2} % \makecell[r]{Right aligned \\ cell text} & D & \\ % \hline -% \makecell[b]{Bottom aligned \\ cell text} & E & \multirowcell{6}[0ex][r]{37--43\\52--58}\\ +% \makecell[b]{Bottom aligned \\ cell text} & E & +% \multirowcell{6}[0ex][r]{37--43\\52--58}\\ % \cline{1-2} % \makecell[{{p{5cm}}}]{Cell long long long long text with predefined width} & F & \\ % \cline{1-2} -% \makecell[{{>{\parindent1em}p{5cm}}}]{Cell long long long long text with predefined width} & G & \\ +% \makecell[{{>{\parindent1em}p{5cm}}}]{Cell long long long long text +% with predefined width} & G & \\ % \hline % \end{tabular}} % \end{table} % \bigskip % -% Последний пример (табл.~\ref{tab:mrowIII}) использует окружение \env{tabularx} со значением |\hsize| -% в аргументе ширины таблицы. +% Последний пример (табл.~\ref{tab:mrowIII}) использует окружение \env{tabularx} +% со значением |\hsize| в аргументе ширины таблицы. %\begin{verbatim} %\makegapedcells %\renewcommand\theadset{\def\arraystretch{.85}}% @@ -610,14 +651,66 @@ % \cline{1-2} % \makecell[r]{Right aligned \\ cell text} & D & \\ % \hline -% \makecell[b]{Bottom aligned \\ cell text} & E & \multirowcell{6}[0ex][r]{37--43\\52--58}\\ +% \makecell[b]{Bottom aligned \\ cell text} & E & +% \multirowcell{6}[0ex][r]{37--43\\52--58}\\ % \cline{1-2} -% \makecell[{{p{\hsize}}}]{Cell long long long long long long text with predefined width} & F & \\ +% \makecell[{{p{\hsize}}}]{Cell long long long long long long text with +% predefined width} & F & \\ % \cline{1-2} -% \makecell[{{>{\parindent1em}p{\hsize}}}]{Cell long long long long long long text with predefined width} & G & \\ +% \makecell[{{>{\parindent1em}p{\hsize}}}]{Cell long long long long +% long long text with predefined width} & G & \\ % \hline % \end{tabularx}} % \end{table} % +% \subsection{Ячейки на несколько рядов: второй вариант} +% +% Второй, упрощённый, вариант задания ячейки на несколько рядов: \cdash--- +% использовать команды |\makecell| и |\thead|, а в конце аргумента задать |\\| +% с отрицательной отбивкой, например +%\begin{quote} +% |\thead{First Column head\\[-5ex]}| +%\end{quote} +% при этом у ячеек в одном <<многоярусном>> ряду, сколько бы строк они ни имели бы, +% отрицательная отбивка будет всегда одинаковая. +% +% \section{Нумерованные ряды ячеек в таблицах} +% +% Команды |\eline|, |\nline|, |\rnline| позволяют пропустить несколько ячеек: +% \begin{quote} +% |\eline|\marg{number of cells} +% \end{quote} +% и пронумеровать (|\nline|) несколько или все ячейки в ряду: +% \begin{quote} +% |\nline|\oarg{numbering type}\oarg{start number}\marg{number of cells} +% \end{quote} +% Команда |\rnline| работает так же как |\nline|, но вместо нумерации +% латинскими буквами задаётся нумерация русскими (переопределяются счётчики +% \LaTeX'а |\Alph| а |\alph| на |\Asbuk| и |\asbuk| соответственно). +% (см.~табл.~\ref{tab:elines}) +%\begin{verbatim} +% \begin{tabular}{|*{12}{c|}} +% \hline +% \eline{6} \\ \hline +% \nline{6} \\ \hline +% \eline{3} & \nline[1][4]{3} \\ \hline +% \rnline[(a)]{6} \\ \hline +% \nline[column I]{6} \\ \hline +% \end{tabular} +%\end{verbatim} +% +% \begin{table} +% \ttabbox +% {\caption{Примеры заполнения ячеек}\label{tab:elines}}% +% {\begin{tabular}{|*{12}{c|}} +% \hline +% \eline{6} \\ \hline +% \nline{6} \\ \hline +% \eline{3} & \nline[1][4]{3} \\ \hline +% \rnline[(a)]{6} \\ \hline +% \nline[column I]{6} \\ \hline +% \end{tabular}} +%\end{table} +% % \Finale \endinput diff --git a/Master/texmf-dist/doc/latex/makecell/makecell.pdf b/Master/texmf-dist/doc/latex/makecell/makecell.pdf index ebb69807190..bebe20e3917 100644 Binary files a/Master/texmf-dist/doc/latex/makecell/makecell.pdf and b/Master/texmf-dist/doc/latex/makecell/makecell.pdf differ diff --git a/Master/texmf-dist/doc/latex/makecell/makecell.xml b/Master/texmf-dist/doc/latex/makecell/makecell.xml index b779ff90214..7178b529f23 100644 --- a/Master/texmf-dist/doc/latex/makecell/makecell.xml +++ b/Master/texmf-dist/doc/latex/makecell/makecell.xml @@ -1,34 +1,24 @@ - - - - - makecell - Tabular column heads and multilined cells - - Olga Lapko - Lapko.O@g23.relcom.ru - - - - 0.1a - - + + + + makecell + Tabular column heads and multilined cells. + + + - - This package offers command, based on one-column tabular - environment for tabular column heads. This macro allows to support - common layout for tabular column heads in document. Also is - offered command for creation of multilined tabular cells. - - Package also offers: - 1) macro, which changes vertical spaces around all cells in tabular - (like in tabls package); - 2) macros for multirow cells, which use macro from multirow package. - + This package offers a command, based on one-column tabular + environment, which allows to support a common layout for + tabular column heads in whole document. Another offered + command is for creation of multilined tabular cells. There + are also: 1) a macro, which changes vertical spaces + around all cells in tabular (like in tabls package) but based + on macros of array package; + 2) macros for multirow cells/heads, which use macro from + multirow package. - - macros/latex/contrib/floatrow - + + + + diff --git a/Master/texmf-dist/source/latex/makecell/makecell.dtx b/Master/texmf-dist/source/latex/makecell/makecell.dtx index 0cf9df93053..b26f47ba5b0 100644 --- a/Master/texmf-dist/source/latex/makecell/makecell.dtx +++ b/Master/texmf-dist/source/latex/makecell/makecell.dtx @@ -1,7 +1,7 @@ % \iffalse % % makecell.dtx - tabular column heads and multilined cells. -% (c) 2005 Olga Lapko (Lapko.O@g23.relcom.ru) +% (c) 2005--2006 Olga Lapko (Lapko.O@g23.relcom.ru) % % This program is provided under the terms of the % LaTeX Project Public License distributed from CTAN @@ -16,7 +16,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{makecell} %<*package> - [2005/07/02 v0.1a Multilined Cells and Tabular Heads] + [2006/06/28 v0.1c Multilined Cells and Tabular Heads] % % %<*batchfile> @@ -40,8 +40,14 @@ \IfFileExists{multirow.sty}{\usepackage{multirow}}{} \IfFileExists{hyperref.sty}{\usepackage{hyperref}}{} \IfFileExists{hypcap.sty}{\usepackage{hypcap}}{} -\IfFileExists{caption.sty}{\usepackage[font=small,labelfont=bf,labelsep=period]{caption}[2004/11/28] -\IfFileExists{floatrow.sty}{\usepackage[font=small,style=plaintop,captionskip=5pt]{floatrow}}{\let\ttabbox\relax}}{} +\IfFileExists{caption.sty} + {\usepackage[font=small,labelfont=bf,labelsep=period]{caption}[2004/11/28] + \IfFileExists{floatrow.sty} + {\usepackage[font=small,style=plaintop,captionskip=5pt]{floatrow}} + {}}{} +\makeatletter +\@ifundefined{ttabbox}{\let\ttabbox\relax}{} +\makeatother \usepackage{tabularx} \EnableCrossrefs \CodelineIndex @@ -64,7 +70,7 @@ % % \fi % -% \CheckSum{664} +% \CheckSum{887} % % \GetFileInfo{makecell.dtx} % @@ -80,18 +86,20 @@ % \date{\filedate} % \maketitle % \begin{abstract} -% This package offers command |\thead|, based on one-column tabular -% environment for tabular column heads. This macro allows to support -% common layout for tabular column heads in documentation. Another command, +% This package helps to create common layout for tabular material. +% The |\thead| command, based on one-column tabular environment, is offered +% for creation of tabular column heads. This macro allows to support common +% layout for tabular column heads in whole documentation. Another command, % |\makecell|, is offered for creation of multilined tabular cells. % % Package also offers: \quad 1)\nobreak\enskip macro |\makegapedcells|, which -% changes vertical spaces around all cells (like in \pkg{tabls} package) in -% tabular; \quad 2)\nobreak\enskip macros |\multirowhead| and |\multirowcell|, -% which use |\multirow| macro from \pkg{multirow} package.\smallskip +% changes vertical spaces around all cells in tabular, like in \pkg{tabls} +% package, but uses code of \pkg{array} package. (Macro |\makegapedcells| +% redefines macro |\@classz| from this package. Macro |\nomakegapedcells| +% cancels this redefinition.); \quad 2)\nobreak\enskip macros |\multirowhead| +% and |\multirowcell|, which use |\multirow| macro from \pkg{multirow} +% package.\smallskip % -% Current package calls \pkg{array} package. (Macro |\makegapedcells| also -% temporarily redefines macro |\@classz| from this package.) % \end{abstract} % % \section{Tabular Cells and Column Heads} @@ -100,15 +108,16 @@ % % \DescribeMacro{\makecell} % Macro creates one-column tabular with predefined common settings of -% alignment, spacing and vertical spaces around (see section~\ref{sec:sets}). This will be useful for -% creation of multilined cells. This macro allows optional alignment settings. +% alignment, spacing and vertical spaces around (see section~\ref{sec:sets}). +% This will be useful for creation of multilined cells. This macro allows optional +% alignment settings. % \begin{quote} % |\makecell|\oarg{vertical or/and horizontal alignment}\marg{cell text} % \end{quote} % For vertical alignment you use \texttt{t}, \texttt{b}, or \texttt{c}---%^^A -% this letters you usually put in optional argument of \env{tabular} or \texttt{array} -% environments. For horizontal alignment you may use alignment settings -% like \texttt{r}, \texttt{l}, or \texttt{c}, or more complex, like +% this letters you usually put in optional argument of \env{tabular} or +% \texttt{array} environments. For horizontal alignment you may use alignment +% settings like \texttt{r}, \texttt{l}, or \texttt{c}, or more complex, like % |{p{3cm}}|. Since this package loads \pkg{array} package, you may % use such alignment settings like |{>{\parindent1cm}p{3cm}}|. %\begin{verbatim} @@ -147,25 +156,29 @@ % \hline % \makecell*[{{p{3cm}}}]{Cell long text with predefined width} & 52--58\\ % \hline -% \makecell[{{>{\parindent1em}p{3cm}}}]{Cell long text with predefined width} & 52--58\\ +% \makecell[{{>{\parindent1em}p{3cm}}}]{Cell long text with predefined width} & +% 52--58\\ % \hline % \end{tabular}} % \end{table} % % Starred form of command, |\makecell*|, creates vertical |\jot| spaces around. % -% \emph{Note}. When you define column alignment like |p{3cm}| in optional argument of -% |\makecell| (or |\thead|, see below), please follow these rules: \quad 1)\nobreak\enskip if -% vertical alignment defined, write column alignment in group, e.g. |[c{p{3cm}}]|; \quad -% 2)\nobreak\enskip if it is absent, write column alignment in double group---%^^A -% |[{{p{3cm}}}]|, or add empty group---|[{}{p{3cm}}]|. Be also careful with vertical -% alignment when you define column alignment as paragraph block: e.g., use |{{b{3cm}}}| for -% bottom alignment. +% \emph{Note}. When you define column alignment like |p{3cm}| in optional argument +% of |\makecell| (or |\thead|, see below), please follow these rules: \quad +% 1)\nobreak\enskip if +% vertical alignment defined, write column alignment in group, e.g. |[c{p{3cm}}]|; +% \quad 2)\nobreak\enskip if it is absent, write column alignment in double +% group---|[{{p{3cm}}}]|, or add empty group---|[{}{p{3cm}}]|. Be also careful +% with vertical alignment when you define column alignment as paragraph block: +% e.g., use |{{b{3cm}}}| for bottom alignment (and |{{m{3cm}}}| for centered +% vertical alignment). % % \DescribeMacro{\thead} -% Macro creates one-column tabular for column heads with predefined -% common settings (see table~\ref{tab:thead}). This macro uses common layout for column heads: -% font, alignment, spacing, and vertical spaces around (see section~\ref{sec:sets}). +% Macro creates one-column \texttt{tabular} for column heads with predefined +% common settings (see table~\ref{tab:thead}). This macro uses common layout for +% column heads: font, alignment, spacing, and vertical spaces around +% (see section~\ref{sec:sets}). %\begin{verbatim} %\renewcommand\theadset{\def\arraystretch{.85}}% %\begin{tabular}{|l|c|} @@ -197,10 +210,12 @@ % Creates table heads rotated by 90$^\circ$ counterclockwise. % Macro uses the same font and spacing settings as previous % one, but column alignment changed to |p{\rotheadsize}| with |\raggedright| -% justification: in this case left side of all text lines ``lie'' on one base line. +% justification: in this case left side of all text lines ``lies'' +% on one base line. % % \DescribeMacro{\rotheadsize} -% This parameter defines the width of rotated tabular heads. You may define that like: +% This parameter defines the width of rotated tabular heads. You may define +% that like: % \begin{quote} % |\setlength\rotheadsize{3cm}| % \end{quote} @@ -237,31 +252,33 @@ % \subsection{Settings For Tabular Cells}\label{sec:sets} % % This section describes macros, which make layout tuning for multilined cells, -% created by |\makecell| macro. The |\cellset| macro also is used by |\thead| macro. +% created by |\makecell| macro (and also |\multirowcell| and |\rotcell| macros). +% The |\cellset| macro also is used by |\thead| (|\rothead|, |\multirowtead|) +% macro. % % \DescribeMacro{\cellset} % Spacing settings for cells. Here you could use commands like: % \begin{quote} -% |\renewcommand\theadcell{\renewcommand\arraytretch{1}%|\\ +% |\renewcommand\cellset{\renewcommand\arraytretch{1}%|\\ % | \setlength\extrarowheight{0pt}}| % \end{quote} -% as was defined in current package. -% These settings used by both |\makecell| and |\thead| (|\rothead|) commands. +% as was defined in current package. These settings +% used by both |\makecell| and |\thead| (|\rothead|, |\multirowtead|) commands. % % \DescribeMacro{\cellalign} -% Default align for cells. Package offers vertical and horizontal centering alignment, it defined like: +% Default align for cells. Package offers vertical and horizontal centering +% alignment, it defined like: % \begin{quote} % |\renewcommand\cellalign{cc}| % \end{quote} -% -% \DescribeMacro{\cellgape} -% Define vertical spaces around |\makecell|, using |\gape| command if necessary. It defined like: +% Define vertical spaces around |\makecell|, using |\gape| command if necessary. +% It defined like: % \begin{quote} % |\renewcommand\cellgape{}| % \end{quote} % You may define this command like % \begin{quote} -% |\renewcommand\cellgape{\gape*{1pt}}| +% |\renewcommand\cellgape{\Gape[1pt]}| % \end{quote} % or % \begin{quote} @@ -269,17 +286,23 @@ % \end{quote} % (See also section~\ref{sec:gape} about |\gape| command.) % +% \DescribeMacro{\cellrotangle} +% The angle for rotated cells and column heads. The default value 90 +% (counterclockwise). This value definition is used by both |\rotcell| and +% |\rothead| macros. +% % \subsection{Settings For Column Heads} % % This section describes macros, which make layout tuning for tabular column heads, -% created by |\thead| (|\rothead|) macro. +% created by |\thead| (|\rothead|, |\multirowtead|) macro. % % \DescribeMacro{\theadfont} % Sets a special font for column heads. It could be smaller size % \begin{quote} % |\renewcommand\theadfont{\foonotesize}| % \end{quote} -% as was defined in current package. +% as was defined in current package (here we suppose that +% \verb|\small| command used for tabular contents itself). % Next example defines italic shape % \begin{quote} % |\renewcommand\theadfont{\itshape}| @@ -288,7 +311,7 @@ % \DescribeMacro{\theadset} % Spacing settings for column heads. Here you could use commands like: % \begin{quote} -% |\renewcommand\theadcell{\renewcommand\arraytretch{1}%|\\ +% |\renewcommand\theadset{\renewcommand\arraytretch{1}%|\\ % | \setlength\extrarowheight{0pt}}| % \end{quote} % @@ -299,7 +322,8 @@ % \end{quote} % % \DescribeMacro{\theadgape} -% Define vertical spaces around, using |\gape| command if necessary. It defined like: +% Define vertical spaces around, using |\gape| command if necessary. +% It defined like: % \begin{quote} % |\renewcommand\theadgape{\gape}| % \end{quote} @@ -315,15 +339,15 @@ % Sometimes \env{tabular} or \env{array} cells, or some elements in text need a % height/depth correction. The |\raisebox| command could help for it, but usage % of that macro in these cases, especially inside math, is rather complex. -% Current package offers the |\gape| macro, which usage is similar to |\smash| macro. -% The |\gape| macro allows to change height and/or depth of included +% Current package offers the |\gape| macro, which usage is similar to |\smash| +% macro. The |\gape| macro allows to change height and/or depth of included % box with necessary dimension. % % \DescribeMacro{\gape} -% This macro changes included box by |\jot| value (usually 3\,pt). It is defined with optional -% and mandatory arguments, like |\smash| macro, which (re)defined by \pkg{amsmath} package. -% Optional argument sets change of height only (\texttt{t}) or depth only~(\texttt{b}). -% Mandatory argument includes text. +% This macro changes included box by |\jot| value (usually 3\,pt). It is defined +% with optional and mandatory arguments, like |\smash| macro, which (re)defined by +% \pkg{amsmath} package. Optional argument sets change of height only (\texttt{t}) +% or depth only~(\texttt{b}). Mandatory argument includes text. % \begin{quote} % |\gape|\oarg{\texttt{t} or \texttt{b}}\marg{text} % \end{quote} @@ -348,8 +372,8 @@ % \end{quote} % % \DescribeMacro{\Gape} -% Another way of height/depth modification. This macro allows different correction for -% height and depth of box: +% Another way of height/depth modification. This macro allows different correction +% for height and depth of box: % \begin{quote} % |\Gape|\oarg{height corr}\oarg{depth corr}\marg{text} % \end{quote} @@ -388,20 +412,20 @@ % \DescribeMacro{\botstrut} % These three macros modify standard |\strut| by |\jot| value: % |\bottopstrut| changes both height and depth; -% |\topstrut| changes only height; +% \nopagebreak|\topstrut| changes only height; % |\botstrut| changes only depth. % These commands could be useful, for example, in first and last table rows. % % \emph{Note}. If you use % \pkg{bigstrut} package note that these macros duplicate \cmd{\bigstrut}, -% \cmd{\bigstrut[t]}, and \cmd{\bigstrut[b]} commands consequently. Please note that value, -% which increases strut in \cmd{\topstrut} etc. equals to \cmd{\jot}, but \cmd{\bigstrut} -% and others use a special dimension \cmd{\bigstrutjot}. +% \cmd{\bigstrut[t]}, and \cmd{\bigstrut[b]} commands consequently. Please note +% that value, which increases strut in \cmd{\topstrut} etc. equals to \cmd{\jot}, +% but \cmd{\bigstrut} and others use a special dimension \cmd{\bigstrutjot}. % % \section{How to Change Vertical Spaces Around in Whole Table}\label{sec:beta} % -% This section describes macros which try to emulate one of possibilities of \pkg{tabls} -% package: to get necessary vertical spacing around cells. +% This section describes macros which try to emulate one of possibilities of +% \pkg{tabls} package: to get necessary vertical spacing around cells. % % \DescribeMacro{\setcellgapes} % Sets the parameters for vertical spaces. It looks like |\gape*| command without @@ -413,16 +437,18 @@ % \begin{quote} % |\setcellgapes{5pt}| % \end{quote} -% You may also try to load negative values if you wish. This macro you may put in the -% preamble as common settings. +% You may also try to load negative values if you wish. This macro you may put in +% the preamble as common settings. % % \DescribeMacro{\makegapedcells} % \DescribeMacro{\nomakegapedcells} -% The first macro switches on vertical spacing settings. The second cancels first~one. +% The first macro switches on vertical spacing settings. The second cancels +% first~one. % % The \cmd{\makegapedcells} macro temporarily redefines macro % |\@classz| of \pkg{array} package, so use this mechanism carefully. -% Load |\makegapedcells| inside group or inside environment (see table~\ref{tab:gaped}): +% Load |\makegapedcells| inside group or inside environment +% (see table~\ref{tab:gaped}): %\begin{verbatim} %\begin{table}[h] %\makegapedcells @@ -433,7 +459,8 @@ % \begin{table} % \makegapedcells % \ttabbox -% {\caption{Example of multilined cells with additional vertical spaces}\label{tab:gaped}}% +% {\caption{Example of multilined cells with additional vertical spaces}%^^A +% \label{tab:gaped}}% % {\begin{tabular}{|c|c|} % \hline % Cell text & 28--31\\ @@ -448,26 +475,29 @@ % \hline % \makecell*[{{p{3cm}}}]{Cell long text with predefined width} & 52--58\\ % \hline -% \makecell[{{>{\parindent1em}p{3cm}}}]{Cell long text with predefined width} & 52--58\\ +% \makecell[{{>{\parindent1em}p{3cm}}}]{Cell long text with predefined width} +% & 52--58\\ % \hline % \end{tabular}} % \end{table} % -% Please note that space defined in |\setcellgapes| and space which creates |\gape| mechanism +% Please note that space defined in |\setcellgapes| and space which creates |\gape| +% mechanism % in commands for tabular cells (usually |\thead| or |\makecell*|) are summarized. % % \section{Multirow Table Heads and Cells} % -% The next examples show usage of macros which use |\multirow| command from \pkg{multirow} -% package.\nopagebreak +% The next examples show usage of macros which use |\multirow| command from +% \pkg{multirow} package.\nopagebreak % % At first goes short repetition of arguments of |\multirow| macro itself: % \begin{quote} % |\multirow|\marg{nrow}\oarg{njot}\marg{width}\oarg{vmove}\marg{contents} % \end{quote} % \marg{nrow} sets number of rows (i.e. text lines); -% \oarg{njot} is mainly used if you've used \pkg{bigstrut} package: it makes additional -% tuning of vertical position (see comments in \pkg{multirow} package); +% \oarg{njot} is mainly used if you've used \pkg{bigstrut} package: it makes +% additional tuning of vertical position (see comments in \pkg{multirow} +% package); % \marg{width} defines width of contents, the |*| sign used to indicate that % the text argument's natural width is to be used; % \oarg{vmove} is a length used for fine tuning: the text will be raised (or @@ -480,13 +510,14 @@ % \begin{quote} % |\multirowcell|\marg{nrow}\oarg{vmove}\oarg{hor alignment}\marg{contents} % \end{quote} -% in these macros were skipped \oarg{njot} and \marg{width}. Instead of tuning optional -% argument \oarg{njot} for vertical +% in these macros were skipped \oarg{njot} and \marg{width}. Instead of tuning +% optional argument \oarg{njot} for vertical % correction used \oarg{vmove} optional argument. % For the \marg{width} argument both |\multirowcell| and |\multirowthead| macros % use natural width of contents (i.e. the |*| argument used). % -% First example (table~\ref{tab:mrowI}) with ``|\multirow|'ed'' column heads and cells: +% First example (table~\ref{tab:mrowI}) with ``|\multirow|'ed'' column heads +% and cells: %\begin{verbatim} %\renewcommand\theadset{\def\arraystretch{.85}}% %\begin{tabular}{|l|c|c|} @@ -524,17 +555,19 @@ % \cline{1-2} % \makecell[r]{Right aligned\\ cell text} & D & \\ % \hline -% \makecell[b]{Bottom aligned\\ cell text} & E & \multirowcell{5}[1ex][r]{37--43\\52--58}\\ +% \makecell[b]{Bottom aligned\\ cell text} & E & +% \multirowcell{5}[1ex][r]{37--43\\52--58}\\ % \cline{1-2} % \makecell[{{p{5cm}}}]{Cell long long long long text with predefined width} & F & \\ % \cline{1-2} -% \makecell[{{>{\parindent1em}p{5cm}}}]{Cell long long long long text with predefined width} & G & \\ +% \makecell[{{>{\parindent1em}p{5cm}}}]{Cell long long long long text with +% predefined width} & G & \\ % \hline % \end{tabular}} % \end{table} % -% Second example (table~\ref{tab:mrowII}) with ``multirow'ed'' column heads and cells -% uses |\makegapedcells| command. The |\theadgape| command does nothing: +% Second example (table~\ref{tab:mrowII}) with ``multirow'ed'' column heads and +% cells uses |\makegapedcells| command. The |\theadgape| command does nothing: %\begin{verbatim} %\makegapedcells %\renewcommand\theadset{\def\arraystretch{.85}}% @@ -545,7 +578,8 @@ %\renewcommand\theadset{\def\arraystretch{.85}}% %\renewcommand\theadgape{} % \ttabbox -% {\caption{Example of ``\cmd{\multirow}'ed'' cells and additional vertical spaces}\label{tab:mrowII}}% +% {\caption{Example of ``\cmd{\multirow}'ed'' cells and additional vertical +% spaces}\label{tab:mrowII}}% % {\begin{tabular}{|l|c|c|} % \hline % \multirowthead{4}{First Column head}& @@ -562,18 +596,21 @@ % \cline{1-2} % \makecell[r]{Right aligned \\ cell text} & D & \\ % \hline -% \makecell[b]{Bottom aligned \\ cell text} & E & \multirowcell{6}[0ex][r]{37--43\\52--58}\\ +% \makecell[b]{Bottom aligned \\ cell text} & E & +% \multirowcell{6}[0ex][r]{37--43\\52--58}\\ % \cline{1-2} -% \makecell[{{p{5cm}}}]{Cell long long long long text with predefined width} & F & \\ +% \makecell[{{p{5cm}}}]{Cell long long long long text with predefined width} +% & F & \\ % \cline{1-2} -% \makecell[{{>{\parindent1em}p{5cm}}}]{Cell long long long long text with predefined width} & G & \\ +% \makecell[{{>{\parindent1em}p{5cm}}}]{Cell long long long long text with +% predefined width} & G & \\ % \hline % \end{tabular}} % \end{table} % \bigskip % -% The last example (table~\ref{tab:mrowIII}) uses \env{tabularx} environment with |\hsize| -% in the width argument. +% The last example (table~\ref{tab:mrowIII}) uses \env{tabularx} environment with +% |\hsize| in the width argument. %\begin{verbatim} %\makegapedcells %\renewcommand\theadset{\def\arraystretch{.85}}% @@ -617,15 +654,67 @@ % \cline{1-2} % \makecell[r]{Right aligned \\ cell text} & D & \\ % \hline -% \makecell[b]{Bottom aligned \\ cell text} & E & \multirowcell{6}[0ex][r]{37--43\\52--58}\\ +% \makecell[b]{Bottom aligned \\ cell text} & E & +% \multirowcell{6}[0ex][r]{37--43\\52--58}\\ % \cline{1-2} -% \makecell[{{p{\hsize}}}]{Cell long long long long long long text with predefined width} & F & \\ +% \makecell[{{p{\hsize}}}]{Cell long long long long long long text with +% predefined width} & F & \\ % \cline{1-2} -% \makecell[{{>{\parindent1em}p{\hsize}}}]{Cell long long long long long long text with predefined width} & G & \\ +% \makecell[{{>{\parindent1em}p{\hsize}}}]{Cell long long long long long +% long text with predefined width} & G & \\ % \hline % \end{tabularx}} % \end{table} % +% \subsection{Multirow Table Heads and Cells: Second Variant} +% +% Another, simplified, variant of multirow cell: use +% |\makecell| and |\thead| commands, and set |\\| with +% negative space at the end, for example +%\begin{quote} +% |\thead{First Column head\\[-5ex]}| +%\end{quote} +% cells, which stay in one ``multi row'' will have the same value of this +% negative space, in spite of different number of lines in their contents. +% +% \section{Numbered Lines in Tabulars} +% +% The three commands |\eline|, |\nline|, |\rnline| allow to skip: +% \begin{quote} +% |\eline|\marg{number of cells} +% \end{quote} +% and numbering (|\nline|) a few/all sells in the row: +% \begin{quote} +% |\nline|\oarg{numbering type}\oarg{start number}\marg{number of cells} +% \end{quote} +% Command |\rnline| does the same as |\nline|, but allows numbering by +% Russian letters (it redefines +% \LaTeX's |\Alph| and |\alph| with |\Asbuk| and |\asbuk| consequently). +% (see table~\ref{tab:elines}) +%\begin{verbatim} +% \begin{tabular}{|*{12}{c|}} +% \hline +% \eline{6} \\ \hline +% \nline{6} \\ \hline +% \eline{3} & \nline[1][4]{3} \\ \hline +% \nline[(a)]{6} \\ \hline +% \nline[column I]{6} \\ \hline +% \end{tabular} +%\end{verbatim} +% +% \begin{table} +% \ttabbox +% {\caption{Examples of filling of cells}\label{tab:elines}}% +% {\begin{tabular}{|*{6}{c|}} +% \hline +% \eline{6} \\ \hline +% \nline{6} \\ \hline +% \eline{3} & \nline[1][4]{3} \\ \hline +% \nline[(a)]{6} \\ \hline +% \nline[column I]{6} \\ \hline +% \end{tabular}} +%\end{table} +% % \StopEventually{}\clearpage % % \section{Code of package} @@ -639,14 +728,15 @@ % % \begin{macro}{\makecell} % The definition of command for multilined cells. At first defined |\gape| stuff. -% Non-star from loads special setting for vertical space around (if it used). +% Non-star form loads special setting for vertical space around (if it used). % Star form always creates additional vertical |\jot|-spaces. % \begin{macrocode} \newcommand\makecell{\@ifstar{\let\tabg@pe\gape\makecell@}% {\let\tabg@pe\cellgape\makecell@}} % \end{macrocode} % Next macro loads vertical and horizontal common alignment for cells and -% defines spacing parameters |\arraystretch| and |\extrarowheight| if necessary. +% loads redefined spacing parameters |\arraystretch| and |\extrarowheight| +% if these parameters were redefined. % \begin{macrocode} \newcommand\makecell@{\def\t@bset{\cellset}% \let\mcell@align\cellalign @@ -664,8 +754,9 @@ {\let\tabg@pe\theadgape\thead@}} % \end{macrocode} % Next macro loads vertical and horizontal common alignment for column heads and -% defines spacing parameters |\arraystretch| and |\extrarowheight| if necessary. -% (First go settings for cells then special settings for column heads.) +% loads redefined spacing parameters |\arraystretch| and |\extrarowheight| +% if these parameters were redefined. +% (First go settings for cells, as for |\makecell|, then special settings for column heads.) % % For column heads also loaded font settings. % \begin{macrocode} @@ -697,8 +788,8 @@ % additional justification settings) % \begin{macrocode} \@ifdefinable\@rotcell{} -\def\@rotcell[#1]#2{\\[-.65\normalbaselineskip] - \turn{\cellrotangle}\makecell[#1]{#2}\endturn} +\def\@rotcell[#1]#2{\makecell{\\[-.65\normalbaselineskip] + \turn{\cellrotangle}\makecell[#1]{#2}\endturn}} \newcommand\@@rotcell[1]{\makecell{\\[-.65\normalbaselineskip] \turn{\cellrotangle}\makecell[c{>{\rightskip0explus \rotheadsize\hyphenpenalty0\pretolerance-1% @@ -719,8 +810,8 @@ {\let\theadgape\rotheadgape \@ifnextchar[{\@rothead}{\@@rothead}}} % \end{macrocode} -% For rotated column head default column setting is similar to |p{\rotheadsize}| (plus some -% additional justification settings) +% For rotated column head default column setting is similar to |p{\rotheadsize}| +% (plus some additional justification settings) % \begin{macrocode} \@ifdefinable\@rothead{} \def\@rothead[#1]#2{\thead{\\[-.65\normalbaselineskip] @@ -917,7 +1008,8 @@ % \begin{macro}{\theadalign} % The layout macros for tabular building settings.\nopagebreak % -% Spacing settings for tabular spacing inside cells (like |\arraystretch| or |\extrarowheight|).\nopagebreak +% Spacing settings for tabular spacing inside cells (like |\arraystretch| +% or |\extrarowheight|).\nopagebreak % \begin{macrocode} \newcommand\cellset{\def\arraystretch{1}\extrarowheight\z@ \nomakegapedcells} @@ -939,7 +1031,8 @@ % \begin{macrocode} \newcommand\theadfont{\footnotesize} % \end{macrocode} -% Special spacing settings for tabular spacing in column heads (like |\arraystretch| or/and |\extrarowheight|). +% Special spacing settings for tabular spacing in column heads (like |\arraystretch| +% or/and |\extrarowheight|). % \begin{macrocode} \newcommand\theadset{} % \end{macrocode} @@ -1105,5 +1198,144 @@ % \end{macrocode} % \end{macro} % +% \subsection{Rows of skipped and numbered cells} +% +% \begin{macro}{\eline} +% The row of empty cells. +% \begin{macrocode} +\newcommand\eline[1]{\count@ #1% + \advance\count@\m@ne + \loop \@temptokena\expandafter{\the\@temptokena&}% + \advance\count@\m@ne \ifnum\count@>\z@\repeat + \the\@temptokena\ignorespaces} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\rnline} +% \begin{macro}{\nline} +% The rows of numbered cells. The |\rnline| command replaces |\Alph| and +% |\alph| counter by |\Asbuk| and |\asbuk| consequently. +% \begin{macrocode} +\newcommand\rnline{\gdef + \TeXr@rus{\let\@Alph\@Asbuk\let\@alph\@asbuk}\@nline} +\newcommand\nline{\gdef\TeXr@rus{}\@nline} +\newcommand\@nline{\@ifnextchar[%] + {\@@nline}{\@@nline[1]}} +\@ifdefinable\@@nline{} +\def\@@nline[#1]{\@ifnextchar[%] + {\@@@nline[#1]}{\@@@nline[#1][1]}} +\@ifdefinable\@@@nline{} +\def\@@@nline[#1][#2]#3{\count@ #3% + \expandafter\TeXr@loop\@gobble{}#1\@@@ + \xdef\Num{\the\TeXr@lab}% + \@tempcnta#2\relax% + \expandafter\@temptokena\expandafter{\Num + \global\advance\@tempcnta\@ne}% + \advance\count@\m@ne + \loop\@temptokena\expandafter{\the\@temptokena& + \Num \global\advance\@tempcnta\@ne}% + \advance\count@\m@ne \ifnum\count@>\z@ \repeat + \the\@temptokena\ignorespaces} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% [Borrowed code stuff and explanation from \pkg{enumerate}/\pkg{paralist} +% packages just with changes of command names.] +% +% Internal token register used to build up the label command from the +% optional argument. +% \begin{macrocode} +\newtoks\TeXr@lab +% \end{macrocode} +% This just expands to a `?'. |\ref| will produce this, if no counter +% is printed. +% \begin{macrocode} +\def\TeXr@qmark{?} +% \end{macrocode} +% The next four macros build up the command that will print the item +% label. They each gobble one token or group from the optional argument, +% and add corresponding tokens to the register |\@enLab|. They each end +% with a call to |\@enloop|, which starts the processing of the next +% token. +% \begin{macro}{\TeXr@label} +% Add the counter to the label. |#2| will be one of the `special' +% tokens |A a I i 1|, and is thrown away. |#1| will be a command +% like |\Roman|. +% \begin{macrocode} +\def\TeXr@label#1#2{% + \xdef\TeXr@the{\noexpand#1\@tempcnta}% + \TeXr@lab\expandafter{\the\TeXr@lab\TeXr@rus\TeXr@the}% + \advance\@tempcnta1 + \TeXr@loop} +% \end{macrocode} +% The only foreign command in this stuff. It indicates whether +% the list has numeration by Russian letters. +% \begin{macrocode} +\def\TeXr@rus{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\TeXr@space} +% \begin{macro}{\TeXr@sp@ce} +% Add a space to the label. The tricky bit is to gobble the space token, +% as you can not do this with a macro argument. +% \begin{macrocode} +\def\TeXr@space{\afterassignment\TeXr@sp@ce\let\@tempa= } +\def\TeXr@sp@ce{\TeXr@lab\expandafter{\the\TeXr@lab\space}\TeXr@loop} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\TeXr@group} +% Add a |{ }| group to the label. +% \begin{macrocode} +\def\TeXr@group#1{\TeXr@lab\expandafter{\the\TeXr@lab{#1}}\TeXr@loop} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\TeXr@other} +% Add anything else to the label +% \begin{macrocode} +\def\TeXr@other#1{\TeXr@lab\expandafter{\the\TeXr@lab#1}\TeXr@loop} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\TeXr@loop} +% \begin{macro}{\TeXr@loop@} +% The body of the main loop. +% Eating tokens this way instead of using |\@tfor| lets you see +% spaces and {\bf all} braces. |\@tfor| would treat {\tt a} and +% |{a}| as special, but not |{{a}}|. +% \begin{macrocode} +\def\TeXr@loop{\futurelet\TeXr@temp\TeXr@loop@} +% \end{macrocode} +% \begin{macrocode} +\def\TeXr@loop@{% + \ifx A\TeXr@temp \def\@tempa{\TeXr@label\@Alph }\else + \ifx a\TeXr@temp \def\@tempa{\TeXr@label\@alph }\else + \ifx i\TeXr@temp \def\@tempa{\TeXr@label\@roman }\else + \ifx I\TeXr@temp \def\@tempa{\TeXr@label\@Roman }\else + \ifx 1\TeXr@temp \def\@tempa{\TeXr@label\@arabic}\else + \ifx \@sptoken\TeXr@temp \let\@tempa\TeXr@space \else + \ifx \bgroup\TeXr@temp \let\@tempa\TeXr@group \else + \ifx \@@@\TeXr@temp \let\@tempa\@gobble \else + \let\@tempa\TeXr@other +% \end{macrocode} +% Hook for possible extensions +% \begin{macrocode} + \TeXr@hook + \fi\fi\fi\fi\fi\fi\fi\fi + \@tempa} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\TeXr@hook} +% \begin{macrocode} +\providecommand\TeXr@hook{} +% \end{macrocode} +% \end{macro} +% % \Finale \endinput diff --git a/Master/texmf-dist/tex/latex/makecell/makecell.sty b/Master/texmf-dist/tex/latex/makecell/makecell.sty index f50853755dd..eef95d7b4e6 100644 --- a/Master/texmf-dist/tex/latex/makecell/makecell.sty +++ b/Master/texmf-dist/tex/latex/makecell/makecell.sty @@ -22,7 +22,7 @@ %% in the same archive or directory.) \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{makecell} - [2005/07/02 v0.1a Multilined Cells and Tabular Heads] + [2006/06/28 v0.1c Multilined Cells and Tabular Heads] \RequirePackage{array} \newcommand\makecell{\@ifstar{\let\tabg@pe\gape\makecell@}% {\let\tabg@pe\cellgape\makecell@}} @@ -43,8 +43,8 @@ \let\tabg@pe\empty\let\t@bset\cellset\makecell@} {\@ifnextchar[{\@rotcell}{\@@rotcell}}} \@ifdefinable\@rotcell{} -\def\@rotcell[#1]#2{\\[-.65\normalbaselineskip] - \turn{\cellrotangle}\makecell[#1]{#2}\endturn} +\def\@rotcell[#1]#2{\makecell{\\[-.65\normalbaselineskip] + \turn{\cellrotangle}\makecell[#1]{#2}\endturn}} \newcommand\@@rotcell[1]{\makecell{\\[-.65\normalbaselineskip] \turn{\cellrotangle}\makecell[c{>{\rightskip0explus \rotheadsize\hyphenpenalty0\pretolerance-1% @@ -203,6 +203,58 @@ \fi \global\let\mcell@left\relax\global\let\mcell@right\relax }\prepnext@tok} +\newcommand\eline[1]{\count@ #1% + \advance\count@\m@ne + \loop \@temptokena\expandafter{\the\@temptokena&}% + \advance\count@\m@ne \ifnum\count@>\z@\repeat + \the\@temptokena\ignorespaces} +\newcommand\rnline{\gdef + \TeXr@rus{\let\@Alph\@Asbuk\let\@alph\@asbuk}\@nline} +\newcommand\nline{\gdef\TeXr@rus{}\@nline} +\newcommand\@nline{\@ifnextchar[%] + {\@@nline}{\@@nline[1]}} +\@ifdefinable\@@nline{} +\def\@@nline[#1]{\@ifnextchar[%] + {\@@@nline[#1]}{\@@@nline[#1][1]}} +\@ifdefinable\@@@nline{} +\def\@@@nline[#1][#2]#3{\count@ #3% + \expandafter\TeXr@loop\@gobble{}#1\@@@ + \xdef\Num{\the\TeXr@lab}% + \@tempcnta#2\relax% + \expandafter\@temptokena\expandafter{\Num + \global\advance\@tempcnta\@ne}% + \advance\count@\m@ne + \loop\@temptokena\expandafter{\the\@temptokena& + \Num \global\advance\@tempcnta\@ne}% + \advance\count@\m@ne \ifnum\count@>\z@ \repeat + \the\@temptokena\ignorespaces} +\newtoks\TeXr@lab +\def\TeXr@qmark{?} +\def\TeXr@label#1#2{% + \xdef\TeXr@the{\noexpand#1\@tempcnta}% + \TeXr@lab\expandafter{\the\TeXr@lab\TeXr@rus\TeXr@the}% + \advance\@tempcnta1 + \TeXr@loop} +\def\TeXr@rus{} +\def\TeXr@space{\afterassignment\TeXr@sp@ce\let\@tempa= } +\def\TeXr@sp@ce{\TeXr@lab\expandafter{\the\TeXr@lab\space}\TeXr@loop} +\def\TeXr@group#1{\TeXr@lab\expandafter{\the\TeXr@lab{#1}}\TeXr@loop} +\def\TeXr@other#1{\TeXr@lab\expandafter{\the\TeXr@lab#1}\TeXr@loop} +\def\TeXr@loop{\futurelet\TeXr@temp\TeXr@loop@} +\def\TeXr@loop@{% + \ifx A\TeXr@temp \def\@tempa{\TeXr@label\@Alph }\else + \ifx a\TeXr@temp \def\@tempa{\TeXr@label\@alph }\else + \ifx i\TeXr@temp \def\@tempa{\TeXr@label\@roman }\else + \ifx I\TeXr@temp \def\@tempa{\TeXr@label\@Roman }\else + \ifx 1\TeXr@temp \def\@tempa{\TeXr@label\@arabic}\else + \ifx \@sptoken\TeXr@temp \let\@tempa\TeXr@space \else + \ifx \bgroup\TeXr@temp \let\@tempa\TeXr@group \else + \ifx \@@@\TeXr@temp \let\@tempa\@gobble \else + \let\@tempa\TeXr@other + \TeXr@hook + \fi\fi\fi\fi\fi\fi\fi\fi + \@tempa} +\providecommand\TeXr@hook{} \endinput %% %% End of file `makecell.sty'. diff --git a/Master/texmf-dist/tpm/makecell.tpm b/Master/texmf-dist/tpm/makecell.tpm index d2fc5aa6ced..6538e161d09 100644 --- a/Master/texmf-dist/tpm/makecell.tpm +++ b/Master/texmf-dist/tpm/makecell.tpm @@ -3,7 +3,7 @@ makecell Package - 2006/01/11 23:54:45 + 2006/06/28 19:09:00 karl Tabular column heads and multilined cells @@ -21,17 +21,17 @@ The Package offers also: 473544 - + texmf-dist/tex/latex/makecell/makecell.sty texmf-dist/tpm/makecell.tpm - -texmf-dist/doc/latex/makecell/makecell-rus.pdf + +texmf-dist/doc/latex/makecell/README texmf-dist/doc/latex/makecell/makecell-rus.tex texmf-dist/doc/latex/makecell/makecell.pdf texmf-dist/doc/latex/makecell/makecell.xml - + texmf-dist/source/latex/makecell/makecell.dtx Package/makecell -- cgit v1.2.3