Hi Hans,
again the stretch option kills the defined
\setupTABLE[column][1][width=1cm,align=left]
\setupTABLE[column][4][width=1cm,align=middle]
(see previous example)
Isn't it possible to define the total width of a table
and the width of some columns (here 1 and 4)
in order to let only the undefined width of column 2 and 3 be
flexible (stretchable)?
Steffen
Hans Hagen
setting the total width is not that complex, (maxwidth is already taken so i use textwidth)
\starttext
\unprotect
\def\dobTABLE[#1]% {\pushTBL \bgroup \ifhmode\kern\zeropoint\fi % blocks \removeunwantedspaces: check this on icare handelingsschema \resetcharacteralign % new \getparameters [\@@tbl\@@tbl] [\c!align={\v!right,\v!broad,\v!high},#1]% \hsize\tbltbltextwidth \processaction [\tbltblsplit] [ \v!yes=>\enableTBLbreaktrue, \v!repeat=>\enableTBLbreaktrue\multipleTBLheadstrue]% \processaction [\tbltblheader] [\v!repeat=>\multipleTBLheadstrue]% \localcolortrue \presetallTABLEparameters \ExpandFirstAfter\processallactionsinset [\tbltbloption] [\v!stretch=>\autoTBLspreadtrue]% \linewidth\tbltblrulethickness % needs to be frozen \dontcomplain \let\currentcol\!!zerocount \let\maximumrowspan\!!plusone \let\maximumcol\currentcol \let\maximumrow\currentcol \def\bTR{\dodoubleempty\parseTR}% \def\bTD{\dodoubleempty\parseTD}% \def\bTH{\dodoubleempty\parseTH}% \def\bTN{\dodoubleempty\parseTN}}
\setupTABLE[\c!textwidth=\hsize]
\protect
\bTABLE[option=stretch,textwidth=10cm] \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bbbbbbbbbbbbbbbb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \eTABLE
\blank
\bTABLE[option=stretch] \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cccccccccccccccc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \eTABLE
\stoptext
Hans
Steffen Wolfrum wrote:
Hi Luigi,
luigi.scarso
wrote: Steffen Wolfrum wrote:
For example:
I'd like to set a "total width" that fits both tables without specifying also the 2nd and 3rd column:
\setupTABLE[totalwidth=10cm,offset=5pt]
\setupTABLE[column][1][width=1cm,align=left] \setupTABLE[column][5][width=1cm,align=middle] ....
Try
\bTABLE[option=stretch] \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bbbbbbbbbbbbbbbb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \eTABLE
\blank
\bTABLE[option=stretch] \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cccccccccccccccc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \eTABLE
luigi
Try yourself:
\setupTABLE[offset=5pt] \setupTABLE[column][1][width=1cm,align=left] \setupTABLE[column][4][width=1cm,align=middle]
\bTABLE[option=stretch] \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bbbbbbbbbbbbbbbb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \eTABLE
\blank
\bTABLE[option=stretch] \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cccccccccccccccc \eTD\bTD dd \eTD\eTR \bTR\bTD aa \eTD\bTD bb \eTD\bTD cc \eTD\bTD dd \eTD\eTR \eTABLE
Not much left of those defined spaces, right?
Steffen