Fri, 11 May 2012 13:27:13 +0200
Changed markdown to Restructured text.
ulalume3@11 | 1 | %% |
ulalume3@11 | 2 | %% This is file `tabulary.sty', |
ulalume3@11 | 3 | %% generated with the docstrip utility. |
ulalume3@11 | 4 | %% |
ulalume3@11 | 5 | %% The original source files were: |
ulalume3@11 | 6 | %% |
ulalume3@11 | 7 | %% tabulary.dtx (with options: `package') |
ulalume3@11 | 8 | %% DRAFT VERSION |
ulalume3@11 | 9 | %% |
ulalume3@11 | 10 | %% File `tabulary.dtx'. |
ulalume3@11 | 11 | %% Copyright (C) 1995 1996 2003 David Carlisle |
ulalume3@11 | 12 | %% This file may be distributed under the terms of the LPPL. |
ulalume3@11 | 13 | %% See 00readme.txt for details. |
ulalume3@11 | 14 | %% |
ulalume3@11 | 15 | \NeedsTeXFormat{LaTeX2e} |
ulalume3@11 | 16 | \ProvidesPackage{tabulary} |
ulalume3@11 | 17 | [2007/10/02 v0.9 tabulary package (DPC)] |
ulalume3@11 | 18 | \RequirePackage{array} |
ulalume3@11 | 19 | \catcode`\Z=14 |
ulalume3@11 | 20 | \DeclareOption{debugshow}{\catcode`\Z=9\relax} |
ulalume3@11 | 21 | \ProcessOptions |
ulalume3@11 | 22 | \def\arraybackslash{\let\\=\@arraycr} |
ulalume3@11 | 23 | \def\@finalstrut#1{% |
ulalume3@11 | 24 | \unskip\ifhmode\nobreak\fi\vrule\@width\z@\@height\z@\@depth\dp#1} |
ulalume3@11 | 25 | \newcount\TY@count |
ulalume3@11 | 26 | \def\tabulary{% |
ulalume3@11 | 27 | \let\TY@final\tabular |
ulalume3@11 | 28 | \let\endTY@final\endtabular |
ulalume3@11 | 29 | \TY@tabular} |
ulalume3@11 | 30 | \def\TY@tabular#1{% |
ulalume3@11 | 31 | \edef\TY@{\@currenvir}% |
ulalume3@11 | 32 | {\ifnum0=`}\fi |
ulalume3@11 | 33 | \@ovxx\TY@linewidth |
ulalume3@11 | 34 | \@ovyy\TY@tablewidth |
ulalume3@11 | 35 | \count@\z@ |
ulalume3@11 | 36 | \@tempswatrue |
ulalume3@11 | 37 | \@whilesw\if@tempswa\fi{% |
ulalume3@11 | 38 | \advance\count@\@ne |
ulalume3@11 | 39 | \expandafter\ifx\csname TY@F\the\count@\endcsname\relax |
ulalume3@11 | 40 | \@tempswafalse |
ulalume3@11 | 41 | \else |
ulalume3@11 | 42 | \expandafter\let\csname TY@SF\the\count@\expandafter\endcsname |
ulalume3@11 | 43 | \csname TY@F\the\count@\endcsname |
ulalume3@11 | 44 | \global\expandafter\let\csname TY@F\the\count@\endcsname\relax |
ulalume3@11 | 45 | \expandafter\let\csname TY@S\the\count@\expandafter\endcsname |
ulalume3@11 | 46 | \csname TY@\the\count@\endcsname |
ulalume3@11 | 47 | \fi}% |
ulalume3@11 | 48 | \global\TY@count\@ne |
ulalume3@11 | 49 | \TY@width\xdef{0pt}% |
ulalume3@11 | 50 | \global\TY@tablewidth\z@ |
ulalume3@11 | 51 | \global\TY@linewidth#1\relax |
ulalume3@11 | 52 | Z\message{^^J^^JTable^^J% |
ulalume3@11 | 53 | Z Target Width: \the\TY@linewidth^^J% |
ulalume3@11 | 54 | Z \string\tabcolsep: \the\tabcolsep\space |
ulalume3@11 | 55 | Z \string\arrayrulewidth: \the\arrayrulewidth\space |
ulalume3@11 | 56 | Z \string\doublerulesep: \the\doublerulesep^^J% |
ulalume3@11 | 57 | Z \string\tymin: \the\tymin\space |
ulalume3@11 | 58 | Z \string\tymax: \the\tymax^^J}% |
ulalume3@11 | 59 | \let\@classz\TY@classz |
ulalume3@11 | 60 | \let\verb\TX@verb |
ulalume3@11 | 61 | \toks@{}\TY@get@body} |
ulalume3@11 | 62 | \let\TY@@mkpream\@mkpream |
ulalume3@11 | 63 | \def\TY@mkpream{% |
ulalume3@11 | 64 | \def\@addamp{% |
ulalume3@11 | 65 | \if@firstamp \@firstampfalse \else |
ulalume3@11 | 66 | \global\advance\TY@count\@ne |
ulalume3@11 | 67 | \edef\@preamble{\@preamble &}\fi |
ulalume3@11 | 68 | \TY@width\xdef{0pt}}% |
ulalume3@11 | 69 | \def\@acol{% |
ulalume3@11 | 70 | \TY@subwidth\col@sep |
ulalume3@11 | 71 | \@addtopreamble{\hskip\col@sep}}% |
ulalume3@11 | 72 | \let\@arrayrule\TY@arrayrule |
ulalume3@11 | 73 | \let\@classvi\TY@classvi |
ulalume3@11 | 74 | \def\@classv{\save@decl |
ulalume3@11 | 75 | \expandafter\NC@ecs\@nextchar\extracolsep{}\extracolsep\@@@ |
ulalume3@11 | 76 | \sbox\z@{\d@llarbegin\@nextchar\d@llarend}% |
ulalume3@11 | 77 | \TY@subwidth{\wd\z@}% |
ulalume3@11 | 78 | \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}% |
ulalume3@11 | 79 | \prepnext@tok}% |
ulalume3@11 | 80 | \global\let\@mkpream\TY@@mkpream |
ulalume3@11 | 81 | \TY@@mkpream} |
ulalume3@11 | 82 | \def\TY@arrayrule{% |
ulalume3@11 | 83 | \TY@subwidth\arrayrulewidth |
ulalume3@11 | 84 | \@addtopreamble \vline} |
ulalume3@11 | 85 | \def\TY@classvi{\ifcase \@lastchclass |
ulalume3@11 | 86 | \@acol \or |
ulalume3@11 | 87 | \TY@subwidth\doublerulesep |
ulalume3@11 | 88 | \@addtopreamble{\hskip \doublerulesep}\or |
ulalume3@11 | 89 | \@acol \or |
ulalume3@11 | 90 | \@classvii |
ulalume3@11 | 91 | \fi} |
ulalume3@11 | 92 | \def\TY@tab{% |
ulalume3@11 | 93 | \setbox\z@\hbox\bgroup |
ulalume3@11 | 94 | \let\[$\let\]$% |
ulalume3@11 | 95 | \let\equation$\let\endequation$% |
ulalume3@11 | 96 | \col@sep\tabcolsep |
ulalume3@11 | 97 | \let\d@llarbegin\begingroup\let\d@llarend\endgroup |
ulalume3@11 | 98 | \let\@mkpream\TY@mkpream |
ulalume3@11 | 99 | \def\multicolumn##1##2##3{\multispan##1\relax}% |
ulalume3@11 | 100 | \CT@start\TY@tabarray} |
ulalume3@11 | 101 | \def\TY@tabarray{\@ifnextchar[{\TY@array}{\@array[t]}} |
ulalume3@11 | 102 | \def\TY@array[#1]{\@array[t]} |
ulalume3@11 | 103 | \def\TY@width#1{% |
ulalume3@11 | 104 | \expandafter#1\csname TY@\the\TY@count\endcsname} |
ulalume3@11 | 105 | \def\TY@subwidth#1{% |
ulalume3@11 | 106 | \TY@width\dimen@ |
ulalume3@11 | 107 | \advance\dimen@-#1\relax |
ulalume3@11 | 108 | \TY@width\xdef{\the\dimen@}% |
ulalume3@11 | 109 | \global\advance\TY@linewidth-#1\relax} |
ulalume3@11 | 110 | \def\endtabulary{% |
ulalume3@11 | 111 | \gdef\@halignto{}% |
ulalume3@11 | 112 | \let\TY@footnote\footnote% |
ulalume3@11 | 113 | \def\footnote{}% prevent footnotes from doing anything |
ulalume3@11 | 114 | \expandafter\TY@tab\the\toks@ |
ulalume3@11 | 115 | \crcr\omit |
ulalume3@11 | 116 | {\xdef\TY@save@row{}% |
ulalume3@11 | 117 | \loop |
ulalume3@11 | 118 | \advance\TY@count\m@ne |
ulalume3@11 | 119 | \ifnum\TY@count>\z@ |
ulalume3@11 | 120 | \xdef\TY@save@row{\TY@save@row&\omit}% |
ulalume3@11 | 121 | \repeat}\TY@save@row |
ulalume3@11 | 122 | \endarray\global\setbox1=\lastbox\setbox0=\vbox{\unvbox1 |
ulalume3@11 | 123 | \unskip\global\setbox1=\lastbox}\egroup |
ulalume3@11 | 124 | \dimen@\TY@linewidth |
ulalume3@11 | 125 | \divide\dimen@\TY@count |
ulalume3@11 | 126 | \ifdim\dimen@<\tymin |
ulalume3@11 | 127 | \TY@warn{tymin too large (\the\tymin), resetting to \the\dimen@}% |
ulalume3@11 | 128 | \tymin\dimen@ |
ulalume3@11 | 129 | \fi |
ulalume3@11 | 130 | \setbox\tw@=\hbox{\unhbox\@ne |
ulalume3@11 | 131 | \loop |
ulalume3@11 | 132 | \@tempdima=\lastskip |
ulalume3@11 | 133 | \ifdim\@tempdima>\z@ |
ulalume3@11 | 134 | Z \message{ecs=\the\@tempdima^^J}% |
ulalume3@11 | 135 | \global\advance\TY@linewidth-\@tempdima |
ulalume3@11 | 136 | \fi |
ulalume3@11 | 137 | \unskip |
ulalume3@11 | 138 | \setbox\tw@=\lastbox |
ulalume3@11 | 139 | \ifhbox\tw@ |
ulalume3@11 | 140 | Z \message{Col \the\TY@count: Initial=\the\wd\tw@\space}% |
ulalume3@11 | 141 | \ifdim\wd\tw@>\tymax |
ulalume3@11 | 142 | \wd\tw@\tymax |
ulalume3@11 | 143 | Z \message{> max\space}% |
ulalume3@11 | 144 | Z \else |
ulalume3@11 | 145 | Z \message{ \@spaces\space}% |
ulalume3@11 | 146 | \fi |
ulalume3@11 | 147 | \TY@width\dimen@ |
ulalume3@11 | 148 | Z \message{\the\dimen@\space}% |
ulalume3@11 | 149 | \advance\dimen@\wd\tw@ |
ulalume3@11 | 150 | Z \message{Final=\the\dimen@\space}% |
ulalume3@11 | 151 | \TY@width\xdef{\the\dimen@}% |
ulalume3@11 | 152 | \ifdim\dimen@<\tymin |
ulalume3@11 | 153 | Z \message{< tymin}% |
ulalume3@11 | 154 | \global\advance\TY@linewidth-\dimen@ |
ulalume3@11 | 155 | \expandafter\xdef\csname TY@F\the\TY@count\endcsname |
ulalume3@11 | 156 | {\the\dimen@}% |
ulalume3@11 | 157 | \else |
ulalume3@11 | 158 | \expandafter\ifx\csname TY@F\the\TY@count\endcsname\z@ |
ulalume3@11 | 159 | Z \message{***}% |
ulalume3@11 | 160 | \global\advance\TY@linewidth-\dimen@ |
ulalume3@11 | 161 | \expandafter\xdef\csname TY@F\the\TY@count\endcsname |
ulalume3@11 | 162 | {\the\dimen@}% |
ulalume3@11 | 163 | \else |
ulalume3@11 | 164 | Z \message{> tymin}% |
ulalume3@11 | 165 | \global\advance\TY@tablewidth\dimen@ |
ulalume3@11 | 166 | \global\expandafter\let\csname TY@F\the\TY@count\endcsname |
ulalume3@11 | 167 | \maxdimen |
ulalume3@11 | 168 | \fi\fi |
ulalume3@11 | 169 | \advance\TY@count\m@ne |
ulalume3@11 | 170 | \repeat}% |
ulalume3@11 | 171 | \TY@checkmin |
ulalume3@11 | 172 | \TY@checkmin |
ulalume3@11 | 173 | \TY@checkmin |
ulalume3@11 | 174 | \TY@checkmin |
ulalume3@11 | 175 | \TY@count\z@ |
ulalume3@11 | 176 | \let\TY@box\TY@box@v |
ulalume3@11 | 177 | \let\footnote\TY@footnote % restore footnotes |
ulalume3@11 | 178 | {\expandafter\TY@final\the\toks@\endTY@final}% |
ulalume3@11 | 179 | \count@\z@ |
ulalume3@11 | 180 | \@tempswatrue |
ulalume3@11 | 181 | \@whilesw\if@tempswa\fi{% |
ulalume3@11 | 182 | \advance\count@\@ne |
ulalume3@11 | 183 | \expandafter\ifx\csname TY@SF\the\count@\endcsname\relax |
ulalume3@11 | 184 | \@tempswafalse |
ulalume3@11 | 185 | \else |
ulalume3@11 | 186 | \global\expandafter\let\csname TY@F\the\count@\expandafter\endcsname |
ulalume3@11 | 187 | \csname TY@SF\the\count@\endcsname |
ulalume3@11 | 188 | \global\expandafter\let\csname TY@\the\count@\expandafter\endcsname |
ulalume3@11 | 189 | \csname TY@S\the\count@\endcsname |
ulalume3@11 | 190 | \fi}% |
ulalume3@11 | 191 | \TY@linewidth\@ovxx |
ulalume3@11 | 192 | \TY@tablewidth\@ovyy |
ulalume3@11 | 193 | \ifnum0=`{\fi}} |
ulalume3@11 | 194 | \def\TY@checkmin{% |
ulalume3@11 | 195 | \let\TY@checkmin\relax |
ulalume3@11 | 196 | \ifdim\TY@tablewidth>\z@ |
ulalume3@11 | 197 | \Gscale@div\TY@ratio\TY@linewidth\TY@tablewidth |
ulalume3@11 | 198 | \ifdim\TY@tablewidth <\linewidth |
ulalume3@11 | 199 | \def\TY@ratio{1}% |
ulalume3@11 | 200 | \fi |
ulalume3@11 | 201 | \else |
ulalume3@11 | 202 | \TY@warn{No suitable columns!}% |
ulalume3@11 | 203 | \def\TY@ratio{1}% |
ulalume3@11 | 204 | \fi |
ulalume3@11 | 205 | \count@\z@ |
ulalume3@11 | 206 | Z \message{^^JLine Width: \the\TY@linewidth, |
ulalume3@11 | 207 | Z Natural Width: \the\TY@tablewidth, |
ulalume3@11 | 208 | Z Ratio: \TY@ratio^^J}% |
ulalume3@11 | 209 | \@tempdima\z@ |
ulalume3@11 | 210 | \loop |
ulalume3@11 | 211 | \ifnum\count@<\TY@count |
ulalume3@11 | 212 | \advance\count@\@ne |
ulalume3@11 | 213 | \ifdim\csname TY@F\the\count@\endcsname>\tymin |
ulalume3@11 | 214 | \dimen@\csname TY@\the\count@\endcsname |
ulalume3@11 | 215 | \dimen@\TY@ratio\dimen@ |
ulalume3@11 | 216 | \ifdim\dimen@<\tymin |
ulalume3@11 | 217 | Z \message{Column \the\count@\space ->}% |
ulalume3@11 | 218 | \global\expandafter\let\csname TY@F\the\count@\endcsname\tymin |
ulalume3@11 | 219 | \global\advance\TY@linewidth-\tymin |
ulalume3@11 | 220 | \global\advance\TY@tablewidth-\csname TY@\the\count@\endcsname |
ulalume3@11 | 221 | \let\TY@checkmin\TY@@checkmin |
ulalume3@11 | 222 | \else |
ulalume3@11 | 223 | \expandafter\xdef\csname TY@F\the\count@\endcsname{\the\dimen@}% |
ulalume3@11 | 224 | \advance\@tempdima\csname TY@F\the\count@\endcsname |
ulalume3@11 | 225 | \fi |
ulalume3@11 | 226 | \fi |
ulalume3@11 | 227 | Z \dimen@\csname TY@F\the\count@\endcsname\message{\the\dimen@, }% |
ulalume3@11 | 228 | \repeat |
ulalume3@11 | 229 | Z \message{^^JTotal:\the\@tempdima^^J}% |
ulalume3@11 | 230 | } |
ulalume3@11 | 231 | \let\TY@@checkmin\TY@checkmin |
ulalume3@11 | 232 | \newdimen\TY@linewidth |
ulalume3@11 | 233 | \def\tyformat{\everypar{{\nobreak\hskip\z@skip}}} |
ulalume3@11 | 234 | \newdimen\tymin |
ulalume3@11 | 235 | \tymin=10pt |
ulalume3@11 | 236 | \newdimen\tymax |
ulalume3@11 | 237 | \tymax=2\textwidth |
ulalume3@11 | 238 | \def\@testpach{\@chclass |
ulalume3@11 | 239 | \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else |
ulalume3@11 | 240 | \ifnum \@lastchclass=7 5 \else |
ulalume3@11 | 241 | \ifnum \@lastchclass=8 \tw@ \else |
ulalume3@11 | 242 | \ifnum \@lastchclass=9 \thr@@ |
ulalume3@11 | 243 | \else \z@ |
ulalume3@11 | 244 | \ifnum \@lastchclass = 10 \else |
ulalume3@11 | 245 | \edef\@nextchar{\expandafter\string\@nextchar}% |
ulalume3@11 | 246 | \@chnum |
ulalume3@11 | 247 | \if \@nextchar c\z@ \else |
ulalume3@11 | 248 | \if \@nextchar l\@ne \else |
ulalume3@11 | 249 | \if \@nextchar r\tw@ \else |
ulalume3@11 | 250 | \if \@nextchar C7 \else |
ulalume3@11 | 251 | \if \@nextchar L8 \else |
ulalume3@11 | 252 | \if \@nextchar R9 \else |
ulalume3@11 | 253 | \if \@nextchar J10 \else |
ulalume3@11 | 254 | \z@ \@chclass |
ulalume3@11 | 255 | \if\@nextchar |\@ne \else |
ulalume3@11 | 256 | \if \@nextchar !6 \else |
ulalume3@11 | 257 | \if \@nextchar @7 \else |
ulalume3@11 | 258 | \if \@nextchar <8 \else |
ulalume3@11 | 259 | \if \@nextchar >9 \else |
ulalume3@11 | 260 | 10 |
ulalume3@11 | 261 | \@chnum |
ulalume3@11 | 262 | \if \@nextchar m\thr@@\else |
ulalume3@11 | 263 | \if \@nextchar p4 \else |
ulalume3@11 | 264 | \if \@nextchar b5 \else |
ulalume3@11 | 265 | \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi\fi \fi \fi\fi \fi |
ulalume3@11 | 266 | \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi} |
ulalume3@11 | 267 | \def\TY@classz{% |
ulalume3@11 | 268 | \@classx |
ulalume3@11 | 269 | \@tempcnta\count@ |
ulalume3@11 | 270 | \ifx\TY@box\TY@box@v |
ulalume3@11 | 271 | \global\advance\TY@count\@ne |
ulalume3@11 | 272 | \fi |
ulalume3@11 | 273 | \let\centering c% |
ulalume3@11 | 274 | \let\raggedright\noindent |
ulalume3@11 | 275 | \let\raggedleft\indent |
ulalume3@11 | 276 | \let\arraybackslash\relax |
ulalume3@11 | 277 | \prepnext@tok |
ulalume3@11 | 278 | \ifnum\@chnum<4 |
ulalume3@11 | 279 | \global\expandafter\let\csname TY@F\the\TY@count\endcsname\z@ |
ulalume3@11 | 280 | \fi |
ulalume3@11 | 281 | \ifnum\@chnum=6 |
ulalume3@11 | 282 | \global\expandafter\let\csname TY@F\the\TY@count\endcsname\z@ |
ulalume3@11 | 283 | \fi |
ulalume3@11 | 284 | \@addtopreamble{% |
ulalume3@11 | 285 | \ifcase\@chnum |
ulalume3@11 | 286 | \hfil \d@llarbegin\insert@column\d@llarend \hfil \or |
ulalume3@11 | 287 | \kern\z@ |
ulalume3@11 | 288 | \d@llarbegin \insert@column \d@llarend \hfil \or |
ulalume3@11 | 289 | \hfil\kern\z@ \d@llarbegin \insert@column \d@llarend \or |
ulalume3@11 | 290 | $\vcenter\@startpbox{\@nextchar}\insert@column \@endpbox $\or |
ulalume3@11 | 291 | \vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or |
ulalume3@11 | 292 | \vbox \@startpbox{\@nextchar}\insert@column \@endpbox \or |
ulalume3@11 | 293 | \d@llarbegin \insert@column \d@llarend \or% dubious "s" case |
ulalume3@11 | 294 | \TY@box\centering\or |
ulalume3@11 | 295 | \TY@box\raggedright\or |
ulalume3@11 | 296 | \TY@box\raggedleft\or |
ulalume3@11 | 297 | \TY@box\relax |
ulalume3@11 | 298 | \fi}\prepnext@tok} |
ulalume3@11 | 299 | \def\TY@box#1{% |
ulalume3@11 | 300 | \ifx\centering#1% |
ulalume3@11 | 301 | \hfil \d@llarbegin\insert@column\d@llarend \hfil \else |
ulalume3@11 | 302 | \ifx\raggedright#1% |
ulalume3@11 | 303 | \kern\z@%<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
ulalume3@11 | 304 | \d@llarbegin \insert@column \d@llarend \hfil \else |
ulalume3@11 | 305 | \ifx\raggedleft#1% |
ulalume3@11 | 306 | \hfil\kern\z@ \d@llarbegin \insert@column \d@llarend \else |
ulalume3@11 | 307 | \ifx\relax#1% |
ulalume3@11 | 308 | \d@llarbegin \insert@column \d@llarend |
ulalume3@11 | 309 | \fi \fi \fi \fi} |
ulalume3@11 | 310 | \def\TY@box@v#1{% |
ulalume3@11 | 311 | \vtop \@startpbox{\csname TY@F\the\TY@count\endcsname}% |
ulalume3@11 | 312 | #1\arraybackslash\tyformat |
ulalume3@11 | 313 | \insert@column\@endpbox} |
ulalume3@11 | 314 | \newdimen\TY@tablewidth |
ulalume3@11 | 315 | \def\Gscale@div#1#2#3{% |
ulalume3@11 | 316 | \setlength\dimen@{#3}% |
ulalume3@11 | 317 | \ifdim\dimen@=\z@ |
ulalume3@11 | 318 | \PackageError{graphics}{Division by 0}\@eha |
ulalume3@11 | 319 | \dimen@#2% |
ulalume3@11 | 320 | \fi |
ulalume3@11 | 321 | \edef\@tempd{\the\dimen@}% |
ulalume3@11 | 322 | \setlength\dimen@{#2}% |
ulalume3@11 | 323 | \count@65536\relax |
ulalume3@11 | 324 | \ifdim\dimen@<\z@ |
ulalume3@11 | 325 | \dimen@-\dimen@ |
ulalume3@11 | 326 | \count@-\count@ |
ulalume3@11 | 327 | \fi |
ulalume3@11 | 328 | \loop |
ulalume3@11 | 329 | \ifdim\dimen@<8192\p@ |
ulalume3@11 | 330 | \dimen@\tw@\dimen@ |
ulalume3@11 | 331 | \divide\count@\tw@ |
ulalume3@11 | 332 | \repeat |
ulalume3@11 | 333 | \dimen@ii=\@tempd\relax |
ulalume3@11 | 334 | \divide\dimen@ii\count@ |
ulalume3@11 | 335 | \divide\dimen@\dimen@ii |
ulalume3@11 | 336 | \edef#1{\strip@pt\dimen@}} |
ulalume3@11 | 337 | \long\def\TY@get@body#1\end |
ulalume3@11 | 338 | {\toks@\expandafter{\the\toks@#1}\TY@find@end} |
ulalume3@11 | 339 | \def\TY@find@end#1{% |
ulalume3@11 | 340 | \def\@tempa{#1}% |
ulalume3@11 | 341 | \ifx\@tempa\TY@\def\@tempa{\end{#1}}\expandafter\@tempa |
ulalume3@11 | 342 | \else\toks@\expandafter |
ulalume3@11 | 343 | {\the\toks@\end{#1}}\expandafter\TY@get@body\fi} |
ulalume3@11 | 344 | \def\TY@warn{% |
ulalume3@11 | 345 | \PackageWarning{tabulary}} |
ulalume3@11 | 346 | \catcode`\Z=11 |
ulalume3@11 | 347 | \AtBeginDocument{ |
ulalume3@11 | 348 | \@ifpackageloaded{colortbl}{% |
ulalume3@11 | 349 | \expandafter\def\expandafter\@mkpream\expandafter#\expandafter1% |
ulalume3@11 | 350 | \expandafter{% |
ulalume3@11 | 351 | \expandafter\let\expandafter\CT@setup\expandafter\relax |
ulalume3@11 | 352 | \expandafter\let\expandafter\CT@color\expandafter\relax |
ulalume3@11 | 353 | \expandafter\let\expandafter\CT@do@color\expandafter\relax |
ulalume3@11 | 354 | \expandafter\let\expandafter\color\expandafter\relax |
ulalume3@11 | 355 | \expandafter\let\expandafter\CT@column@color\expandafter\relax |
ulalume3@11 | 356 | \expandafter\let\expandafter\CT@row@color\expandafter\relax |
ulalume3@11 | 357 | \@mkpream{#1}} |
ulalume3@11 | 358 | \let\TY@@mkpream\@mkpream |
ulalume3@11 | 359 | \def\TY@classz{% |
ulalume3@11 | 360 | \@classx |
ulalume3@11 | 361 | \@tempcnta\count@ |
ulalume3@11 | 362 | \ifx\TY@box\TY@box@v |
ulalume3@11 | 363 | \global\advance\TY@count\@ne |
ulalume3@11 | 364 | \fi |
ulalume3@11 | 365 | \let\centering c% |
ulalume3@11 | 366 | \let\raggedright\noindent |
ulalume3@11 | 367 | \let\raggedleft\indent |
ulalume3@11 | 368 | \let\arraybackslash\relax |
ulalume3@11 | 369 | \prepnext@tok |
ulalume3@11 | 370 | \expandafter\CT@extract\the\toks\@tempcnta\columncolor!\@nil |
ulalume3@11 | 371 | \ifnum\@chnum<4 |
ulalume3@11 | 372 | \global\expandafter\let\csname TY@F\the\TY@count\endcsname\z@ |
ulalume3@11 | 373 | \fi |
ulalume3@11 | 374 | \ifnum\@chnum=6 |
ulalume3@11 | 375 | \global\expandafter\let\csname TY@F\the\TY@count\endcsname\z@ |
ulalume3@11 | 376 | \fi |
ulalume3@11 | 377 | \@addtopreamble{% |
ulalume3@11 | 378 | \setbox\z@\hbox\bgroup\bgroup |
ulalume3@11 | 379 | \ifcase\@chnum |
ulalume3@11 | 380 | \hskip\stretch{.5}\kern\z@ |
ulalume3@11 | 381 | \d@llarbegin\insert@column\d@llarend\hskip\stretch{.5}\or |
ulalume3@11 | 382 | \kern\z@%<<<<<<<<<<<<<<<<<<<<<<<<<<< |
ulalume3@11 | 383 | \d@llarbegin \insert@column \d@llarend \hfill \or |
ulalume3@11 | 384 | \hfill\kern\z@ \d@llarbegin \insert@column \d@llarend \or |
ulalume3@11 | 385 | $\vcenter\@startpbox{\@nextchar}\insert@column \@endpbox $\or |
ulalume3@11 | 386 | \vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or |
ulalume3@11 | 387 | \vbox \@startpbox{\@nextchar}\insert@column \@endpbox \or |
ulalume3@11 | 388 | \d@llarbegin \insert@column \d@llarend \or% dubious s case |
ulalume3@11 | 389 | \TY@box\centering\or |
ulalume3@11 | 390 | \TY@box\raggedright\or |
ulalume3@11 | 391 | \TY@box\raggedleft\or |
ulalume3@11 | 392 | \TY@box\relax |
ulalume3@11 | 393 | \fi |
ulalume3@11 | 394 | \egroup\egroup |
ulalume3@11 | 395 | \begingroup |
ulalume3@11 | 396 | \CT@setup |
ulalume3@11 | 397 | \CT@column@color |
ulalume3@11 | 398 | \CT@row@color |
ulalume3@11 | 399 | \CT@do@color |
ulalume3@11 | 400 | \endgroup |
ulalume3@11 | 401 | \@tempdima\ht\z@ |
ulalume3@11 | 402 | \advance\@tempdima\minrowclearance |
ulalume3@11 | 403 | \vrule\@height\@tempdima\@width\z@ |
ulalume3@11 | 404 | \unhbox\z@ |
ulalume3@11 | 405 | }\prepnext@tok}% |
ulalume3@11 | 406 | \def\TY@arrayrule{% |
ulalume3@11 | 407 | \TY@subwidth\arrayrulewidth |
ulalume3@11 | 408 | \@addtopreamble{{\CT@arc@\vline}}}% |
ulalume3@11 | 409 | \def\TY@classvi{\ifcase \@lastchclass |
ulalume3@11 | 410 | \@acol \or |
ulalume3@11 | 411 | \TY@subwidth\doublerulesep |
ulalume3@11 | 412 | \ifx\CT@drsc@\relax |
ulalume3@11 | 413 | \@addtopreamble{\hskip\doublerulesep}% |
ulalume3@11 | 414 | \else |
ulalume3@11 | 415 | \@addtopreamble{{\CT@drsc@\vrule\@width\doublerulesep}}% |
ulalume3@11 | 416 | \fi\or |
ulalume3@11 | 417 | \@acol \or |
ulalume3@11 | 418 | \@classvii |
ulalume3@11 | 419 | \fi}% |
ulalume3@11 | 420 | }{% |
ulalume3@11 | 421 | \let\CT@start\relax |
ulalume3@11 | 422 | } |
ulalume3@11 | 423 | } |
ulalume3@11 | 424 | {\uccode`\*=`\ % |
ulalume3@11 | 425 | \uppercase{\gdef\TX@verb{% |
ulalume3@11 | 426 | \leavevmode\null\TX@vwarn |
ulalume3@11 | 427 | {\ifnum0=`}\fi\ttfamily\let\\\ignorespaces |
ulalume3@11 | 428 | \@ifstar{\let~*\TX@vb}{\TX@vb}}}} |
ulalume3@11 | 429 | \def\TX@vb#1{\def\@tempa##1#1{\toks@{##1}\edef\@tempa{\the\toks@}% |
ulalume3@11 | 430 | \expandafter\TX@v\meaning\@tempa\\ \\\ifnum0=`{\fi}}\@tempa!} |
ulalume3@11 | 431 | \def\TX@v#1!{\afterassignment\TX@vfirst\let\@tempa= } |
ulalume3@11 | 432 | \begingroup |
ulalume3@11 | 433 | \catcode`\*=\catcode`\# |
ulalume3@11 | 434 | \catcode`\#=12 |
ulalume3@11 | 435 | \gdef\TX@vfirst{% |
ulalume3@11 | 436 | \if\@tempa#% |
ulalume3@11 | 437 | \def\@tempb{\TX@v@#}% |
ulalume3@11 | 438 | \else |
ulalume3@11 | 439 | \let\@tempb\TX@v@ |
ulalume3@11 | 440 | \if\@tempa\space~\else\@tempa\fi |
ulalume3@11 | 441 | \fi |
ulalume3@11 | 442 | \@tempb} |
ulalume3@11 | 443 | \gdef\TX@v@*1 *2{% |
ulalume3@11 | 444 | \TX@v@hash*1##\relax\if*2\\\else~\expandafter\TX@v@\fi*2} |
ulalume3@11 | 445 | \gdef\TX@v@hash*1##*2{*1\ifx*2\relax\else#\expandafter\TX@v@hash\fi*2} |
ulalume3@11 | 446 | \endgroup |
ulalume3@11 | 447 | \def\TX@vwarn{% |
ulalume3@11 | 448 | \@warning{\noexpand\verb may be unreliable inside tabularx/y}% |
ulalume3@11 | 449 | \global\let\TX@vwarn\@empty} |
ulalume3@11 | 450 | \endinput |
ulalume3@11 | 451 | %% |
ulalume3@11 | 452 | %% End of file `tabulary.sty'. |