÷ƒ’À;è TeX output 1997.03.05:1635‹ÿÿÿÿ ª� ýs o� ýÞ�’±y™óDÓítG®G®cmr17¹The–7tóÖÆG®G®cmss17ºtabulašŒqrx“¹pac˜k‘ÿäage��Ÿùº¯ó!",š cmsy10¿ŽŽŽŸ�����’Õþ­óX«Q cmr12»Da�¬rvid‘ê¨CarlisleŽŽŽŽŽŸ37�’Ý 1997/02/26ŽŸ.�’æ!Kót ‰: cmbx9ÇAbstractŽŸ¬Ñ�‘oßüóo´‹Ç cmr9ÆA‘å‡new›å½en•¾9vironmen“t,–×óߤN cmtt9ÈtabularxÆ,“is˜de ned,“whic•¾9h˜tak“es˜the˜same˜argu-ޤ �‘bmen�¾9ts–áFas“Ètabular*Æ,›ë¯but“mo�AÇdi es“the“widths“of“certain“columns,˜rather“thanŽ¡�‘bthe–c�in�¾9ter“column“space,‘wto“set“a“table“with“the“requested“total“width.‘#TheŽ¡�‘bcolumns–á¹that“maš¾9y“stretc˜h“are“mark˜ed“with“the“new“tok˜en“ÈX‘á¬Æin“the“pream˜bleŽ¡�‘bargumen�¾9t.Ž¡�‘oßüThis–Tpacš¾9k‘ÿ|rage“requires“the“Èarray“Æpac˜k‘ÿ|rage.Ž©!Ä��‘IóÂÖN ff cmbx12Ê1Ž‘aLËIn�ŒÌtro�s3ductionŽŸç�‘IóKñ`y cmr10²This–=pacš¸ãk‘ÿqÇage“implemen˜ts“a“v˜ersion“of“the“ó ßê����‘ "5Ÿý-:ó¹Aa¨cmr6Á1ŽŽŽ‘LÜÀY‘ÿJªou–ÕXcan“no�ÃŽw“use“ó"ßCÊscmtt8Í\footnote“Àinside“ÍtabularxÀ!ŽŽŸ�’ø²1ŽŽŒ‹* ª� ýs o� ýË™���‘d€ŸßL͉ff,¤fd��¤™œ„ ff–&»Ÿüfd²Multicolumn‘UUen�¸ãtry!“¡„ ffŽ�’‘ÚOTHREE‘Ÿ™œ„ ffŽ���’Áò€F�¸ãOURŽŽ’+™›Ÿ™œ„ ffŽŽŸ‰ff,¡��¤'™œ„0ff–ŸØfdone“¡„0ffŽ���‘!ÌÎThe–UUwidth“of“thisޤ �‘!ÌÎcolumn–UUdep�Gends“onŽ¡�‘!ÌÎthe–UUwidth“of“the“table.ŽŽ’‹séŸ'™œ„0ffŽ�’˜“4three‘ ¸åŸ'™œ„0ffŽ���’Áò€Column–UUfour“will“actޤ �’Áò€in–UUthe“same“w•¸ãa“y‘UUasŽ¡�’Áò€column›UUt•¸ãw“o,˜with˜theŽ¡�’Áò€same‘UUwidth.ŽŽ’+™›Ÿ'™œ„0ffŽŽŸ(‰ff,ŽŽŽŸ5çÚ��‘IÊ3Ž‘aLËDi erences›ffb�s3et•ŒÌw“een˜ó#߆µTff cmtt12Îtabularx˜Êand˜Îtabular*ŽŸç�‘I²These›‹§t•¸ãw“o˜en“vironmen“ts˜tak“e˜the˜same˜argumen“ts,‘³þto˜pro•Gduce˜a˜table˜of˜a˜sp“eci edޤ �‘Iwidth.‘qÇThe–UUmain“di erences“b�Get•¸ãw“een–UUthem“are:ŽŸÆg����‘X¸ŽŽŽ‘bËtabularx–�²mošGdi es“the“widths“of“the“Ìc‘ÿ}'olumns²,‘Kïwhereas“Ëtabular*“²mo˜di esŽ¡�‘bthe–UUwidths“of“the“in�¸ãter-column“Ìsp–ÿ}'ac“es².Ž©c4����‘X¸ŽŽŽ‘bËtabular–Íp²and“Ëtabular*“²en•¸ãvironmen“ts›Ípma“y˜b�Ge˜nested˜with˜no˜restriction,Ž¡�‘bho•¸ãw“ev“er–[“if“one“Ëtabularx“²en•¸ãvironmen“t–[“o�Gccurs“inside“another,‘]"then“the“innerŽ¡�‘bone–UUÌmust‘H-²b�Ge“enclosed“b�¸ãy“Ë{‘?ý}².ަ����‘X¸ŽŽŽ‘b²The›ë6b•Go“dy˜of˜the˜Ëtabularx˜²en•¸ãvironmen“t˜is˜in˜fact˜the˜argumen“t˜to˜a˜com-Ž¡�‘bmand,‘ã‰and–Çso“certain“constructions“whicš¸ãh“are“not“allo˜w˜ed“in“command“ar-Ž¡�‘bgumen•¸ãts›UU(lik“e˜Ë\verb²)˜ma“y˜not˜b�Ge˜used.��Ÿü^ÿ±2ŽŽŽ¦����‘X¸ŽŽŽ‘bËtabular*–P˜²uses“a“primitivš¸ãe“capabilit˜y“of“T�‘þU>Ÿ'EŽ‘ãxX“to“mo�Gdify“the“in˜ter“column“spaceŽ¡�‘bof–˜¦an“alignmenš¸ãt.‘;»Ëtabularx“²has“to“set“the“table“sev˜eral“times“as“it“searc˜hesŽ¡�‘bfor–íthe“b�Gest“column“widths,‘Îand“is“therefore“m•¸ãuc“h›íslo“w“er.‘U¤Also˜the˜fact˜thatŽ¡�‘bthe›UUb•Go“dy˜is˜expanded˜sev•¸ãeral˜times˜ma“y˜break˜certain˜T�‘þU>Ÿ'EŽ‘ãxX˜constructs.ŽŸ ÎB��‘IÊ4Ž‘aLËCustomising–ffthe“b�s3eha�ŒÌviour“of“ÎtabularxŽŸç��‘Ió$ÂÖN  cmbx12Ï4.1Ž‘gÀT‘þàerminal‘€outputŽ©uT�‘I²If–ûothis“declaration“is“made,‘dösaš¸ãy“in“the“do�Gcumen˜t“pream˜ble,‘döthen“all“follo˜wingŽ����‘òf È\tracingtabularxŽŽŽŽ¡�‘IËtabularx›" ²en•¸ãvironmen“ts˜will˜prin“t˜information˜ab�Gout˜column˜widths˜as˜they˜re-Ž¡�‘Ip�Geatedly–UUre-set“the“tables“to“ nd“the“correct“widths.Ž¡�‘XAs–°an“alternativ�¸ãe“to“using“the“Ë\tracingtabularx“²declaration,‘Ñ either“of“the“op-Ž¡�‘Itions–ºËinfoshow“²or“Ëdebugshow“²maš¸ãy“b�Ge“giv˜en,‘( either“in“the“Ë\usepackage“²commandŽ¡�‘Ithat–UUloads“Ëtabularx²,“or“as“a“global“option“in“the“Ë\documentclass“²command.ŽŸº´��‘IÏ4.2Ž‘gÀThe›€en• vironmen“t˜used˜to˜t“yp�`eset˜the˜ó%߆µT cmtt12ÐX˜Ïcolumnsަ�‘I²By–dUdefault“the“ËX‘cβsp�Geci cation“is“turned“inš¸ãto“Ëp{�¸hÌsomeŽ�‘B+value‘À[¸iŽ‘:!ÇË}².‘ žÈSuc˜h“narro˜wŽ¡�‘Icolumns–†)often“require“a“spšGecial“format,‘Ò^this“ma�¸ãy“b˜e“ac•¸ãhiev“ed–†)using“the“Ë>“²syn-Ž¡�‘Itax–>of“Ëarray.sty².‘ŸƒSo“for“example“yš¸ãou“ma˜y“giv˜e“a“sp�Geci cation“of“Ë>{\small}X².Ž¡�‘IAnother–Ÿþformat“whicš¸ãh“is“useful“in“narro˜w“columns“is“ragged“righ˜t,‘ÄCho˜w˜ev˜er“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX'sŽ¡�‘IË\raggedright–ž{²macro“rede nes“Ë\\“²in“a“w•¸ãa“y›ž{whic“h˜con icts˜with˜its˜use˜in˜a˜tab-Ž¡�‘Iular–Â-or“arraš¸ãy“en˜vironmen˜ts.‘¸OF‘ÿ*ªor“this“reason“this“pac˜k‘ÿqÇage“in˜tro�Gduces“the“com-Ž����‘÷ 6È\arraybackslashŽŽŽŽ¡�‘I²mand–ôÐË\arraybackslash²,›®this“ma�¸ãy“b�Ge“used“after“a“Ë\raggedright²,˜Ë\raggedleftŽ¡�‘I²or–UUË\centering“²declaration.‘qÇThš¸ãus“a“Ëtabularx“²pream˜ble“ma˜y“sp�GecifyŽ¡�‘IË>{\raggedright\arraybackslash}X².Ž‘IŸ}‰ff�ÿrŸ J=����‘ "5Ÿý-:Á2ŽŽŽ‘LÜÀSince–3V‘ÿJªersion“1.02,›(éÍ\verb–@and“\verb*–3Àma�ÃŽy“b�{\small\raggedright\arraybackslash}X}Ž¡�‘I²and–UUthen“use“ËY“²in“the“Ëtabularx“²preamš¸ãble“argumen˜t.Ž¡�‘XThe–xMËX‘xD²columns“are“set“using“the“Ëp“²column“whic�¸ãh“corresp�Gonds“to“Ë\parbox[t]².Ž����‘÷ 6È\tabularxcolumnŽŽŽŽ¡�‘I²Y‘ÿ*ªou–µAmaš¸ãy“w˜an˜t“them“set“using,–�;sa˜y‘ÿ*ª,“the–µAËm“²column,‘�;whic˜h“corresp�Gonds“toŽ¡�‘IË\parbox[c]².‘�¥It–_Jis“not“p�Gossible“to“cš¸ãhange“the“column“t˜yp�Ge“using“the“Ë>“²syn˜tax,Ž¡�‘Iso–å¦another“system“is“pro�¸ãvided.‘L�Ë\tabularxcolumn“²should“bšGe“de ned“to“b˜e“a“macroŽ¡�‘Iwith–�Ÿone“argumen•¸ãt,‘Â]whic“h–�Ÿexpands“to“the“Ëtabular“²preamš¸ãble“sp�Geci cation“that“y˜ouŽ¡�‘Iw•¸ãan“t–”:to“correspšGond“to“ËX².“The“argumen�¸ãt“will“b˜e“replaced“b�¸ãy“the“calculated“widthŽ¡�‘Iof–UUa“column.Ž¡�‘XThe–ðdefault“is“Ë\newcommand{\tabularxcolumn}[1]{p{#1}}².‘ ¼˜So“wš¸ãe“ma˜yŽ¡�‘Icš¸ãhange–UUthis“with“a“command“suc˜h“as:Ž¡�‘IË\renewcommand{\tabularxcolumn}[1]{>{\small}m{#1}}ŽŸçg��‘IÏ4.3Ž‘gÀColumn‘€widthsŽŸuT�‘I²Normally–‘¸all“ËX‘‘¨²columns“in“a“single“table“are“set“to“the“same“width,‘ Ðho•¸ãw“ev“er–‘¸it“isŽ¡�‘Ip�Gossible–'‡to“makš¸ãe“Ëtabularx“²set“them“to“di eren˜t“widths.‘bƒA‘'|pream˜ble“argumen˜t“ofŽ¡�‘IË{>{\hsize=.5\hsize}X>{\hsize=1.5\hsize}X}– ‘²sp�Geci es“t•¸ãw“o– ‘columns,‘6Ÿthe“sec-Ž¡�‘Iond–ÂÂwill“b�Ge“three“times“as“wide“as“the“ rst.‘º Ho•¸ãw“ev“er–ÂÂif“yš¸ãou“w˜an˜t“to“pla˜y“gamesŽ¡�‘Ilikš¸ãe–UUthis“y˜ou“should“follo˜w“the“follo˜wing“t˜w˜o“rules.Ž©– ����‘X¸ŽŽŽ‘b²Makš¸ãe–í%sure“that“the“sum“of“the“widths“of“all“the“ËX‘í ²columns“is“unc˜hanged.‘O (InŽ¡�‘bthe›ƒzab�Go•¸ãv“e˜example,‘�the˜new˜widths˜still˜add˜up˜to˜t“wice˜the˜default˜width,Ž¡�‘bthe–UUsame“as“t•¸ãw“o–UUstandard“ËX“²columns.)ŽŸË����‘X¸ŽŽŽ‘b²Do–UUnot“use“Ë\multicolumn“²enš¸ãtries“whic˜h“cross“an˜y“ËX“²column.ަ�‘IAs–UUwith“most“rules,“these“maš¸ãy“b�Ge“brok˜en“if“y˜ou“kno˜w“what“y˜ou“are“doing.ŽŸçg��‘IÏ4.4Ž‘gÀIf–€the“algorithm“fails.–@.“.ŽŸuT�‘I²It–_ma�¸ãy“b�Ge“that“the“widths“of“the“`normal'“columns“of“the“table“already“total“moreŽ¡�‘Ithan–íÝthe“requested“total“width.‘OJó&m#½R cmss10Ñtabulaš¸ãrx“²refuses“to“set“the“ËX‘íòcolumns“to“a“negativ˜eŽ¡�‘Iwidth,‘ÒBso–±}in“this“case“yš¸ãou“get“a“w˜arning“\X‘±SColumns“to�Go“narro˜w“(table“to�Go“wide)".Ž¡�‘XThe–z’ËX‘zG²columns“will“in“this“case“b�Ge“set“to“a“width“of“1em“and“so“the“tableŽ¡�‘Iitself–ßýwill“b�Ge“wider“than“the“requested“total“width“givš¸ãen“in“the“argumen˜t“to“theŽ¡�‘Ien•¸ãvironmen“t.‘CÊThis››Vb�Geha“viour˜of˜the˜pac“k‘ÿqÇage˜can˜b�Ge˜customised˜sligh“tly˜as˜notedŽ¡�‘Iin–UUthe“došGcumen�¸ãtation“of“the“co˜de“section.ŽŸ úõ��‘IÊ5Ž‘aLËThe‘ffMacrosŽŸç��‘Lüs±1Ž‘Sª®ó(©±�Ê cmsy9Óh�ó)ÒoÇw cmss9Ôpack�¾9ageŽ‘#g ÓiŽŸË��‘Lüs±2Ž‘Sª®È\DeclareOption{infoshow}{\AtEndOfPackage\tracingtabularx}ޤ ��‘Lüs±3Ž‘Sª®È\DeclareOption{debugshow}{\AtEndOfPackage\tracingtabularx}Ž¡��‘Lüs±4Ž‘Sª®È\ProcessOptionsŽŸË�‘X²This–UUrequires“Ëarray.sty².Ž¡��‘Lüs±5Ž‘Sª®È\RequirePackage{array}[1994/02/03]ŽŸåƒ�‘X²First–UUsome“registers“etc.“that“w�¸ãe“need.ŽŽŸ�’ø3ŽŽŒ‹~ ª� ýs o� ý´��‘Lüs±6Ž‘Sª®È\newdimen\TX@col@widthޤ ��‘Lüs±7Ž‘Sª®È\newdimen\TX@old@tableŽ¡��‘Lüs±8Ž‘Sª®È\newdimen\TX@old@colŽ¡��‘Lüs±9Ž‘Sª®È\newdimen\TX@targetŽ¡��‘I±10Ž‘Sª®È\newdimen\TX@deltaŽ¡��‘I±11Ž‘Sª®È\newcount\TX@colsŽ¡��‘I±12Ž‘Sª®È\newif\ifTX@ŽŸ�‘X²Noš¸ãw–Ž6a“tric˜k“to“get“the“b•Go“dy–Ž6of“an“en˜vironmen˜t“in˜to“a“tok˜en“register,‘œnwithoutޤ �‘Idoing–Gƒanš¸ãy“expansion.‘m,This“do�Ges“not“do“an˜y“real“c˜hec˜king“of“nested“en˜vironmen˜ts,Ž¡�‘Iso–;bif“yš¸ãou“should“need“to“nest“one“Ëtabularx“²inside“another,‘@“the“inner“one“m˜ust“b�GeŽ¡�‘Isurrounded–UUb�¸ãy“Ë{‘?ý}².Ž¡����‘À$È\tabularxŽŽŽ‘I²Prior–ŽÇto“v1.06,›Ý$This“macro“to�Gok“t•¸ãw“o‘ŽÇargumen“ts,˜whic“h›ŽÇw“ere˜sa“v“ed˜in˜separateŽ¡�‘Iregisters–A/bšGefore“the“table“b˜o˜dy“wš¸ãas“sa˜v˜ed“b˜y“Ë\TX@get@body².‘5VUnfortunatly“thisŽ¡�‘Idisables–·Éthe“Ë[t]“²optional“argumen•¸ãt.‘™#No“w–·Éjust“sa•¸ãv“e–·Éthe“width“sp�Geci cation“sepa-Ž¡�‘Irately‘ÿ*ª,‘¾ªthen–©™clear“the“tok�¸ãen“register“Ë\toks@².‘n”Finally“call“Ë\TX@get@body“²to“b�GeginŽ¡�‘Isaš¸ãving–z£the“b•Go“dy–z£of“the“table.‘á²The“Ë{\ifnum0=`}\fi“²w˜as“added“at“v1.03,‘ƒ÷to“allo˜wŽ¡�‘IËtabularx–UU²to“app�Gear“inside“a“Ë\halign².��Ÿü^ÿ±3ŽŽŽ¡�‘X²This–mecš¸ãhanism“of“grabbing“an“en˜vironmen˜t“b•Go“dy›do“es˜ha•¸ãv“e˜the˜disadv‘ÿqÇan“tageŽ¡�‘I(shared–/Ówith“the“AMS‘/Êalignmenš¸ãt“en˜vironmen˜ts)“that“y˜ou“can“not“mak˜e“extensionŽ¡�‘Ien•¸ãvironmen“ts›UUb“y˜co�Gde˜suc“h˜asŽ©�‘IÈ\newenvironment{foo}{\begin{tabularx}{XX}}{\end{tabularx}}ŽŸ�‘I²as–'Éthe“cošGde“is“lo˜oking“for“a“literal“string“Ë\end{tabularx}“²to“stop“scanning.‘b˜SinceŽ¡�‘Ivš¸ãersion–C‘2.02,‘Gone“ma˜y“a˜v˜oid“this“problem“b˜y“using“Ë\tabularx“²and“Ë\endtabularxŽ¡�‘I²directly–UUin“the“de nition:ަ�‘IÈ\newenvironment{foo}{\tabularx{XX}}{\endtabularx}ŽŸ�‘I²The–5Õscanner“noš¸ãw“lo�Goks“for“the“end“of“the“curren˜t“en˜vironmen˜t“(Ëfoo“²in“this“ex-Ž¡�‘Iample.)‘gDThere–üare“some“restrictions“on“this“usage,‘&Ithe“principal“one“b�Geing“thatŽ¡�‘IË\endtabularx–UU²is“the“Ì rst‘H-²tokš¸ãen“of“the“`end“co�Gde'“of“the“en˜vironmen˜t.Ž©��‘I±13Ž‘Sª®È\def\tabularx#1{%ŽŸ�‘I²Allo�¸ãw–œ†Ë\tabularx“\endtabularx“²(but“not“Ë\begin{tabularx}“\end{tabularx“²toŽ¡�‘Ib�Ge–UUused“in“Ë\newenvironment“²de nitions.ަ��‘I±14Ž‘Sª®È\edef\TX@{\@currenvir}%ŽŸ ��‘I±15Ž‘]ÚÈ{\ifnum0=`}\fiŽŸ�‘IË\relax–:²added“at“v1.05“so“that“non-expandable“length“tok•¸ãens,‘rlik“e–:Ë\textwidth“²doŽ¡�‘Inot–UUgenerate“an“extra“space,“and“an“o•¸ãv“erfull‘UUb�Go“x.ަ��‘I±16Ž‘]ÚÈ\TX@target#1\relaxޤ ��‘I±17Ž‘]ÚÈ\TX@typeout{Target–¹–width:“#1“=“\the\TX@target.}%Ž¡��‘I±18Ž‘]ÚÈ\toks@{}\TX@get@body}ŽŸ����‘“b\endtabularxŽŽŽ‘I²This–UUdo�Ges“not“do“vš¸ãery“m˜uc˜h.–ªª.“.ަ��‘I±19Ž‘Sª®È\let\endtabularx\relaxŽ‘IŸ&e‰ff�ÿrŸ J=����‘ "5Ÿý-:Á3ŽŽŽ‘LÜÀThis–4šadds“an“extra“levšÃŽel“of“grouping,‘Œkwhic˜h“is“not“really“needed.‘äçInstead,‘ŒkI‘4@could“useޤ €��Í\iffalse{\fi\ifnum0=`}\fiŽ‘ni Àhere,–~5and�‘)<Í\ifnum0=`{}\fiŽ‘CÒ°Àb�€table“with“eac�¸ãh“ËX‘>{²column“the“width“of“the“ nal“table.‘j+Assuming“that“there“isŽ¡�‘Iat–Ý‚least“one“ËX‘Ýc²column,‘õythis“will“prošGduce“a“table“that“is“to˜o“wide.‘IÖDivide“the“excessŽ¡�‘Iwidth–êbš¸ãy“the“n˜um˜b�Ger“of“ËX‘Ù²columns,‘!Ìand“reduce“the“column“width“b˜y“this“amoun˜t.Ž¡�‘IReset–k7the“table.‘³mIf“the“table“is“not“noš¸ãw“the“correct“width,‘p¯a“Ë\multicolumn“²en˜tryŽ¡�‘Im�¸ãust–>`b�Ge“`hiding'“one“of“the“ËX›>Z²columns,‘B÷and“so“there“is“one“less“ËX˜²column“a ectingŽ¡�‘Ithe–Áùwidth“of“the“table.‘·³So“wš¸ãe“reduce“b˜y“1“the“n˜um˜bšGer“of“X‘ÁÝcolumns“and“rep˜eatŽ¡�‘Ithe‘UUpro�Gcess.ŽŸ����‘øf È\TX@endtabularxŽŽŽ‘I²Although›�*I‘�ha•¸ãv“e˜tried˜to˜mak“e˜Ëtabularx˜²lo�Gok˜lik“e˜an˜en“vironmen“t,‘Œit˜is˜in˜fact˜aŽ¡�‘Icommand,–UUall“the“wš¸ãork“is“done“b˜y“this“macro.ަ��‘I±28Ž‘Sª®È\def\TX@endtabularx{%ŽŸ�‘I²De ne–‹´the“ËX‘‹¦²column,‘™Kwith“an“inš¸ãternal“v˜ersion“of“the“Ë\newcolumntype“²command.Ž¡�‘IThe–UUË\expandafter“²commands“enable“Ë\NC@newcol“²to“get“the“Ìexp‘ÿ}'ansion“²ofŽ¡�‘IË\tabularxcolumn{\TX@col@width}–å·²as“its“argumen�¸ãt.‘"íThis“will“b�Ge“the“de nitionŽ¡�‘Iof–UUan“ËX“²column,“as“discussed“in“section“4.ަ��‘I±29Ž‘]ÚÈ\expandafter\TX@newcol\expandafter{\tabularxcolumn{\TX@col@width}}%ŽŸ�‘I²Initialise–º‰the“column“width,‘Öand“the“n•¸ãum“bšGer–º‰of“ËX‘º-²columns.‘¡cThe“n•¸ãum“b˜er–º‰of“ËXŽ¡�‘I²columns–ö‚is“set“to“one,‘ ywhicš¸ãh“means“that“the“initial“coun˜t“will“bšGe“one“to˜o“high,‘ ybutŽ¡�‘Ithis–UUv‘ÿqÇalue“is“decremen�¸ãted“bšGefore“it“is“used“in“the“main“lo˜op.Ž¡�‘XSince–UUv1.02,“switc�¸ãh“the“de nition“of“Ë\verb².ަ��‘I±30Ž‘]ÚÈ\let\verb\TX@verbŽŸ�‘I²Since›tv1.05,‘»Ïsa•¸ãv“e˜the˜v‘ÿqÇalues˜of˜all˜L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX˜coun“ters,‘»Ïthe˜list˜Ë\cl@@ckpt˜²con“tainsŽ¡�‘Ithe–%_names“of“all“the“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“counš¸ãters“that“ha˜v˜e“b�Geen“de ned“so“far.‘áåW‘ÿ*ªe“expandŽ¡�‘IË\setcounter–æ²at“this“p�Goinš¸ãt,‘!Éas“it“results“in“few˜er“tok˜ens“b�Geing“stored“in“Ë\TX@ckpt²,Ž¡�‘Ibut–ˆKthe“actual“resetting“of“the“coun�¸ãters“o�Gccurs“when“Ë\TX@ckpt“²is“expanded“afterŽ¡�‘Ieacš¸ãh–mtrial“run.‘…Actually“since“v1.07,‘2³use“something“equiv‘ÿqÇalen˜t“to“the“expansionŽ¡�‘Iof–±�the“original“de nition“ofË\setcounter²,‘È®so“that“Ëtabularx“²w�¸ãorks“in“conjunctionŽ¡�‘Iwith‘UUËcalc.sty².ަ��‘I±31Ž‘]ÚÈ\def\@elt##1{\global\value{##1}\the\value{##1}\relax}%ŽŸ ��‘I±32Ž‘]ÚÈ\edef\TX@ckpt{\cl@@ckpt}%ŽŽŸ�’ø²5ŽŽŒ‹6z ª� ýs o� ý´��‘I±33Ž‘]ÚÈ\let\@elt\relaxޤ ��‘I±34Ž‘]ÚÈ\TX@old@table=\maxdimenŽ¡��‘I±35Ž‘]ÚÈ\TX@col@width=\TX@targetŽ¡��‘I±36Ž‘]ÚÈ\global\TX@cols=\@neŽ©r‘�‘I²T�¸ãyp�Geout–UUsome“headings“(unless“this“is“disabled).ŽŸ r‘��‘I±37Ž‘]ÚÈ\TX@typeout@Ž¡��‘I±38Ž‘f‘È{\@spaces–¹–Table“Width\@spaces“Column“Width\@spaces“X“Columns}%ަ�‘I²First–UUattempt.‘qÇMo�Gdify“the“ËX“²de nition“to“coun�¸ãt“ËX“²columns.ŽŸ r‘��‘I±39Ž‘]ÚÈ\TX@trial{\def\NC@rewrite@X{%Ž¡��‘I±40Ž’‚êŠÈ\global\advance\TX@cols\@ne\NC@find‘¹–p{\TX@col@width}}}%ަ�‘I²Rep�Geatedly–”zdecrease“column“width“un�¸ãtil“table“is“the“correct“width,‘» or“stops“shrink-ޤ �‘Iing,‘Ošor–N+the“columns“b�Gecome“t•¸ãw“o›N+narro“w.‘odIf˜there˜are˜no˜m“ulticolumn˜en“tries,‘OšthisŽ¡�‘Iwill–UUonly“tak�¸ãe“one“attempt.ŽŸ r‘��‘I±41Ž‘]ÚÈ\loopޤ ��‘I±42Ž‘f‘È\TX@arithŽ¡��‘I±43Ž‘f‘È\ifTX@Ž¡��‘I±44Ž‘f‘È\TX@trial{}%Ž¡��‘I±45Ž‘]ÚÈ\repeatަ�‘I²One–,last“time,‘4Fwith“wš¸ãarnings“bac˜k“on“(see“app�Gendix“D)‘+øuse“Ëtabular*“²to“put“it“inޤ �‘Ia–UUb�Goš¸ãx“of“the“righ˜t“size,“in“case“the“algorithm“failed“to“ nd“the“correct“size.Ž¡�‘XSince–¬Æv1.04,‘Î}lo�Gcally“makš¸ãe“Ë\footnotetext“²sa˜v˜e“its“argumen˜t“in“a“tok˜en“register.Ž¡�‘ISince–²äv1.06,‘ GË\toks@“²conš¸ãtains“the“pream˜ble“spšGeci cation,‘ Gand“p˜ossible“optionalŽ¡�‘Iargumenš¸ãt,–UUas“w˜ell“as“the“table“b•Go“dy‘ÿ*ª.ŽŸ r‘��‘I±46Ž‘]ÚÈ{\let\@footnotetext\TX@ftntext\let\@xfootnotenext\TX@xftntextޤ ��‘I±47Ž‘f‘È\csname‘¹–tabular*\expandafter\endcsname\expandafter\TX@targetŽ¡��‘I±48Ž‘p2È\the\toks@Ž¡��‘I±49Ž‘f‘È\csname‘¹–endtabular*\endcsname}%ަ�‘I²Noš¸ãw–Œšthe“alignmen˜t“is“ nished,‘Úkand“the“Ë}“²has“restored“the“original“meaning“ofޤ �‘IË\@footnotetext–UU²expand“the“register“Ë\TX@ftn“²whic�¸ãh“will“execute“a“series“ofŽ¡�‘IË\footnotetext[�¸hÌnum‘Äc¸iŽ‘¶%Ë]{�¸hÌnote‘À[¸iŽ‘/CË}Ž¡�‘I²commands.‘\W‘ÿ*ªe–Aneed“to“bšGe“careful“ab˜out“clearing“the“register“as“wš¸ãe“ma˜y“b�Ge“insideŽ¡�‘Ia–UUnested“Ëtabularx².ŽŸ r‘��‘I±50Ž‘]ÚÈ\global\TX@ftn\expandafter{\expandafter}\the\TX@ftnަ�‘I²Noš¸ãw–* nish“o “the“Ëtabularx“²en˜vironmen˜t.‘ð Note“that“w˜e“need“Ë\end{tabularx}Ž¡�‘I²here–×¶as“the“Ë\end{tabularx}“²in“the“user's“ le“is“nevš¸ãer“expanded.‘øêNo˜w“use“Ë\TX@Ž¡�‘I²rather–UUthan“Ëtabularx².Ž¡�‘XW‘ÿ*ªe–]‹also“need“to“ nish“o “the“group“started“b�¸ãy“Ë{\ifnum0=`}\fi“²in“the“macroŽ¡�‘IË\tabularx².Ž© r‘��‘I±51Ž‘]ÚÈ\ifnum0=`{\fi}%ŽŸ ��‘I±52Ž‘]ÚÈ\expandafter\end\expandafter{\TX@}}ŽŸW´����‘À$\TX@arithŽŽŽ‘I²Calculate–þ×the“column“width“for“the“next“try‘ÿ*ª,‘$setting“the“ ag“Ë\ifTX@“²to“false“if“theŽ¡�‘IlošGop–UUshould“b˜e“ab˜orted.ަ��‘I±53Ž‘Sª®È\def\TX@arith{%ޤ ��‘I±54Ž‘]ÚÈ\TX@falseŽ¡��‘I±55Ž‘]ÚÈ\ifdim\TX@old@table=\wd\@tempboxaŽŸr‘�‘I²If–ú˜wš¸ãe“ha˜v˜e“reduced“the“column“width,‘#ébut“the“table“width“has“not“c˜hanged,‘#éw˜eޤ �‘Istop– Rthe“lo�Gop,‘Rand“output“the“table“(whicš¸ãh“will“cause“an“o˜v˜er-full“alignmen˜t)“withŽ¡�‘Ithe–UUprevious“v‘ÿqÇalue“of“Ë\TX@col@width².ŽŽŸ�’ø6ŽŽŒ‹Dì ª� ýs o� ý´��‘I±56Ž‘f‘È\TX@col@width=\TX@old@colޤ ��‘I±57Ž‘f‘È\TX@typeout@{Reached–¹–minimum“width,“backing“up.}%Ž¡��‘I±58Ž‘]ÚÈ\elseŽ©�‘I²Otherwise–UUcalculate“the“amounš¸ãt“b˜y“whic˜h“the“curren˜t“table“is“to�Go“wide.ŽŸ��‘I±59Ž‘f‘È\dimen@=\wd\@tempboxaŽ¡��‘I±60Ž‘f‘È\advance\dimen@‘¹–-\TX@targetŽ¡��‘I±61Ž‘f‘È\ifdim\dimen@<\TX@deltaަ�‘I²If–ïèthis“amoun�¸ãt“is“less“than“Ë\TX@delta²,‘VŒstop.‘ A€(Ë\TX@delta“²should“b�Ge“non-zeroŽŸ �‘Iotherwise–UUwš¸ãe“ma˜y“miss“the“target“due“to“rounding“error.)ŽŸ��‘I±62Ž‘p2È\TX@typeout@{Reached‘¹–target.}%Ž¡��‘I±63Ž‘f‘È\elseަ�‘I²Reduce–”âthe“n•¸ãum“b�Ger–”âof“e ectivš¸ãe“ËX‘”Ò²columns“b˜y“one.‘0o(Chec˜king“that“w˜e“do“not“getޤ �‘I0,‘(Fas–this“wš¸ãould“pro�Gduce“an“error“later.)‘_Then“divide“excess“width“b˜y“the“n˜um˜b�GerŽ¡�‘Iof–Güe ectiv�¸ãe“columns,‘J§and“calculate“the“new“column“width.‘mTT‘ÿ*ªemp�Gorarily“store“thisŽ¡�‘Iv‘ÿqÇalue–UU(times“-1)“in“Ë\dimen@².ŽŸ��‘I±64Ž‘p2È\ifnum\TX@cols>\@neޤ ��‘I±65Ž‘yw^È\advance\TX@cols–¹–by“\m@neŽ¡��‘I±66Ž‘p2È\fiŽ¡��‘I±67Ž‘p2È\divide\dimen@–¹–by“\TX@colsŽ¡��‘I±68Ž‘p2È\advance\dimen@–¹–by“-\TX@col@widthŽ¡��‘I±69Ž‘p2È\ifdim–¹–\dimen@“>“\z@ަ�‘I²If–¶Ôthe“new“width“w�¸ãould“bšGe“to˜o“narro�¸ãw,‘Öˆab˜ort“the“lo˜op.‘<òAš¸ãt“the“momen˜t“to�Go“narro˜w,ޤ �‘Imeans–UUless“than“0‘ª®pt!Ž¡�‘XPrior–N�to“v2.03,‘Oßif“the“lošGop“w�¸ãas“ab˜orted“here,‘Oßthe“X‘Ncolumns“w�¸ãere“left“with“theŽ¡�‘Iwidth–VAof“the“previous“run,‘–|but“this“maš¸ãy“mak˜e“the“table“far“to�Go“wide“as“initialŽ¡�‘Iguesses–˜åare“alw•¸ãa“ys–˜åto�Go“big.‘Ÿ'EŽ‘ãxXBo�Gok.ŽŸ��‘I±93Ž‘a×pÈ\let\immediate=\relax\def\write##1##{{\afterassignment}\toks@=}%ަ�‘I²T‘ÿ*ªurn–~Xo “wš¸ãarnings“(see“app�Gendix“D).“Also“prev˜en˜t“them“b�Geing“turned“bac˜k“on“b˜yŽ¡�‘Isetting–UUthe“parameter“names“to“b�Ge“registers.ŽŸ��‘I±94Ž‘f‘È\hbadness=\@M\hfuzz=\maxdimenŽŸ ��‘I±95Ž‘f‘È\let\hbadness=\@tempcnta\let\hfuzz=\@tempdimaަ�‘I²Makš¸ãe–®the“table,‘ÄHand“ nish“the“h˜b�Go˜x.‘|Since“v1.06,‘ÄHË\toks@“²con˜tains“the“pream˜bleŽ¡�‘IspšGeci cation,–UUand“p˜ossible“optional“argumenš¸ãt,“as“w˜ell“as“the“table“b•Go“dy‘ÿ*ª.ޤ��‘I±96Ž‘f‘È\expandafter\tabular\the\toks@ŽŸ ��‘I±97Ž‘f‘È\endtabular}%ަ�‘I²Since–UUv1.05“reset“all“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“counš¸ãters,“b˜y“executing“Ë\TX@ckpt².Ž¡��‘I±98Ž‘]ÚÈ\TX@ckptަ�‘I²Prin�¸ãt–UUsome“statistics.‘qÇAdded“Ë\TX@align“²in“v1.05,“to“line“up“the“columns.Ž¡��‘I±99Ž‘]ÚÈ\TX@typeout@{\@spacesޤ ��‘E�±100Ž‘kJœÈ\expandafter\TX@alignŽ¡��‘E�±101Ž‘yw^È\the\wd\@tempboxa\space\space\space\space\space\@@Ž¡��‘E�±102Ž‘kJœÈ\expandafter\TX@alignŽ¡��‘E�±103Ž‘yw^È\the\TX@col@width\space\space\space\space\space\@@Ž¡��‘E�±104Ž‘kJœÈ\@spaces\the\TX@cols}}ŽŽŸ�’ø²8ŽŽŒ‹ \. ª� ýs o� ý´����‘À$È\TX@alignŽŽŽ‘I²Macro–UUadded“at“v1.05,“to“impro•¸ãv“e–UUthe“prin�¸ãting“of“the“tracing“info.Ž©��‘E�±105Ž‘Sª®È\def\TX@align#1.#2#3#4#5#6#7#8#9\@@{%ޤ ��‘E�±106Ž‘]ÚÈ\ifnum#1<10‘¹–\space\fiŽ¡��‘E�±107Ž‘]ÚÈ\ifnum#1<100‘¹–\space\fiŽ¡��‘E�±108Ž‘]ÚÈ\ifnum#1<\@m\space\fiŽ¡��‘E�±109Ž‘]ÚÈ\ifnum#1<\@M\space\fiŽ¡��‘E�±110Ž‘]ÚÈ#1.#2#3#4#5#6#7#8\space\space}ޤ����‘øf \arraybackslashŽŽŽ‘IË\\‘UU²hac�¸ãk.ަ��‘E�±111Ž‘Sª®È\def\arraybackslash{\let\\=\@arraycr}Ž¡����‘ó­ \tracingtabularxŽŽŽ‘I²Prin�¸ãt–UUstatistics“on“column“and“table“widths.ަ��‘E�±112Ž‘Sª®È\def\tracingtabularx{%ޤ ��‘E�±113Ž‘]ÚÈ\def\TX@typeout{\PackageWarningNoLine{tabularx}}%Ž¡��‘E�±114Ž‘]ÚÈ\def\TX@typeout@##1{\typeout{(tabularx)‘¹–##1}}}ŽŸ����‘ Lø\TX@typeoutŽŽŽ‘I²The–UUdefault“is“to“bšGe“to“b˜e“quietަ��‘E�±115Ž‘Sª®È\let\TX@typeout\@gobbleŽ¡��‘E�±116Ž‘Sª®È\let\TX@typeout@\@gobbleޤ����‘3P\TX@ftnŽŽŽ‘I²A–UUtokš¸ãen“register“for“sa˜ving“fo�Gotnote“texts.ަ��‘E�±117Ž‘Sª®È\newtoks\TX@ftnŽ¡����‘ Lø\TX@ftntextŽŽ���Ÿ �‘“b\TX@xftntextŽŽŽŽŽ‘I²Inside–UUthe“alignmenš¸ãt“just“sa˜v˜e“up“the“fo�Gotnote“text“in“a“tok˜en“register.ަ��‘E�±118Ž‘Sª®È\long\def\TX@ftntext#1{%ޤ ��‘E�±119Ž‘]ÚÈ\edef\@tempa{\the\TX@ftn\noexpand\footnotetextŽ¡��‘E�±120Ž’²*fÈ[\the\csname‘¹–c@\@mpfn\endcsname]}%Ž¡��‘E�±121Ž‘]ÚÈ\global\TX@ftn\expandafter{\@tempa{#1}}}%Ž¡��‘E�±122Ž‘Sª®È\long\def\TX@xftntext[#1]#2{%Ž¡��‘E�±123Ž‘]ÚÈ\global\TX@ftn\expandafter{\the\TX@ftn\footnotetext[#1]{#2}}}ޤ����‘ÙÌ\TX@trial@ftnŽŽŽ‘I²On–UUtrial“runs,“gobble“fo�Gotnote“texts.ަ��‘E�±124Ž‘Sª®È\long\def\TX@trial@ftn#1{}Ž¡�‘X²This–ðlast“section“wš¸ãas“added“at“V‘ÿ*ªersion“1.02.‘^ûPrevious“v˜ersions“do�Gcumen˜ten˜tedޤ �‘Ithe–Âfact“that“Ë\verb“²did“not“w�¸ãork“inside“Ëtabularx²,‘ÝQbut“that“did“not“stop“p�GeopleŽ¡�‘Iusing–ê–it!‘1‰This“usually“put“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“inš¸ãto“an“irreco˜v˜erable“error“p�Gosition,‘æwith“errorŽ¡�‘Imessages–éthat“did“not“men�¸ãtion“the“cause“of“the“error.‘È„The“`p•Go“or–éman's“Ë\verb²'Ž¡�‘I(and–åË\verb*²)“de ned“here“is“based“on“page“382“of“the“T�‘þU>Ÿ'EŽ‘ãxXBo�Gok.‘wxAs“explainedŽ¡�‘Ithere,‘îëdoing–Ð3vš¸ãerbatim“this“w˜a˜y“means“that“spaces“are“not“treated“correctly‘ÿ*ª,‘îëandŽ¡�‘Iso–6Ë\verb*“²maš¸ãy“w˜ell“b�Ge“useless,‘Öho˜w˜ev˜er“I‘!consider“this“section“of“cošGde“to“b˜e“error-Ž¡�‘Ireco•¸ãv“ery‘ÿ*ª,–UUrather“than“a“real“implemenš¸ãtation“of“v˜erbatim.Ž¡�‘XThe––Cmecš¸ãhanism“is“quite“general,‘¦~and“an˜y“macro“whic˜h“w˜an˜ts“to“allo˜w“a“formŽ¡�‘Iof–ÈFË\verb“²to“b�Ge“used“within“its“argumenš¸ãt“ma˜y“Ë\let\verb=\TX@verb².‘BÂ(Making“sureŽ¡�‘Ito–UUrestore“the“real“de nition“later!)Ž¡�‘XË\verb–UU²and“Ë\verb*“²are“sub‘Ž8ject“to“the“follo�¸ãwing“restictions:Ž©����‘U8ä1.ŽŽŽ‘bSpaces–‚ÿin“the“argumenš¸ãt“are“not“read“v˜erbatim,‘­but“ma˜y“bšGe“skipp˜ed“accordingŽ¡�‘bto–UUT�‘þU>Ÿ'EŽ‘ãxX's“usual“rules.ަ����‘U8ä2.ŽŽŽ‘bSpaces–Ð`will“b�Ge“added“to“the“output“after“conš¸ãtrol“w˜ords,‘ê÷ev˜en“if“they“w˜ere“notŽ¡�‘bpresen�¸ãt–UUin“the“input.ŽŽŸ�’ø9ŽŽŒ‹ gV ª� ýs o� ý´����‘U8ä²3.ŽŽŽ‘bUnless–iŸ'EŽ‘ãxX“wš¸ãould“strip“the“outer“braces“from“suc˜h“a“group.‘øäThe“`Ë!²'Ž¡�‘Iwill–UUb�Ge“remo•¸ãv“ed‘UUlater.Ž¡�‘XOriginally›ÊI‘Éõfollo•¸ãw“ed˜Kn“uth,–åñand˜had˜Ë\def\@tempa{##1}²,“ho•¸ãw“ev“er˜this˜did˜notŽ¡�‘Ialloš¸ãw–ŠäË#“²to“app�Gear“in“the“argumen˜t.‘uSo“in“v1.04,‘˜HI‘ŠÖc˜hanged“this“to“to“use“a“tok˜enŽ¡�‘Iregister,›¥xand–•qË\edef².‘2This“allo�¸ãws“Ë#“²app�Gear,˜but“makš¸ães“eac˜h“one“app�Gear“t˜wice!,‘¥xsoŽ¡�‘Ilater–UUwš¸ãe“lo�Gop“through,“replacing“Ë##“²b˜y“Ë#².ޤ��‘E�±130Ž‘Sª®È\def\TX@vb#1{\def\@tempa##1#1{\toks@{##1}\edef\@tempa{\the\toks@}%ŽŸ ��‘E�±131Ž‘f‘È\expandafter\TX@v\meaning\@tempa\\‘¹–\\\ifnum0=`{\fi}}\@tempa!}ަ����‘'¦|\TX@vŽŽŽ‘I²Strip–UUthe“initial“segmen�¸ãt“of“the“Ë\meaning²,“including“the“`Ë!²'“added“earlier.Ž¡��‘E�±132Ž‘Sª®È\def\TX@v#1!{\afterassignment\TX@vfirst\let\@tempa=‘¹–}ަ�‘X²As–ZÜexplained“ab�Go•¸ãv“e›ZÜw“e˜are˜going˜to˜replace˜Ë##˜²pairs˜b“y˜Ë#².‘‚[T‘ÿ*ªo˜do˜this˜w“e˜needޤ �‘Inon-sp�Gecial–Û1Ë#“²tok•¸ãens.‘IMak“e–Û1Ë*“²inš¸ãto“a“parameter“tok˜en“so“that“w˜e“can“de ne“macrosŽ¡�‘Iwith–UUargumenš¸ãts.‘qÇThe“normal“meanings“will“b�Ge“restored“b˜y“the“Ë\endgroup“²later.ŽŸ��‘E�±133Ž‘Sª®È\begingroupޤ ��‘E�±134Ž‘Sª®È\catcode`\*=\catcode`\#Ž¡��‘E�±135Ž‘Sª®È\catcode`\#=12ަ����‘Ž\TX@vfirstŽŽŽ‘I²As–^Îa“spšGecial“case,‘¡,prev•¸ãen“t–^Îthe“ rst“c�¸ãharacter“from“b˜eing“dropp˜ed.‘Ž2This“mak�¸ãesޤ �‘IË\verb*|‘?ý|–˜ò²pro�Gduce“Ë ².›<�Then“call“Ë\TX@v@².˜This“is“slighš¸ãtly“tric˜ky“since“v1.04,‘©Ùas“IŽ¡�‘Iha•¸ãv“e–[što“ensure“that“an“actual“Ë#“²rather“than“a“command“Ë\let“²to“Ë#“²is“passed“on“ifŽ¡�‘Ithe–UU rst“c�¸ãharacter“is“Ë#².ŽŸ��‘E�±136Ž‘Sª®È\gdef\TX@vfirst{%ޤ ��‘E�±137Ž‘]ÚÈ\if\@tempa#%Ž¡��‘E�±138Ž‘f‘È\def\@tempb{\TX@v@#}%ŽŽŸ�’õÿ²10ŽŽŒ‹ s¾ ª� ýs o� ý´��‘E�±139Ž‘]ÚÈ\elseޤ ��‘E�±140Ž‘f‘È\let\@tempb\TX@v@Ž¡��‘E�±141Ž‘f‘È\if\@tempa\space~\else\@tempa\fiŽ¡��‘E�±142Ž‘]ÚÈ\fiŽ¡��‘E�±143Ž‘]ÚÈ\@tempb}Ž©����‘"ìæ\TX@v@ŽŽŽ‘I²Lo�Gop–�through“the“Ë\meaning²,‘R replacing“all“spaces“bš¸ãy“Ë~².‘ÐLIf“the“last“c˜harcter“is“aޤ �‘Ispace–L