summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/makecell
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-08-03 21:24:50 +0000
committerKarl Berry <karl@freefriends.org>2009-08-03 21:24:50 +0000
commit2be1f5b6a176fa29368bc5ca8a19c16ef23742e4 (patch)
tree4773af76fe69641d33a6641865c05cc8fa48a905 /Master/texmf-dist/tex/latex/makecell
parent5a6870c92a91af362f2f511834a6094491774d46 (diff)
makecell 0.1e (3aug09)
git-svn-id: svn://tug.org/texlive/trunk@14523 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/makecell')
-rw-r--r--Master/texmf-dist/tex/latex/makecell/makecell.sty42
1 files changed, 34 insertions, 8 deletions
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{}