summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-12 23:58:30 +0000
committerKarl Berry <karl@freefriends.org>2006-01-12 23:58:30 +0000
commit90612109a8e91c754cfa5ab7b20630165c465436 (patch)
treeff2088f04b5dae56153c94698aa2f3e30f1ef85a /Master
parent3f394c323e850149a15a6cd035449161e2b73292 (diff)
makecell
git-svn-id: svn://tug.org/texlive/trunk@1062 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/tex/latex/makecell/makecell.sty208
1 files changed, 208 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/makecell/makecell.sty b/Master/texmf-dist/tex/latex/makecell/makecell.sty
new file mode 100644
index 00000000000..f50853755dd
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/makecell/makecell.sty
@@ -0,0 +1,208 @@
+%%
+%% This is file `makecell.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% makecell.dtx (with options: `package')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from makecell.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file makecell.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{makecell}
+ [2005/07/02 v0.1a Multilined Cells and Tabular Heads]
+\RequirePackage{array}
+\newcommand\makecell{\@ifstar{\let\tabg@pe\gape\makecell@}%
+ {\let\tabg@pe\cellgape\makecell@}}
+\newcommand\makecell@{\def\t@bset{\cellset}%
+ \let\mcell@align\cellalign
+ \@ifnextchar[\mcell@tabular
+ {\expandafter\mcell@@tabular\cellalign\@nil}}
+\newcommand\thead{\@ifstar{\let\tabg@pe\gape\thead@}%
+ {\let\tabg@pe\theadgape\thead@}}
+\newcommand\thead@{\def\t@bset{\cellset\theadfont\theadset}%
+ \let\mcell@align\theadalign
+ \@ifnextchar[\mcell@tabular
+ {\expandafter\mcell@@tabular\theadalign\@nil}}
+\@ifdefinable\rotheadsize{\newdimen\rotheadsize}
+\newcommand\rotcell{\@ifundefined{turn}%
+ {\PackageWarning{makecell}%
+ {\string\rotcell\space needs rotating package}%
+ \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}
+\newcommand\@@rotcell[1]{\makecell{\\[-.65\normalbaselineskip]
+ \turn{\cellrotangle}\makecell[c{>{\rightskip0explus
+ \rotheadsize\hyphenpenalty0\pretolerance-1%
+ \noindent\hskip\z@}p{\rotheadsize}
+ }]{#1}\endturn}}
+\newcommand\rothead{\@ifundefined{turn}%
+ {\PackageWarning{makecell}{\string\rothead\space
+ needs rotating package}%
+ \let\tabg@pe\theadgape
+ \def\t@bset{\cellset\theadfont\theadset}\thead@}%
+ {\let\theadgape\rotheadgape
+ \@ifnextchar[{\@rothead}{\@@rothead}}}
+\@ifdefinable\@rothead{}
+\def\@rothead[#1]#2{\thead{\\[-.65\normalbaselineskip]
+ \turn{\cellrotangle}\thead[#1]{#2@{}}\endturn}}
+\newcommand\@@rothead[1]{\thead{\\[-.65\normalbaselineskip]
+ \turn{\cellrotangle}\thead[c{>{\rightskip0explus
+ \rotheadsize\hyphenpenalty0\pretolerance-1%
+ \noindent\hskip\z@}p{\rotheadsize}
+ @{}}]{#1}\endturn}}
+\newcommand\multirowcell{\@ifundefined{multirow}%
+ {\PackageWarning{makecell}{\string\multirowcell\space
+ needs multirow package}}%
+ {\let\mcell@multirow\multirow}\mcell@mrowcell@}
+\newcommand\mcell@mrowcell@[1]{\@ifnextchar
+ [{\mcell@mrowcell@@{#1}}{\mcell@mrowcell@@{#1}[0pt]}}
+\@ifdefinable\mcell@mrowcell@@{}
+\def\mcell@mrowcell@@#1[#2]{\edef\mcell@nrows{#1}\edef\mcell@fixup{#2}%
+ \let\tabg@pe\cellgape\makecell@}
+\newcommand\multirowthead{\@ifundefined{multirow}%
+ {\PackageWarning{makecell}{\string\multirowthead\space
+ needs multirow package}}%
+ {\let\mcell@multirow\multirow}\mcell@mrowhead@}
+\newcommand\mcell@mrowhead@[1]{\@ifnextchar
+ [{\mcell@mrowhead@@{#1}}{\mcell@mrowhead@@{#1}[0pt]}}
+\@ifdefinable\mcell@mrowhead@@{}
+\def\mcell@mrowhead@@#1[#2]{\edef\mcell@nrows{#1}\edef\mcell@fixup{#2}%
+ \let\tabg@pe\theadgape\thead@}
+\@ifdefinable\mcell@multirow{}
+\def\mcell@multirow#1#2[#3]{}%
+\newcommand\mcell@l{\def\mcell@ii{l}\let\mcell@c\mcell@ic
+ \global\let\mcell@left\empty}
+\newcommand\mcell@r{\def\mcell@ii{r}\let\mcell@c\mcell@ic
+ \global\let\mcell@right\empty}
+\newcommand\mcell@t{\def\mcell@i{t}\let\mcell@c\mcell@iic}
+\newcommand\mcell@b{\def\mcell@i{b}\let\mcell@c\mcell@iic}
+\newcommand\mcell@{}
+\newcommand\mcell@c{\def\mcell@ii{c}}
+\newcommand\mcell@ic{\def\mcell@i{c}}
+\newcommand\mcell@iic{\def\mcell@ii{c}}
+\newcommand\mcell@i{c}
+\newcommand\mcell@ii{c}
+\@ifdefinable\mcell@left{\let\mcell@left\hfill}
+\@ifdefinable\mcell@right{\let\mcell@right\hfill}
+\@ifdefinable\mcell@tabular{}\@ifdefinable\mcell@@tabular{}
+\@ifdefinable\mcell@@@tabular{}
+\def\mcell@tabular[#1]#2{\mcell@@tabular#1\@nil{#2}}
+\newcommand\mcell@ifinlist[2]{%
+ \let\next\@secondoftwo
+ \edef\mcell@tmp{#1}%
+ \@for\mcell@Tmp:={#2}\do{%
+ \ifx\mcell@tmp\mcell@Tmp
+ \let\next\@firstoftwo
+ \fi}\next}
+\def\mcell@@tabular#1#2\@nil#3{%
+ \expandafter\mcell@setalign\mcell@align\@nil
+ \mcell@setalign{#1}{#2}\@nil
+ \expandafter\mcell@@@tabular\expandafter\mcell@i\mcell@ii\@nil{#3}}
+\@ifdefinable\mcell@setalign{}
+\def\mcell@setalign#1#2\@nil{\def\@tempa{#1}\def\@tempc{c}%
+ \global\let\mcell@left\hfill\global\let\mcell@right\hfill
+ \def\mcell@c{\def\mcell@ii{c}}%
+ \mcell@ifinlist{#1}{l,r,t,b,c,}{\@nameuse{mcell@#1}}%
+ {\def\mcell@ii{#1}\let\mcell@c\mcell@ic
+ \let\mcell@left\empty\let\mcell@right\empty}%
+ \mcell@ifinlist{#2}{l,r,t,b,c,}{\@nameuse{mcell@#2}}%
+ {\def\mcell@ii{#2}\let\mcell@c\mcell@ic
+ \let\mcell@left\empty\let\mcell@right\empty}%
+ \ifx\@tempa\@tempc\mcell@c\fi
+}
+\def\mcell@@@tabular#1#2\@nil#3{%\mcell@mstyle
+ \ifdim\parindent<\z@\leavevmode\else\noindent\fi
+ \null\mcell@left
+ \ifmmode
+ \mcell@multirow\mcell@nrows*[\mcell@fixup]{\tabg@pe
+ {\hbox{\t@bset$\array[#1]{@{}#2@{}}#3\endarray$}}}%
+ \else
+ \mcell@multirow\mcell@nrows*[\mcell@fixup]{\tabg@pe
+ {\hbox{\t@bset\tabular[#1]{@{}#2@{}}#3\endtabular}}}%
+ \fi\mcell@right\null}
+\newcommand\cellset{\def\arraystretch{1}\extrarowheight\z@
+ \nomakegapedcells}
+\newcommand\cellgape{}
+\newcommand\cellalign{cc}
+\newcommand\cellrotangle{90}
+\newcommand\theadfont{\footnotesize}
+\newcommand\theadset{}
+\newcommand\theadgape{\gape}
+\newcommand\rotheadgape{}
+\newcommand\theadalign{cc}
+\newcommand\gape{\@ifnextchar[\@gape{\@gape[tb]}}
+\newcommand\setcellgapes{\@ifnextchar[%]
+ {\mcell@setgapes{MB}}{\mcell@setgapes{MB}[tb]}}
+\@ifdefinable\@setcellgapes{}
+\def\mcell@setgapes#1[#2]#3{\expandafter\let\csname
+ mcell@#1@\expandafter\endcsname\csname mcell@mb@#2\endcsname
+ \@namedef{mcell@#1jot}{#3}}
+\newcommand\mcell@mb@t[2]{\@tempdima\ht#1\advance\@tempdima#2%
+ \ht#1\@tempdima}
+\newcommand\mcell@mb@b[2]{\@tempdimb\dp#1\advance\@tempdimb#2%
+ \dp#1\@tempdimb}
+\newcommand\mcell@mb@tb[2]{\mcell@mb@t{#1}{#2}\mcell@mb@b{#1}{#2}}
+\@ifdefinable\@gape{}\@ifdefinable\@@gape{}
+\def\@gape[#1]{\mcell@setgapes{mb}[#1]{\jot}\@@gape}
+\def\@@gape{%
+ \ifmmode \expandafter\mathpalette\expandafter\mathg@pe
+ \else \expandafter\makeg@pe
+ \fi}
+\newcommand\makeg@pe[1]{\setbox\z@
+ \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{}\@ifdefinable\@@Gape{}
+\def\@Gape[#1]{\@ifnextchar[{\@@Gape[#1]}{\@@Gape[#1][#1]}}
+\def\@@Gape[#1][#2]{\def\depth{\dp\z@}\def\height{\ht\z@}%
+ \edef\mcell@mb@##1##2{%
+ \@tempdima\ht\z@\advance\@tempdima#1\ht\z@\@tempdima
+ \@tempdimb\dp\z@\advance\@tempdimb#2\dp\z@\@tempdimb}%
+ \@@gape}
+\newcommand\bottopstrut{\gape{\strut}}
+\newcommand\topstrut{\gape[t]{\strut}}
+\newcommand\botstrut{\gape[b]{\strut}}
+\@ifdefinable\mcell@oriclassz{\let\mcell@oriclassz\@classz}
+\newcommand\makegapedcells{\let\@classz\mcell@classz}
+\newcommand\nomakegapedcells{\let\@classz\mcell@oriclassz}
+\newcommand\mcell@agape[1]{\setbox\z@\hbox{#1}\mcell@MB@\z@\mcell@MBjot
+ \null\mcell@left\box\z@\mcell@right\null}
+\newcommand\mcell@classz{\@classx
+ \@tempcnta \count@
+ \prepnext@tok
+ \@addtopreamble{%\mcell@mstyle
+ \ifcase\@chnum
+ \hfil
+ \mcell@agape{\d@llarbegin\insert@column\d@llarend}\hfil \or
+ \hskip1sp
+ \mcell@agape{\d@llarbegin\insert@column\d@llarend}\hfil \or
+ \hfil\hskip1sp
+ \mcell@agape{\d@llarbegin \insert@column\d@llarend}\or
+ $\mcell@agape{\vcenter
+ \@startpbox{\@nextchar}\insert@column\@endpbox}$\or
+ \mcell@agape{\vtop
+ \@startpbox{\@nextchar}\insert@column\@endpbox}\or
+ \mcell@agape{\vbox
+ \@startpbox{\@nextchar}\insert@column\@endpbox}%
+ \fi
+ \global\let\mcell@left\relax\global\let\mcell@right\relax
+ }\prepnext@tok}
+\endinput
+%%
+%% End of file `makecell.sty'.