diff options
author | Karl Berry <karl@freefriends.org> | 2009-08-03 21:24:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-08-03 21:24:50 +0000 |
commit | 2be1f5b6a176fa29368bc5ca8a19c16ef23742e4 (patch) | |
tree | 4773af76fe69641d33a6641865c05cc8fa48a905 /Master | |
parent | 5a6870c92a91af362f2f511834a6094491774d46 (diff) |
makecell 0.1e (3aug09)
git-svn-id: svn://tug.org/texlive/trunk@14523 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/makecell/README | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/makecell/makecell-rus.pdf | bin | 135631 -> 526531 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/makecell/makecell-rus.tex | 329 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/makecell/makecell.pdf | bin | 133516 -> 266039 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/makecell/makecell.dtx | 363 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/makecell/makecell.sty | 42 |
6 files changed, 639 insertions, 101 deletions
diff --git a/Master/texmf-dist/doc/latex/makecell/README b/Master/texmf-dist/doc/latex/makecell/README index 5fd35e97bfa..612fa394bd7 100644 --- a/Master/texmf-dist/doc/latex/makecell/README +++ b/Master/texmf-dist/doc/latex/makecell/README @@ -8,7 +8,9 @@ Managing of tabular column heads and cells. around all cells in tabular, like in tabls package, but based on array package; 2) macros for multirow cells/heads, which use macro from multirow package; 3) macros for numbered rows of cells or skipping - cells in tabulars; 4) diagonally divided cells; 5) macros for + cells and rows in tabulars; 4) diagonally divided cells (plus + citation of the sample file of slashbox package); 5) macros for horizonral lines in tabulars with defined thickness. -Documentation: makecell.pdf. +Documentation: makecell.pdf, makecell-rus.pdf. + diff --git a/Master/texmf-dist/doc/latex/makecell/makecell-rus.pdf b/Master/texmf-dist/doc/latex/makecell/makecell-rus.pdf Binary files differindex cd9e73aebf1..87e334fb87f 100644 --- a/Master/texmf-dist/doc/latex/makecell/makecell-rus.pdf +++ b/Master/texmf-dist/doc/latex/makecell/makecell-rus.pdf diff --git a/Master/texmf-dist/doc/latex/makecell/makecell-rus.tex b/Master/texmf-dist/doc/latex/makecell/makecell-rus.tex index 451b8eb7ab6..daaed9cb67a 100644 --- a/Master/texmf-dist/doc/latex/makecell/makecell-rus.tex +++ b/Master/texmf-dist/doc/latex/makecell/makecell-rus.tex @@ -17,20 +17,12 @@ \usepackage[cp1251]{inputenc} \usepackage[english,russian]{babel} -\usepackage{ifpdf} -\ifpdf - \usepackage{mathptm} - \IfFileExists{t2apxtt.fd}{\def\ttdefault{pxtt}}{} - \IfFileExists{t2aftm.fd}{\def\rmdefault{ftm}}{} - \IfFileExists{t2aftx.fd}{\def\sfdefault{ftx}}{} -\fi - -\usepackage{makecell} \IfFileExists{rotating.sty}{\usepackage{rotating}}{} \IfFileExists{footmisc.sty}{\usepackage[perpage]{footmisc}}{} \IfFileExists{multirow.sty}{\usepackage{multirow}}{} \IfFileExists{hyperref.sty}{\usepackage[unicode]{hyperref}}{} \IfFileExists{hypcap.sty}{\usepackage{hypcap}}{} +\usepackage{makecell} \IfFileExists{caption.sty} {\usepackage[font=small,labelfont=bf,labelsep=period]{caption}[2004/11/28] \IfFileExists{floatrow.sty} @@ -40,6 +32,8 @@ \@ifundefined{ttabbox}{\let\ttabbox\relax}{} \makeatother \usepackage{tabularx} +\usepackage{slashbox} +\usepackage{hhline} \EnableCrossrefs \CodelineIndex \RecordChanges @@ -49,7 +43,7 @@ \clubpenalty10000 \makeatother \providecommand*{\file}[1]{\texttt{#1}} -\providecommand*{\pkg}[1]{\textsf{#1}} +\providecommand*{\package}[1]{\textsf{#1}} \providecommand*{\cls}[1]{\textsf{#1}} \providecommand*{\env}[1]{\texttt{#1}} \begin{document} @@ -65,7 +59,6 @@ % \author{% % Ольга Лапко\\ % {\tt Lapko.O@g23.relcom.ru} } -% \date{2007/05/24} % \maketitle % \begin{abstract} %^^A% This package helps to create common layout for tabular material. @@ -73,34 +66,41 @@ %^^A% for creation of tabular column heads. This macro allows to support common %^^A% layout for tabular column heads in whole documentation. Another command, %^^A% |\makecell|, is offered for creation of multilined tabular cells. +%^^A% There are also command |\makecellbox| command and |mcellbox| environment +%^^A% usage of tabular cells inside text. % Данный пакет помогает создать единое оформление для таблиц во всём % документе. Команда |\thead|, использующая окружение одноколоночной % таблицы, позволяет создать единообразное оформление для заголовков % табличных колонок в~документе. Ещё одна команда, |\makecell|, % предлагается для создания многострочных ячеек в~таблицах. +% Также созданы команда |\makecellbox| и~окружение |mcellbox| +% для создания таблиц-ячеек внутри текста. % %^^A% Package also offers: \quad 1)\nobreak\enskip macro |\makegapedcells|, %^^A% which changes vertical spaces around all cells in tabular, like in -%^^A% \pkg{tabls} package, but uses code of \pkg{array} package. (Macro -%^^A% |\makegapedcells| redefines macro |\@classz| from \pkg{array} package. +%^^A% \package{tabls} package, but uses code of \package{array} package. (Macro +%^^A% |\makegapedcells| redefines macro |\@classz| from \package{array} package. %^^A% Macro |\nomakegapedcells| cancels this redefinition.); %^^A% \quad 2)\nobreak\enskip macros |\multirowhead| and |\multirowcell|, -%^^A% which use |\multirow| macro from \pkg{multirow} package; -%^^A% \quad 3)\nobreak\enskip numbered lines |\nline| or skipping cells |\eline| -%^^A% in tabulars; -%^^A% \quad 4)\nobreak\enskip diagonally divided cells (|\diaghead|); +%^^A% which use |\multirow| macro from \package{multirow} package; +%^^A% \quad 3)\nobreak\enskip numbered rows |\nline| or skipping cells |\eline| +%^^A% in tabulars; also are the skipping rows command |\erows| and +%^^A% repeated rows command |\Xrows|; +%^^A% \quad 4)\nobreak\enskip diagonally divided cells (|\diaghead|) +%^^A% plus citation of sample file of \package{slashbox} package, which does the same; %^^A% \quad 5)\nobreak\enskip |\hline| and |\cline| width necessary thickness: %^^A% |\Xhline| and |\Xcline| consequently. % Также предлагается: \qquad 1)\nobreak\enskip макрокоманда |\makegapedcells|, % которая изменяет вертикальные отбивки вокруг табличных ячеек, аналогично -% пакету \pkg{tabls}, но использует пакет \pkg{array}. (Команда +% пакету \package{tabls}, но использует пакет \package{array}. (Команда % |\makegapedcells| переопределяет макрокоманду |\@classz| пакета -% \pkg{array}. Макрокоманда |\nomakegapedcells| отменяет переопределение.); +% \package{array}. Макрокоманда |\nomakegapedcells| отменяет переопределение.); % \qquad 2)\nobreak\enskip макрокоманды |\multirowhead| и~|\multirowcell|, -% использующие макрокоманду |\multirow| из пакета \pkg{multirow}; +% использующие макрокоманду |\multirow| из пакета \package{multirow}; % \qquad 3)\nobreak\enskip ряд нумерованных |\nline| или пропущенных |\eline| -% ячеек; -% \qquad 4)\nobreak\enskip ячейки разделённые диагональю (|\diaghead|); +% ячеек, а~также пустых рядов |\erows| и~рядов с~повторяющимся текстом |\Xrows|; +% \qquad 4)\nobreak\enskip ячейки разделённые диагональю (|\diaghead|), +% а~также файл образец пакета \package{slashbox}, делающего то же самое; % \qquad 5)\nobreak\enskip линейки |\hline| и~|\cline| с~заданной толщиной: % |\Xhline| и~|\Xcline|. % \smallskip @@ -134,13 +134,13 @@ %^^A% this letters you usually put in optional argument of \env{tabular} or %^^A% \texttt{array} environments. For horizontal alignment you may use alignment %^^A% settings like \texttt{r}, \texttt{l}, or \texttt{c}, or more complex, like -%^^A% |{p{3cm}}|. Since this package loads \pkg{array} package, you may +%^^A% |{p{3cm}}|. Since this package loads \package{array} package, you may %^^A% use such alignment settings like |{>{\parindent1cm}p{3cm}}|. % Для вертикальной выключки используются обозначения \texttt{t}, \texttt{b}, % или \texttt{c} \cdash--- эти буквы используются в~дополнительном аргументе окружений % \env{tabular} или \texttt{array}. Для горизонтальной выключки вы можете % использовать обозначения \texttt{r}, \texttt{l}, или \texttt{c}, или более -% сложные: |{p{3cm}}|. Поскольку данный пакет загружает пакет \pkg{array}, вы +% сложные: |{p{3cm}}|. Поскольку данный пакет загружает пакет \package{array}, вы % можете использовать и~такие определения выключки: |{>{\parindent1cm}p{3cm}}|. %\begin{verbatim} %\begin{tabular}{|c|c|} @@ -441,12 +441,12 @@ % \DescribeMacro{\gape} %^^A% This macro changes included box by |\jot| value (usually 3\,pt). It is %^^A% defined with optional and mandatory arguments, like |\smash| macro, which -%^^A% (re)defined by \pkg{amsmath} package. Optional argument sets change of +%^^A% (re)defined by \package{amsmath} package. Optional argument sets change of %^^A% height only (\texttt{t}) or depth only~(\texttt{b}). Mandatory argument %^^A% includes text. % Первая макрокоманда изменяет бокс на величину |\jot| (обычно 3\,pt). Она задаётся % дополнительным и~обязательным аргументами, как и~команда |\smash|, -% (пере)определённая пакетом \pkg{amsmath}. Дополнительный аргумент задаёт +% (пере)определённая пакетом \package{amsmath}. Дополнительный аргумент задаёт % изменение только высоты (\texttt{t}) или только глубины % (\texttt{b}). Обязательный включает собственно текст. % \begin{quote} @@ -537,13 +537,13 @@ % Эти команды можно использовать, например, в~первом и~последнем рядах таблицы. % %^^A% \emph{Note}. If you use -%^^A% \pkg{bigstrut} package note that these macros duplicate \cmd{\bigstrut}, +%^^A% \package{bigstrut} package note that these macros duplicate \cmd{\bigstrut}, %^^A% \cmd{\bigstrut[t]}, and \cmd{\bigstrut[b]} commands consequently. Please %^^A% note that value, which increases strut in \cmd{\topstrut} etc. equals to %^^A% \cmd{\jot}, but \cmd{\bigstrut} and others use a special dimension %^^A% \cmd{\bigstrutjot}. % \emph{Замечание}. Если -% вы используете пакет \pkg{bigstrut}, обратите внимание, что эти три команды +% вы используете пакет \package{bigstrut}, обратите внимание, что эти три команды % дублируют \cmd{\bigstrut}, \cmd{\bigstrut[t]}, и~\cmd{\bigstrut[b]} соответственно. % Обратите также внимание что величина, изменяющая \cmd{\strut} в~команде % \cmd{\topstrut} и~других равна \cmd{\jot}, а~команда @@ -555,9 +555,9 @@ % \section{Как изменить вертикальные отбивки во всей таблице}\label{sec:beta} % %^^A% This section describes macros which try to emulate one of possibilities of -%^^A% \pkg{tabls} package: to get necessary vertical spacing around cells. +%^^A% \package{tabls} package: to get necessary vertical spacing around cells. % Данный раздел описывает макрокоманды, которые пытаются эмулировать -% одну из возможностей пакета \pkg{tabls}: +% одну из возможностей пакета \package{tabls}: % создание необходимых отбивок вокруг ячеек таблицы. % % \DescribeMacro{\setcellgapes} @@ -583,11 +583,11 @@ % Первая макрокоманда включает создание вертикальных отбивок. Вторая отменяет первую. % %^^A% The \cmd{\makegapedcells} macro temporarily redefines macro -%^^A% |\@classz| of \pkg{array} package, so use this mechanism carefully. +%^^A% |\@classz| of \package{array} package, so use this mechanism carefully. %^^A% Load |\makegapedcells| inside group or inside environment %^^A% (see table~\ref{tab:gaped}): % Макрокоманда \cmd{\makegapedcells} временно переопределяет макрокоманду -% |\@classz| из пакета \pkg{array}, поэтому используйте её осторожно. +% |\@classz| из пакета \package{array}, поэтому используйте её осторожно. % Вводите команду |\makegapedcells| внутри группы или внутри окружения % (см.~табл.~\ref{tab:gaped}): %\begin{verbatim} @@ -634,9 +634,9 @@ % \section{Заголовки колонок и~ячейки, занимающие несколько рядов} % %^^A% The next examples show usage of macros which use |\multirow| command from -%^^A% \pkg{multirow} package.\nopagebreak +%^^A% \package{multirow} package.\nopagebreak % Следующие примеры показывают использование макрокоманд, использующих команду -% |\multirow| из пакета \pkg{multirow}.\nopagebreak +% |\multirow| из пакета \package{multirow}.\nopagebreak % %^^A% At first goes short repetition of arguments of |\multirow| macro itself: % В~начале краткое повторение значений аргументов команды |\multirow|: @@ -645,12 +645,12 @@ % \end{quote} %^^A% \marg{nrow} sets number of rows (i.e. text lines); % \marg{nrow} задаёт число рядов (то есть строк текста); -%^^A% \oarg{njot} is mainly used if you've used \pkg{bigstrut} package: it makes +%^^A% \oarg{njot} is mainly used if you've used \package{bigstrut} package: it makes %^^A% additional tuning of vertical position (see comments in -%^^A% \pkg{multirow} package); -% \oarg{njot} обычно используется если вы используете пакет \pkg{bigstrut}: делает +%^^A% \package{multirow} package); +% \oarg{njot} обычно используется если вы используете пакет \package{bigstrut}: делает % дополнительную настройку вертикального положения (см. пояснения в~пакете -% \pkg{mutirow}); +% \package{mutirow}); %^^A% \marg{width} defines width of contents, the |*| sign used to indicate that %^^A% the text argument's natural width is to be used; % \marg{width} определяет ширину включённого текста, знак~|*| используется @@ -913,7 +913,70 @@ % \end{tabular}} %\end{table} % -% \clearpage +%^^A% Two ``lazy'' commands: for empty table rows +%^^A% (|\erows|) and for rows with repeated text (|\Xrows|) were added in the version V0.1e. +% В~версии V0.1e добавлены две команы «для лодырей»: для создания пустых рядов в~таблице +% (|\erows|) и~для рядов с~повторяющимся текстом (|\Xrows|). +% +%\DeleteShortVerb{\|} +%\begin{verbatim} +% \begin{tabular}{|*{4}{c|}} +% \hline +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hline +% \erows{4}{8} +% \end{tabular}\quad +% \begin{tabular}{||c||c||c||c||} +% \hhline{|t:=:t:=:t:=:t:=:t|} +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hhline{|:=::=::=::=:|} +% \erows[\\ \hhline{|:=::=::=::=:|}]{4}{8} +% \eline{4}\\ \hhline{|b:=:b:=:b:=:b:=:b|} +% \end{tabular}\quad +% \begin{tabular}{|*{4}{c|}} +% \hline +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hline +% \Xrows{\refstepcounter{enumi}\arabic{enumi}.\eline{3}\\ \hline}{8} +% \end{tabular} +%\end{verbatim} +% +% \begin{table}[hbt]\extrarowheight1pt +% \ttabbox[\hsize] +% {\caption{Examples of filling of cells}\label{tab:elines}}% +% {\begin{tabular}{|*{4}{c|}} +% \hline +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hline +% \erows{4}{8} +% \end{tabular}\par\bigskip +% \begin{tabular}{||c||c||c||c||} +% \hhline{|t:*3{=:t:}=:t|} +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hhline{|:*3{=::}=:|} +% \erows[\\ \hhline{|:*3{=::}=:|}]{4}{7} +% \eline{4}\\ +% \hhline{|b:*3{=:b:}=:b|} +% \end{tabular}\par\bigskip +% \begin{tabular}{|*{4}{c|}} +% \hline +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hline +% \Xrows{\refstepcounter{enumi}\arabic{enumi}.\eline{4}\\ \hline}{8} +% \end{tabular}} +%\end{table} +%\MakeShortVerb{\|} +% +%^^A% \section{Cells (One-Column Tabulars) in the Text} +% \section{Ячейки (одноколоные таблицы) вкралпённые в~текст} +% +%^^A% If the |\makecell| command appears in the text (outside outer tabular +%^^A% environment) it could create wrong layout. The |\makecellbox| command +%^^A% and |mcellbox| environment are created for one-column tabulars in the text. +% Если команда |\makecell| появится внутри текста (т.\,е. вне другого окружения +% выравнивания) она создаст неверную вёрстку. Команда |\makecellbox| и~окружение +% |mcellbox| созданы для одноколонных простых таблиц, вкраплённых в~текст. +% %^^A% \section{Diagonally Divided Cell} % \section{Ячейки, разделённые по диагонали} % @@ -1062,9 +1125,195 @@ % Точное попадание концов диагонали в~углы ячейки зависит от её ширины. Если ячейка % \'уже необходимого то концы диагонали не «дотягиваются» до углов. % +%^^A% \section{Comparison: Diagonally Divided Cell with the slashbox package} +% \section{Сравнение: ячейки, разделённые по диагонали в~пакете slashbox} +% +%^^A% I didn't know about the \texttt{slashbox} package in time +%^^A% when the part of code for the diagonal cells was created. This package uses also picture +%^^A% |\line| mechanism, but calculates slopes automatically. It creates the +%^^A% |\backslash| direction of diagonal lines only. (The |\slash| direction +%^^A% is not correct? Or direction depends to traditions of current publishing house?) +% Во время создания команд ячеек, разделённых по диагонали мне не было известно +% о~пакете \texttt{slashbox}. Этот пакет также использует механизм окружения |picture| +% и~команды |\line|, но наклон линии рассчитывается автоматически. Пакет создаёт +% только наклон, соответствующий обратной наклонной (|\backslash|). (Направление, +% соответствующее прямой наклонной (|\slash|) всё-таки не является +% корректным. Или направление зависит от традиций издательства?) +% +%^^A% Here is used citation of the sample file distributed with the \texttt{slashbox} package%^^A +%^^A% \footnote{by Koichi Yasuoka, May 27, 1993; minor modification by Toru Sato, May 31, 1993}. +%^^A% The verbatim of the table examples are added only in citation.\smallskip +% Далее цитируется файл-образец (лучше читать текст этого параграфа +% на английском!), распространяемый вместе с~пакетом \texttt{slashbox}%^^A +% \footnote{by Koichi Yasuoka, May 27, 1993; minor modification by Toru Sato, May 31, 1993}. +% Здесь только добавлен |verbatim| примеров.\smallskip +% +% \begingroup\slshape +%^^A% The usage is pretty straightforward, such as +% Использование достаточно простое, например +% +%\begin{table}[H]% +%\begin{verbatim} +%\begin{tabular}{|l||*{5}{c|}}\hline +%\backslashbox{Room}{Date} +%&\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2} +%&\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline +%Meeting Room &&&&&\\\hline +%Auditorium &&&&&\\\hline +%Seminar Room &&&&&\\\hline +%\end{tabular} +%\end{verbatim}% +% +% \noindent +% \begin{tabular}{|l||*{5}{c|}}\hline +% \backslashbox{Room}{Date} +% &\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2} +% &\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline +% Meeting Room &&&&&\\\hline +% Auditorium &&&&&\\\hline +% Seminar Room &&&&&\\\hline +% \end{tabular} +%\end{table}% +% +%^^A% You may include a newline (\verb+\\+) in `Room' and/or `Date'. +%^^A% Note that you will get spaces aside the slash line if there is a +%^^A% wider column in the same column of a different line. +%^^A% In such a case, you need to specify the width of the slashed column +%^^A% by saying +% Вы можете использовать команду новой строки (\verb+\\+) в~аргументах, +% где заданы слова «Room» и/или «Date». Обратите внимание, что вы +% получите пробелы около наклонной линии, если содержимое колонки +% шире её головки. В~этом случае вам нужно определить ширину колонки, +% задав +% +%\begin{table}[H]% +%\begin{verbatim} +%\begin{tabular}{|l||*{4}{c|}}\hline +%\backslashbox[48mm]{Room}{Date} +%&\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2} +%&\makebox[3em]{6/3}\\\hline\hline +%Room With a Long Name &&&&\\\hline +%Auditorium &&&&\\\hline +%Seminar Room &&&&\\\hline +%\end{tabular} +%\end{verbatim}% +% +% \noindent +% \begin{tabular}{|l||*{4}{c|}}\hline +% \backslashbox[48mm]{Room}{Date} +% &\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2} +% &\makebox[3em]{6/3}\\\hline\hline +% Room With a Long Name &&&&\\\hline +% Auditorium &&&&\\\hline +% Seminar Room &&&&\\\hline +% \end{tabular} +%\end{table}% +% +%^^A% The specified width is neglected if it is narrower than the natural +%^^A% width of the column. +% Заданная ширина не будет принята в~расчёт, если реальная ширина шапки +% больше. +% +%^^A% \verb+\(back)slashbox+ assumes by default that there is a blank space +%^^A% of width \verb+\tabcolsep+ on both sides of the column. Thus the +%^^A% slash line might exceeds the boundary when you use \verb+@{}+ +%^^A% etc. +% Команда \verb+\(back)slashbox+ по умолчанию предполагает, что вокруг колонки +% задана отбивка, равная \verb+\tabcolsep+. В~результате, если вы используете +% что-то вроде \verb+@{}+, наклонная может вылезти на поля. +% +% Этого можно избежать, задав +% +%\begin{table}[H]% +%\begin{verbatim} +%\begin{tabular}{|@{\ $\bullet$\hspace*{3mm}}l||*{5}{c|}}\hline +%\multicolumn{1}{|@{}l||}{\backslashbox[0pt][l]{Room}{Date}} +%&\makebox[3em]{5/31}&\makebox[4em]{6/1}&\makebox[3em]{6/2} +%&\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline +%Meeting Room &&&&&\\\hline +%Auditorium &&&&&\\\hline +%Seminar Room &&&&&\\\hline +%\end{tabular} +%\end{verbatim}% +% +% \bigskip +% +% \noindent +% \begin{tabular}{|@{\ $\bullet$\hspace*{3mm}}l||*{5}{c|}}\hline +% \multicolumn{1}{|@{}l||}{\backslashbox[0pt][l]{Room}{Date}} +% &\makebox[3em]{5/31}&\makebox[4em]{6/1}&\makebox[3em]{6/2} +% &\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline +% Meeting Room &&&&&\\\hline +% Auditorium &&&&&\\\hline +% Seminar Room &&&&&\\\hline +% \end{tabular} +%\end{table}% +% +%^^A% Here \verb+[l]+ tells the command that there is no extra space on the +%^^A% left of this column. You can use \verb+[r]+ and \verb+[lr]+ likewise. +%^^A% You have to also specify the width of the column in this case, but it +%^^A% can be~0pt. +% Здесь \verb+[l]+ сообщает, что слева не дополнительной отбивки слева. +% Можно использовать \verb+[r]+ и~\verb+[lr]+ аналогично. +% В~этом случае вы должны не забыть задать ширину колонки, которую можно +% задать как~0pt. +% \endgroup +% +%^^A% The addition for the sample with |\slashbox| command. This example demonstrates +%^^A% that you may combine the \texttt{makecell} commands and |\backslashbox|. +% Небольшое дополнение к~файлу-образцу. Даный пример показывает, что возможно +% использование команд \texttt{thead} (или \texttt{makecell}), а~также +% команд-настроек выключки и~шрифта вместе с~|\backslashbox|. +% +%\begin{table}[H]% +%\begin{verbatim} +%\begin{tabular}{|l||*{5}{c|}}\hline +%\theadset\theadfont\backslashbox{Room}{Date} +%&\makebox[3em]{\thead{5/31}}&\makebox[3em]{\thead{6/1}}&\makebox[3em]{\thead{6/2}} +%&\makebox[3em]{6/3}&\makebox[3em]{\thead{6/4}}\\\hline\hline +%Meeting Room &&&&&\\\hline +%Auditorium &&&&&\\\hline +%Seminar Room &&&&&\\\hline +%\end{tabular} +%\end{verbatim}% +% +% \noindent +% \begin{tabular}{|l||*{5}{c|}}\hline +%\theadset\theadfont\backslashbox{Room}{Date} +%&\makebox[3em]{\thead{5/31}}&\makebox[3em]{\thead{6/1}}&\makebox[3em]{\thead{6/2}} +%&\makebox[3em]{6/3}&\makebox[3em]{\thead{6/4}}\\\hline\hline +% Meeting Room &&&&&\\\hline +% Auditorium &&&&&\\\hline +% Seminar Room &&&&&\\\hline +% \end{tabular} +%\end{table}% +% +%\begin{table}[H] +%\begin{verbatim} +%\begin{tabular}{|l||*{4}{c|}}\hline +%\theadset\backslashbox[48mm]{Room}{Date} +%&\makebox[3em]{\thead{5/31}}&\makebox[3em]{\thead{6/1}}&\makebox[3em]{\thead{6/2}} +%&\makebox[3em]{\thead{6/3}}\\\hline\hline +%Room With a Long Name &&&&\\\hline +%Auditorium &&&&\\\hline +%Seminar Room &&&&\\\hline +%\end{tabular} +%\end{verbatim}% +% +% \noindent +% \begin{tabular}{|l||*{4}{c|}}\hline +% \theadset\backslashbox[48mm]{Room}{Date} +% &\makebox[3em]{\thead{5/31}}&\makebox[3em]{\thead{6/1}}&\makebox[3em]{\thead{6/2}} +% &\makebox[3em]{\thead{6/3}}\\\hline\hline +% Room With a Long Name &&&&\\\hline +% Auditorium &&&&\\\hline +% Seminar Room &&&&\\\hline +% \end{tabular} +%\end{table}% +% % \clearpage %^^A% \section{Thick \cmd{\hline} and \cmd{\cline}} -% \section{Команды \cmd{\hline} и~\cmd{\cline} заданной толщины} +% \section{Команды \texorpdfstring{\cmd{\hline}}{hline} и~\texorpdfstring{\cmd{\cline}}{cline} заданной толщины} % %^^A% For horizontal rules in tabular there were added two commands %^^A% \cmd{\Xhline} and \cmd{\Xcline} diff --git a/Master/texmf-dist/doc/latex/makecell/makecell.pdf b/Master/texmf-dist/doc/latex/makecell/makecell.pdf Binary files differindex 1458d844899..f05e77f5b29 100644 --- a/Master/texmf-dist/doc/latex/makecell/makecell.pdf +++ b/Master/texmf-dist/doc/latex/makecell/makecell.pdf diff --git a/Master/texmf-dist/source/latex/makecell/makecell.dtx b/Master/texmf-dist/source/latex/makecell/makecell.dtx index 75b094c8198..c0988087b49 100644 --- a/Master/texmf-dist/source/latex/makecell/makecell.dtx +++ b/Master/texmf-dist/source/latex/makecell/makecell.dtx @@ -16,7 +16,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{makecell} %<*package> - [2008/01/12 V0.1e Managing of Tab Column Heads and Cells] + [2009/08/03 V0.1e Managing of Tab Column Heads and Cells] %</package> % %<*batchfile> @@ -34,22 +34,14 @@ % %<*driver> \documentclass{ltxdoc} - -\usepackage{ifpdf} -\ifpdf - \usepackage{mathptmx,courier} - \usepackage[scaled=0.90]{helvet} - \addtolength\marginparwidth{15pt} -\fi - -\usepackage{makecell} \IfFileExists{rotating.sty}{\usepackage{rotating}}{} \IfFileExists{footmisc.sty}{\usepackage[perpage,bottom]{footmisc}}{} \IfFileExists{multirow.sty}{\usepackage{multirow}}{} \IfFileExists{hyperref.sty}{\usepackage{hyperref}}{} \IfFileExists{hypcap.sty}{\usepackage{hypcap}}{} +\usepackage{makecell} \IfFileExists{caption.sty} - {\usepackage[font=small,labelfont=bf,labelsep=period]{caption} + {\usepackage[font=small,labelfont=bf,labelsep=period]{caption}[2004/11/28] \IfFileExists{floatrow.sty} {\usepackage[font=small,style=plaintop,captionskip=5pt]{floatrow}} {}}{} @@ -57,6 +49,8 @@ \@ifundefined{ttabbox}{\let\ttabbox\relax}{} \makeatother \usepackage{tabularx} +\usepackage{slashbox} +\usepackage{hhline} \EnableCrossrefs \CodelineIndex \RecordChanges @@ -66,11 +60,11 @@ \clubpenalty10000 \makeatother \providecommand*{\file}[1]{\texttt{#1}} -\providecommand*{\pkg}[1]{\textsf{#1}} +\providecommand*{\package}[1]{\textsf{#1}} \providecommand*{\cls}[1]{\textsf{#1}} \providecommand*{\env}[1]{\texttt{#1}} -\OnlyDescription +%\OnlyDescription \begin{document} \DocInput{makecell.dtx} \PrintChanges @@ -78,7 +72,7 @@ %</driver> % \fi % -% \CheckSum{1245} +% \CheckSum{1407} % % \GetFileInfo{makecell.dtx} % @@ -99,17 +93,21 @@ % 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. +% There are also command |\makecellbox| command and |mcellbox| environment +% usage of tabular cells inside text. % % Package also offers: \quad 1)\nobreak\enskip macro |\makegapedcells|, % which 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 \pkg{array} package. +% \package{tabls} package, but uses code of \package{array} package. (Macro +% |\makegapedcells| redefines macro |\@classz| from \package{array} package. % Macro |\nomakegapedcells| cancels this redefinition.); % \quad 2)\nobreak\enskip macros |\multirowhead| and |\multirowcell|, -% which use |\multirow| macro from \pkg{multirow} package; +% which use |\multirow| macro from \package{multirow} package; % \quad 3)\nobreak\enskip numbered rows |\nline| or skipping cells |\eline| -% in tabulars; -% \quad 4)\nobreak\enskip diagonally divided cells (|\diaghead|); +% in tabulars; also are the skipping rows command |\erows| and +% repeated rows command |\Xrows|; +% \quad 4)\nobreak\enskip diagonally divided cells (|\diaghead|) +% plus citation of sample file of \package{slashbox} package, which does the same; % \quad 5)\nobreak\enskip |\hline| and |\cline| with defined thickness: % |\Xhline| and |\Xcline| consequently. % \smallskip @@ -136,7 +134,7 @@ % 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 +% |{p{3cm}}|. Since this package loads \package{array} package, you may % use such alignment settings like |{>{\parindent1cm}p{3cm}}|. %\begin{verbatim} %\begin{tabular}{|c|c|} @@ -370,7 +368,7 @@ % \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 +% (re)defined by \package{amsmath} package. Optional argument sets change of % height only (\texttt{t}) or depth only~(\texttt{b}). Mandatory argument % includes text. % \begin{quote} @@ -446,7 +444,7 @@ % 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}, +% \package{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 @@ -457,7 +455,7 @@ % 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. +% \package{tabls} package: to get necessary vertical spacing around cells. % % \DescribeMacro{\setcellgapes} % Sets the parameters for vertical spaces: @@ -477,7 +475,7 @@ % first~one. % % The \cmd{\makegapedcells} macro temporarily redefines macro -% |\@classz| of \pkg{array} package, so use this mechanism carefully. +% |\@classz| of \package{array} package, so use this mechanism carefully. % Load |\makegapedcells| inside group or inside environment % (see table~\ref{tab:gaped}): %\begin{verbatim} @@ -520,16 +518,16 @@ % \section{Multirow Table Heads and Cells} % % The next examples show usage of macros which use |\multirow| command from -% \pkg{multirow} package.\nopagebreak +% \package{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 +% \oarg{njot} is mainly used if you've used \package{bigstrut} package: it makes % additional tuning of vertical position (see comments in -% \pkg{multirow} package); +% \package{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 @@ -741,7 +739,7 @@ % \end{tabular} %\end{verbatim} % -% \begin{table}[hbt] +% \begin{table}[H] % \ttabbox % {\caption{Examples of filling of cells}\label{tab:elines}}% % {\begin{tabular}{|*{6}{c|}} @@ -754,7 +752,64 @@ % \end{tabular}} %\end{table} % -% \clearpage +% Two ``lazy'' commands: for empty table rows +% (|\erows|) and for rows with repeated text (|\Xrows|) were added in the version V0.1e. +% +%\DeleteShortVerb{\|} +%\begin{verbatim} +% \begin{tabular}{|*{4}{c|}} +% \hline +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hline +% \erows{4}{8} +% \end{tabular}\quad +% \begin{tabular}{||c||c||c||c||} +% \hhline{|t:=:t:=:t:=:t:=:t|} +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hhline{|:=::=::=::=:|} +% \erows[\\ \hhline{|:=::=::=::=:|}]{4}{8} +% \eline{4}\\ \hhline{|b:=:b:=:b:=:b:=:b|} +% \end{tabular}\quad +% \begin{tabular}{|*{4}{c|}} +% \hline +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hline +% \Xrows{\refstepcounter{enumi}\arabic{enumi}.\eline{3}\\ \hline}{8} +% \end{tabular} +%\end{verbatim} +% +% \begin{table}[hbt]\extrarowheight1pt +% \ttabbox[\hsize] +% {\caption{Examples of filling of cells}\label{tab:elines}}% +% {\begin{tabular}{|*{4}{c|}} +% \hline +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hline +% \erows{4}{8} +% \end{tabular}\par\bigskip +% \begin{tabular}{||c||c||c||c||} +% \hhline{|t:*3{=:t:}=:t|} +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hhline{|:*3{=::}=:|} +% \erows[\\ \hhline{|:*3{=::}=:|}]{4}{7} +% \eline{4}\\ +% \hhline{|b:*3{=:b:}=:b|} +% \end{tabular}\par\bigskip +% \begin{tabular}{|*{4}{c|}} +% \hline +% \thead{No}&\thead{First Data}&\thead{Second Data}&\thead{Third Data} \\ +% \hline +% \Xrows{\refstepcounter{enumi}\arabic{enumi}.\eline{4}\\ \hline}{8} +% \end{tabular}} +%\end{table} +%\MakeShortVerb{\|} +% +% \section{Cells (One-Column Tabulars) in the Text} +% +% If the |\makecell| command appears in the text (outside outer tabular environment) +% it could create wrong layout. The |\makecellbox| command +% and |mcellbox| environment are created for one-column tabulars in the text. +% % \section{Diagonally Divided Cell} % % This variant of head's positioning is not too popular nowadays, but in @@ -869,8 +924,166 @@ % is narrower then necessary % column ends of diagonal don't touch corners of cell. % +% \section{Comparison: Diagonally Divided Cell with the slashbox package} +% +% I didn't know about the \texttt{slashbox} package in time +% when the code for the diagonal cells was created. This package uses also picture +% |\line| mechanism, but calculates slopes automatically. It creates the +% |\backslash| direction of diagonal lines only. (The |\slash| direction seems to be +% not correct. Or direction depends to traditions of current publishing house?) +% +% Here is used citation of the sample file distributed with the \texttt{slashbox} package%^^A +% \footnote{by Koichi Yasuoka, May 27, 1993; minor modification by Toru Sato, May 31, 1993}. +% The verbatim of the table examples are added only in citation.\smallskip +% +% \begingroup\slshape +% The usage is pretty straightforward, such as +% +%\begin{table}[H]% +%\begin{verbatim} +%\begin{tabular}{|l||*{5}{c|}}\hline +%\backslashbox{Room}{Date} +%&\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2} +%&\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline +%Meeting Room &&&&&\\\hline +%Auditorium &&&&&\\\hline +%Seminar Room &&&&&\\\hline +%\end{tabular} +%\end{verbatim}% +% +% \noindent +% \begin{tabular}{|l||*{5}{c|}}\hline +% \backslashbox{Room}{Date} +% &\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2} +% &\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline +% Meeting Room &&&&&\\\hline +% Auditorium &&&&&\\\hline +% Seminar Room &&&&&\\\hline +% \end{tabular} +%\end{table}% +% +% You may include a newline (\verb+\\+) in `Room' and/or `Date'. +% Note that you will get spaces aside the slash line if there is a +% wider column in the same column of a different line. +% In such a case, you need to specify the width of the slashed column +% by saying +% +%\begin{table}[H]% +%\begin{verbatim} +%\begin{tabular}{|l||*{4}{c|}}\hline +%\backslashbox[48mm]{Room}{Date} +%&\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2} +%&\makebox[3em]{6/3}\\\hline\hline +%Room With a Long Name &&&&\\\hline +%Auditorium &&&&\\\hline +%Seminar Room &&&&\\\hline +%\end{tabular} +%\end{verbatim}% +% +% \noindent +% \begin{tabular}{|l||*{4}{c|}}\hline +% \backslashbox[48mm]{Room}{Date} +% &\makebox[3em]{5/31}&\makebox[3em]{6/1}&\makebox[3em]{6/2} +% &\makebox[3em]{6/3}\\\hline\hline +% Room With a Long Name &&&&\\\hline +% Auditorium &&&&\\\hline +% Seminar Room &&&&\\\hline +% \end{tabular} +%\end{table}% +% +% \bigskip +% The specified width is neglected if it is narrower than the natural +% width of the column. +% +% \verb+\(back)slashbox+ assumes by default that there is a blank space +% of width \verb+\tabcolsep+ on both sides of the column. +% Thus the slash line might exceeds the boundary when you use \verb+@{}+ +% etc. +% +% You can avoid it by specifying +% +%\begin{table}[H]% +%\begin{verbatim} +%\begin{tabular}{|@{\ $\bullet$\hspace*{3mm}}l||*{5}{c|}}\hline +%\multicolumn{1}{|@{}l||}{\backslashbox[0pt][l]{Room}{Date}} +%&\makebox[3em]{5/31}&\makebox[4em]{6/1}&\makebox[3em]{6/2} +%&\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline +%Meeting Room &&&&&\\\hline +%Auditorium &&&&&\\\hline +%Seminar Room &&&&&\\\hline +%\end{tabular} +%\end{verbatim}% +% +% \bigskip +% +% \noindent +% \begin{tabular}{|@{\ $\bullet$\hspace*{3mm}}l||*{5}{c|}}\hline +% \multicolumn{1}{|@{}l||}{\backslashbox[0pt][l]{Room}{Date}} +% &\makebox[3em]{5/31}&\makebox[4em]{6/1}&\makebox[3em]{6/2} +% &\makebox[3em]{6/3}&\makebox[3em]{6/4}\\\hline\hline +% Meeting Room &&&&&\\\hline +% Auditorium &&&&&\\\hline +% Seminar Room &&&&&\\\hline +% \end{tabular} +%\end{table}% +% +% Here \verb+[l]+ tells the command that there is no extra space on the +% left of this column. You can use \verb+[r]+ and \verb+[lr]+ likewise. +% You have to also specify the width of the column in this case, but it +% can be~0pt. +% \endgroup +% +% The addition for the sample with |\slashbox| command. This example demonstrates that you may combine +% the \texttt{makecell} commands and |\backslashbox|. +% +%\begin{table}[H]% +%\begin{verbatim} +%\begin{tabular}{|l||*{5}{c|}}\hline +%\theadset\theadfont\backslashbox{Room}{Date} +%&\makebox[3em]{\thead{5/31}}&\makebox[3em]{\thead{6/1}}&\makebox[3em]{\thead{6/2}} +%&\makebox[3em]{6/3}&\makebox[3em]{\thead{6/4}}\\\hline\hline +%Meeting Room &&&&&\\\hline +%Auditorium &&&&&\\\hline +%Seminar Room &&&&&\\\hline +%\end{tabular} +%\end{verbatim}% +% +% \noindent +% \begin{tabular}{|l||*{5}{c|}}\hline +%\theadset\theadfont\backslashbox{Room}{Date} +%&\makebox[3em]{\thead{5/31}}&\makebox[3em]{\thead{6/1}}&\makebox[3em]{\thead{6/2}} +%&\makebox[3em]{6/3}&\makebox[3em]{\thead{6/4}}\\\hline\hline +% Meeting Room &&&&&\\\hline +% Auditorium &&&&&\\\hline +% Seminar Room &&&&&\\\hline +% \end{tabular} +%\end{table}% +% +%\begin{table}[H]% +%\begin{verbatim} +%\begin{tabular}{|l||*{4}{c|}}\hline +%\theadset\backslashbox[48mm]{Room}{Date} +%&\makebox[3em]{\thead{5/31}}&\makebox[3em]{\thead{6/1}}&\makebox[3em]{\thead{6/2}} +%&\makebox[3em]{\thead{6/3}}\\\hline\hline +%Room With a Long Name &&&&\\\hline +%Auditorium &&&&\\\hline +%Seminar Room &&&&\\\hline +%\end{tabular} +%\end{verbatim}% +% +% \noindent +% \begin{tabular}{|l||*{4}{c|}}\hline +% \theadset\backslashbox[48mm]{Room}{Date} +% &\makebox[3em]{\thead{5/31}}&\makebox[3em]{\thead{6/1}}&\makebox[3em]{\thead{6/2}} +% &\makebox[3em]{\thead{6/3}}\\\hline\hline +% Room With a Long Name &&&&\\\hline +% Auditorium &&&&\\\hline +% Seminar Room &&&&\\\hline +% \end{tabular} +%\end{table}% +% % \clearpage -% \section{Thick \cmd{\hline} and \cmd{\cline}} +% \section{Thick Rules for the hline and cline Commands} % % For horizontal rules in tabular there were added two commands % \cmd{\Xhline} and \cmd{\Xcline} @@ -942,7 +1155,7 @@ % % \subsection{Multilined cells} % -% First goes request of \pkg{array} package. +% First goes request of \package{array} package. % \begin{macrocode} \RequirePackage{array} % \end{macrocode} @@ -996,7 +1209,7 @@ % \end{macro} % % \begin{macro}{\rotcell} -% The macro for rotated cell. If no \pkg{rotating} package loaded +% The macro for rotated cell. If no \package{rotating} package loaded % this macro works like |\makecell|. % \begin{macrocode} \newcommand\rotcell{\@ifundefined{turn}% @@ -1009,9 +1222,9 @@ % some additional justification settings) % \begin{macrocode} \@ifdefinable\@rotcell{} -\def\@rotcell[#1]#2{\makecell{\\[-.65\normalbaselineskip] +\def\@rotcell[#1]#2{\makecell*{\\[-.65\normalbaselineskip] \turn{\cellrotangle}\makecell[#1]{#2}\endturn}} -\newcommand\@@rotcell[1]{\makecell{\\[-.65\normalbaselineskip] +\newcommand\@@rotcell[1]{\makecell*{\\[-.65\normalbaselineskip] \turn{\cellrotangle}\makecell[c{>{\rightskip0explus \rotheadsize\hyphenpenalty0\pretolerance-1% \noindent\hskip\z@}p{\rotheadsize} @@ -1020,7 +1233,7 @@ % \end{macro} % % \begin{macro}{\rothead} -% The macro for rotated tabular column heads. If no \pkg{rotating} package +% The macro for rotated tabular column heads. If no \package{rotating} package % loaded this macro works like |\thead|. % \begin{macrocode} \newcommand\rothead{\@ifundefined{turn}% @@ -1046,7 +1259,7 @@ % \end{macro} % % \begin{macro}{\multirowcell} -% The macro for multirow cells. If no \pkg{multirow} package loaded +% The macro for multirow cells. If no \package{multirow} package loaded % this macro works like |\makecell|. % \begin{macrocode} \newcommand\multirowcell{\@ifundefined{multirow}% @@ -1065,7 +1278,7 @@ % \end{macro} % % \begin{macro}{\multirowthead} -% The macro for multirow column heads. If no \pkg{multirow} package loaded +% The macro for multirow column heads. If no \package{multirow} package loaded % this macro works like |\thead|. % \begin{macrocode} \newcommand\multirowthead{\@ifundefined{multirow}% @@ -1098,8 +1311,6 @@ % set |c|-argument as vertical or horizontal centering alignment if necessary. % For \texttt{l} and \texttt{r} alignments also redefined alignment % settings for |\makecell| (|\thead|) blocks. -% \changes{V0.1d}{2007/05/24}{The \cmd{\empty} command changed to \cmd{\relax} -% for usage inside \cmd{\@classz}} % \begin{macrocode} \newcommand\mcell@l{\def\mcell@ii{l}\let\mcell@c\mcell@ic \global\let\mcell@left\relax} @@ -1138,7 +1349,7 @@ \@ifdefinable\mcell@@@tabular{} \def\mcell@tabular[#1]#2{\mcell@@tabular#1\@nil{#2}} % \end{macrocode} -% The code for this macro borrowed from \pkg{caption} 3.x package (AS). +% The code for this macro borrowed from \package{caption} 3.x package (AS). % \begin{macrocode} \newcommand\mcell@ifinlist[2]{% \let\next\@secondoftwo @@ -1221,6 +1432,26 @@ % \end{macro} % \end{macro} % +% \begin{environment}{\mcellbox} +% \begin{macro}{\makecellbox} +% \begin{macrocode} +\@ifdefinable\mcell@start{}\@ifdefinable\mcell@stop{} +\newcommand\mcellbox[1][c]{% + \expandafter\mcell@setalign\cellalign\@nil + \expandafter\mcell@setalign#1\@nil + \expandafter\mcell@box\expandafter\mcell@i\mcell@ii\@nil} +\@ifdefinable\mcell@box{} +\def\mcell@box#1#2\@nil{% + \ifdim\parindent<\z@\leavevmode\else\noindent\fi + \ifmmode\def\mcell@start{$\array}\def\mcell@stop{\endarray$}\else + \def\mcell@start{\tabular}\def\mcell@stop{\endtabular}\fi + \hbox\bgroup\cellset\mcell@start[#1]{@{}#2@{}}}% +\def\endmcellbox {\mcell@stop\egroup} +\newcommand\makecellbox[2][c]{\begin{mcellbox}[#1]#2\end{mcellbox}} +% \end{macrocode} +% \end{macro} +% \end{environment} +% % \begin{macro}{\cellset} % \begin{macro}{\cellgape} % \begin{macro}{\cellalign} @@ -1286,10 +1517,11 @@ % % \begin{macro}{\gape} % \begin{macro}{\setcellgapes} -% The macro itself. It uses analogous to |\smash| macro from \pkg{amsmath} +% The macro itself. It uses analogous to |\smash| macro from \package{amsmath} % package. % \begin{macrocode} -\newcommand\gape{\@ifnextchar[\@gape{\@gape[tb]}} +\@ifdefinable\gape{} +\DeclareRobustCommand\gape{\@ifnextchar[\@gape{\@gape[tb]}} % \end{macrocode} % % The |\setcellgapes| defines settings used by |\makegapedcells| command. @@ -1349,7 +1581,8 @@ % \begin{macro}{\Gape} % The macros which put box with necessary parameters in text and math mode. % \begin{macrocode} -\newcommand\Gape{\@ifnextchar[\@Gape{\@Gape[\jot]}} +\@ifdefinable\Gape{} +\DeclareRobustCommand\Gape{\@ifnextchar[\@Gape{\@Gape[\jot]}} \@ifdefinable\@Gape{}\@ifdefinable\@@Gape{} \def\@Gape[#1]{\@ifnextchar[{\@@Gape[#1]}{\@@Gape[#1][#1]}} \def\@@Gape[#1][#2]{\def\depth{\dp\z@}\def\height{\ht\z@}% @@ -1380,7 +1613,7 @@ % \end{macro} % \end{macro} % -% \subsection{Modification of command from \pkg{array} package} +% \subsection{Modification of command from \package{array} package} % % \begin{macro}{\makegapedcells} % \begin{macro}{\nomakegapedcells} @@ -1388,7 +1621,7 @@ % \begin{macrocode} \@ifdefinable\mcell@oriclassz{\let\mcell@oriclassz\@classz} % \end{macrocode} -% This macros redefine and restore the |\@classz| macro from \pkg{array} +% This macros redefine and restore the |\@classz| macro from \package{array} % package. % \begin{macrocode} \newcommand\makegapedcells{\let\@classz\mcell@classz} @@ -1406,7 +1639,7 @@ % \end{macro} % % \begin{macro}{\mcell@classz} -% Redefined |\@classz| macro from \pkg{array} package. +% Redefined |\@classz| macro from \package{array} package. % \begin{macrocode} \newcommand\mcell@classz{\@classx \@tempcnta \count@ @@ -1436,7 +1669,8 @@ % \begin{macro}{\eline} % The row of empty cells. % \begin{macrocode} -\newcommand\eline[1]{\count@ #1% +\@ifdefinable\eline{} +\DeclareRobustCommand\eline[1]{\@temptokena{}\count@ #1% \advance\count@\m@ne \loop \@temptokena\expandafter{\the\@temptokena&}% \advance\count@\m@ne \ifnum\count@>\z@\repeat @@ -1444,15 +1678,42 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\erows} +% \begin{macro}{\Xrows} +% Lazy macros for filling few rows. +% \begin{macrocode} +%\newtoks\@temptokenb\newtoks\@temptokenc +%\newcommand\erows[3][\\ \hline]{\relax\@temptokenb{}\@temptokenc{}\@tempcnta#3\relax +% \count@#2\advance\count@\m@ne\loop\showthe\@temptokenc +% \@temptokenc\expandafter{\the\@temptokenc&}% +% \advance\count@\m@ne \ifnum\count@>\z@\repeat +% \loop +% \global\@temptokenb\expandafter{\the\expandafter\@temptokenb\expandafter\the\@temptokenc#1}% +% \advance\@tempcnta\m@ne \ifnum\@tempcnta>\z@\repeat +% \the\@temptokenb\showthe\@temptokenb} +\newcommand\erows[3][\\ \hline]{\@temptokena{}\count@ #3% + \loop \@temptokena\expandafter{\the\@temptokena\eline{#2}#1}% + \advance\count@\m@ne \ifnum\count@>\z@\repeat + \the\@temptokena} +\newcommand\Xrows[2]{\@temptokena{}\count@ #2% + \loop \@temptokena\expandafter{\the\@temptokena#1}% + \advance\count@\m@ne \ifnum\count@>\z@\repeat + \the\@temptokena} +% \end{macrocode} +% \end{macro} +% \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} \newcounter{nlinenum} -\newcommand\rnline{\gdef +\@ifdefinable\rnline{} +\DeclareRobustCommand\rnline{\gdef \TeXr@rus{\let\@Alph\@Asbuk\let\@alph\@asbuk}\@nline} -\newcommand\nline{\gdef\TeXr@rus{}\@nline} +\@ifdefinable\nline{} +\DeclareRobustCommand\nline{\gdef\TeXr@rus{}\@nline} \newcommand\@nline{\@ifnextchar[%] {\@@nline}{\@@nline[1]}} \@ifdefinable\@@nline{} @@ -1475,7 +1736,7 @@ % \end{macro} % \end{macro} % -% [Borrowed code stuff and explanation from \pkg{enumerate}/\pkg{paralist} +% [Borrowed code stuff and explanation from \package{enumerate}/\package{paralist} % packages just with changes of command names.] % % Internal token register used to build up the label command from the @@ -1693,7 +1954,7 @@ % % \begin{macro}{\Xhline} % The commands for |\hline| and |\cline| with necessary thickness. -% \changes{0.0e}{2008/01/12}{The \cmd{\Xhline} adds support for long tables.} +% Added code for the |longtable| environment. % \begin{macrocode} \newcommand\Xhline[1]{\noalign{\ifnum0=`}\fi\arrayrulewidth#1% \ifx\hline\LT@hline\let\@xhline\LT@@hline\fi diff --git a/Master/texmf-dist/tex/latex/makecell/makecell.sty b/Master/texmf-dist/tex/latex/makecell/makecell.sty index e1853377110..1737fe96839 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} - [2008/01/12 V0.1e Managing of Tab Column Heads and Cells] + [2009/08/03 V0.1e Managing of Tab Column Heads and Cells] \RequirePackage{array} \newcommand\makecell{\@ifstar{\let\tabg@pe\gape\makecell@}% {\let\tabg@pe\cellgape\makecell@}} @@ -43,9 +43,9 @@ \let\tabg@pe\empty\let\t@bset\cellset\makecell@} {\@ifnextchar[{\@rotcell}{\@@rotcell}}} \@ifdefinable\@rotcell{} -\def\@rotcell[#1]#2{\makecell{\\[-.65\normalbaselineskip] +\def\@rotcell[#1]#2{\makecell*{\\[-.65\normalbaselineskip] \turn{\cellrotangle}\makecell[#1]{#2}\endturn}} -\newcommand\@@rotcell[1]{\makecell{\\[-.65\normalbaselineskip] +\newcommand\@@rotcell[1]{\makecell*{\\[-.65\normalbaselineskip] \turn{\cellrotangle}\makecell[c{>{\rightskip0explus \rotheadsize\hyphenpenalty0\pretolerance-1% \noindent\hskip\z@}p{\rotheadsize} @@ -135,6 +135,19 @@ \mcell@multirow\mcell@nrows*[\mcell@fixup]{\tabg@pe {\hbox{\t@bset\tabular[#1]{@{}#2@{}}#3\endtabular}}}% \fi\mcell@right\null} +\@ifdefinable\mcell@start{}\@ifdefinable\mcell@stop{} +\newcommand\mcellbox[1][c]{% + \expandafter\mcell@setalign\cellalign\@nil + \expandafter\mcell@setalign#1\@nil + \expandafter\mcell@box\expandafter\mcell@i\mcell@ii\@nil} +\@ifdefinable\mcell@box{} +\def\mcell@box#1#2\@nil{% + \ifdim\parindent<\z@\leavevmode\else\noindent\fi + \ifmmode\def\mcell@start{$\array}\def\mcell@stop{\endarray$}\else + \def\mcell@start{\tabular}\def\mcell@stop{\endtabular}\fi + \hbox\bgroup\cellset\mcell@start[#1]{@{}#2@{}}}% +\def\endmcellbox {\mcell@stop\egroup} +\newcommand\makecellbox[2][c]{\begin{mcellbox}[#1]#2\end{mcellbox}} \newcommand\cellset{\def\arraystretch{1}\extrarowheight\z@ \nomakegapedcells} \newcommand\cellgape{} @@ -145,7 +158,8 @@ \newcommand\theadgape{\gape} \newcommand\rotheadgape{} \newcommand\theadalign{cc} -\newcommand\gape{\@ifnextchar[\@gape{\@gape[tb]}} +\@ifdefinable\gape{} +\DeclareRobustCommand\gape{\@ifnextchar[\@gape{\@gape[tb]}} \newcommand\setcellgapes{\@ifnextchar[%] {\mcell@setgapes{MB}}{\mcell@setgapes{MB}[tb]}} \@ifdefinable\@setcellgapes{} @@ -169,7 +183,8 @@ \hbox{\color@begingroup#1\color@endgroup}\mcell@mb@\z@\mcell@mbjot\box\z@} \newcommand\mathg@pe[2]{\setbox\z@ \hbox{$\m@th#1{#2}$}\mcell@mb@\z@\mcell@mbjot\box\z@} -\newcommand\Gape{\@ifnextchar[\@Gape{\@Gape[\jot]}} +\@ifdefinable\Gape{} +\DeclareRobustCommand\Gape{\@ifnextchar[\@Gape{\@Gape[\jot]}} \@ifdefinable\@Gape{}\@ifdefinable\@@Gape{} \def\@Gape[#1]{\@ifnextchar[{\@@Gape[#1]}{\@@Gape[#1][#1]}} \def\@@Gape[#1][#2]{\def\depth{\dp\z@}\def\height{\ht\z@}% @@ -205,15 +220,26 @@ \fi \global\let\mcell@left\relax\global\let\mcell@right\relax }\prepnext@tok} -\newcommand\eline[1]{\count@ #1% +\@ifdefinable\eline{} +\DeclareRobustCommand\eline[1]{\@temptokena{}\count@ #1% \advance\count@\m@ne \loop \@temptokena\expandafter{\the\@temptokena&}% \advance\count@\m@ne \ifnum\count@>\z@\repeat \the\@temptokena\ignorespaces} +\newcommand\erows[3][\\ \hline]{\@temptokena{}\count@ #3% + \loop \@temptokena\expandafter{\the\@temptokena\eline{#2}#1}% + \advance\count@\m@ne \ifnum\count@>\z@\repeat + \the\@temptokena} +\newcommand\Xrows[2]{\@temptokena{}\count@ #2% + \loop \@temptokena\expandafter{\the\@temptokena#1}% + \advance\count@\m@ne \ifnum\count@>\z@\repeat + \the\@temptokena} \newcounter{nlinenum} -\newcommand\rnline{\gdef +\@ifdefinable\rnline{} +\DeclareRobustCommand\rnline{\gdef \TeXr@rus{\let\@Alph\@Asbuk\let\@alph\@asbuk}\@nline} -\newcommand\nline{\gdef\TeXr@rus{}\@nline} +\@ifdefinable\nline{} +\DeclareRobustCommand\nline{\gdef\TeXr@rus{}\@nline} \newcommand\@nline{\@ifnextchar[%] {\@@nline}{\@@nline[1]}} \@ifdefinable\@@nline{} |