%% %% 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} [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@}} \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{\makecell*{\\[-.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\relax} \newcommand\mcell@r{\def\mcell@ii{r}\let\mcell@c\mcell@ic \global\let\mcell@right\relax} \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\relax\let\mcell@right\relax}% \mcell@ifinlist{#2}{l,r,t,b,c,}{\@nameuse{mcell@#2}}% {\def\mcell@ii{#2}\let\mcell@c\mcell@ic \let\mcell@left\relax\let\mcell@right\relax}% \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} \@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{} \newcommand\cellalign{cc} \newcommand\cellrotangle{90} \newcommand\theadfont{\footnotesize} \newcommand\theadset{} \newcommand\theadgape{\gape} \newcommand\rotheadgape{} \newcommand\theadalign{cc} \@ifdefinable\gape{} \DeclareRobustCommand\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}% \@namedef{mcell@#1negjot}{-#3}\@namedef{mcell@#1negtb}{#2}} \newcommand\negjot[1]{{\jot\mcell@MBnegjot\gape[mcell@MBnegtb]{#1}}} \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@} \@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@}% \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} \@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} \@ifdefinable\rnline{} \DeclareRobustCommand\rnline{\gdef \TeXr@rus{\let\@Alph\@Asbuk\let\@alph\@asbuk}\@nline} \@ifdefinable\nline{} \DeclareRobustCommand\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 \def\TeXr@label{\TeXr@label@{nlinenum}}% \expandafter\TeXr@loop\@gobble{}#1\@@@ \xdef\Num{\the\TeXr@lab}% \c@nlinenum#2\relax% \expandafter\@temptokena\expandafter{\Num \global\advance\c@nlinenum\@ne}% \advance\count@\m@ne \loop\@temptokena\expandafter{\the\@temptokena& \Num \global\advance\c@nlinenum\@ne}% \advance\count@\m@ne \ifnum\count@>\z@ \repeat \the\@temptokena\ignorespaces} \newtoks\TeXr@lab \def\TeXr@qmark{?} \def\TeXr@label@#1#2#3{% \edef\TeXr@the{\noexpand#2{#1}}% \TeXr@lab\expandafter {\the\TeXr@lab\TeXr@rus\csname the#1\endcsname}% \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{} \newcommand\diaghead{\@ifnextchar({\mcell@diaghead}{\mcell@diagheads}} \@ifdefinable\mcell@diaghead{} \def\mcell@diaghead(#1){\def\celldiagratio{(#1)}\mcell@diagheads} \newcommand\celldiagratio{(5,-2)} \newcommand\mcell@diagheads[3]{\hbox\bgroup\expandafter \mcell@getcelldiagratios\celldiagratio\relax \@tempswafalse \ifnum\mcell@Hratio<\z@\count@-\mcell@Hratio\relax \edef\mcell@Hratio{\the\count@}\relax \ifnum\mcell@Vratio<\z@\count@-\mcell@Vratio\relax \edef\mcell@Vratio{\the\count@}\else\@tempswatrue \fi \else \ifnum\mcell@Vratio<\z@\count@-\mcell@Vratio\relax \edef\mcell@Vratio{\the\count@}\@tempswatrue\else \fi \fi \settowidth\@tempdima{#1}\advance\@tempdima2\tabcolsep \edef\mcell@diagH{\the\@tempdima}\divide\@tempdima\mcell@Hratio \@tempdima\mcell@Vratio\@tempdima\edef\mcell@diagV{\the\@tempdima}% \let\mcell@oriunitlength\unitlength\let\unitlength\relax \kern-\tabcolsep\kern-\@wholewidth \setbox\z@\hbox{\theadfont{\strut}}\@tempdima\dp\z@ \advance\@tempdima.8\p@%2\@wholewidth {\ifx\@classz\mcell@classz \setbox\z@\hbox{#1}\ht\z@\z@\dp\z@\z@ \mcell@MB@\z@\mcell@MBjot \global\dimen@\@tempdima\global\@tempdimb\@tempdimb \else\global\dimen@\z@\global\@tempdimb\z@\fi }% \advance\@tempdima\dimen@ \edef\mcell@diagVoffset{\the\@tempdima}% \@tempdima\mcell@diagV\advance\@tempdima-\mcell@diagVoffset \advance\@tempdima-\@tempdimb \edef\mcell@diagVcorr{\the\@tempdima}% \noindent\nomakegapedcells\hbox{\begin{tabular}{@{}c@{}}% \ifdim\jot<2\p@\jot2\p@\fi \if@tempswa \begin{picture}(\mcell@diagH,\mcell@diagVcorr)(\z@,\mcell@diagVoffset)% \put(\z@,\mcell@diagV){\makebox(\z@,\z@)[tl]% {\edef\tempa{(\mcell@Hratio,-\mcell@Vratio)}\expandafter \line\tempa{\mcell@diagH}}} \put(\tabcolsep,\jot)% {\makebox(\z@,\z@)[bl]{\theadfont \let\cellset\theadset\makecell[bl]{\strut#2}}} \@tempdima\mcell@diagH\advance\@tempdima-\tabcolsep \@tempdimb\mcell@diagV\advance\@tempdimb-\jot \put(\@tempdima,\@tempdimb)% {\makebox(\z@,\z@)[tr]{\theadfont \let\cellset\theadset\makecell[tr]{#3\strut}}} \end{picture}% \else \begin{picture}(\mcell@diagH,\mcell@diagVcorr)(\z@,\mcell@diagVoffset)% \put(\z@,\mcell@diagV){\makebox(\z@,\z@)[tl]% {\edef\tempa{(\mcell@Hratio,\mcell@Vratio)}\expandafter \line\tempa{\mcell@diagH}}} \@tempdima\mcell@diagV\advance\@tempdima-\jot \put(\tabcolsep,\@tempdima)% {\makebox(\z@,\z@)[tl]{\theadfont \let\cellset\theadset\makecell[tl]{\strut#3}}} \@tempdima\mcell@diagH\advance\@tempdima-\tabcolsep \put(\@tempdima,\jot)% {\makebox(\z@,\z@)[br]% {\theadfont \let\cellset\theadset{\makecell[br]{#2\strut}}}} \end{picture}% \fi \end{tabular}% \kern-\tabcolsep\kern-\@wholewidth }\let\unitlength\mcell@oriunitlength\egroup\par \ifvmode\strut \vspace*{-\normalbaselineskip}\vspace*{-\normallineskip} \fi } \@ifdefinable\mcell@getcelldiagratios{} \def\mcell@getcelldiagratios(#1,#2){\def\mcell@Hratio{#1}\def\mcell@Vratio{#2}} \newcommand\Xhline[1]{\noalign{\ifnum0=`}\fi\arrayrulewidth#1% \ifx\hline\LT@hline\let\@xhline\LT@@hline\fi \hrule\@height\arrayrulewidth\futurelet\reserved@a\@xhline} \def\Xcline#1#2{\@Xcline#1;#2\@nil} \def\@Xcline#1-#2;#3\@nil{% \omit \@multicnt#1% \advance\@multispan\m@ne \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi \@multicnt#2% \advance\@multicnt-#1% \advance\@multispan\@ne \leaders\hrule\@height#3\hfill \cr \noalign{\vskip-#3}} \endinput %% %% End of file `makecell.sty'.