ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: total with of TABLE ?
@ 2005-04-22 14:08 Steffen Wolfrum
  2005-04-22 14:51 ` luigi.scarso
  0 siblings, 1 reply; 14+ messages in thread
From: Steffen Wolfrum @ 2005-04-22 14:08 UTC (permalink / raw)


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]


\bTABLE
\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
\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


Steffen

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Re: total with of TABLE ?
  2005-04-22 14:08 total with of TABLE ? Steffen Wolfrum
@ 2005-04-22 14:51 ` luigi.scarso
  0 siblings, 0 replies; 14+ messages in thread
From: luigi.scarso @ 2005-04-22 14:51 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
@ 2005-04-23  7:25 Steffen Wolfrum
  0 siblings, 0 replies; 14+ messages in thread
From: Steffen Wolfrum @ 2005-04-23  7:25 UTC (permalink / raw)


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 <pragma@wxs.nl> wrote:

>  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 <luigi.scarso@logosrl.it> 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
@ 2005-04-22 15:39 Steffen Wolfrum
  0 siblings, 0 replies; 14+ messages in thread
From: Steffen Wolfrum @ 2005-04-22 15:39 UTC (permalink / raw)


Hi Luigi,


luigi.scarso <luigi.scarso@logosrl.it> 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][5][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

P.S.
And what has your proposal to do with the idea of setting a "total width"?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
@ 2005-04-22 13:52 Steffen Wolfrum
  0 siblings, 0 replies; 14+ messages in thread
From: Steffen Wolfrum @ 2005-04-22 13:52 UTC (permalink / raw)


luigi.scarso <luigi.scarso@logosrl.it> wrote:

>  Hans Hagen wrote:
>
>  > Hi,
>  >
>  > I'm fighting deadlines right now, but later i'll try to get a look at
>  > the current table thread (maybe someone can summarize the problem)
>  >
>  > Hans
...
>
>  So the problem seem to be
>  "Can I set the total width of a TABLE using a macros like
>  \setupTABLE[tablewidth=10cm] ?"
...
>  luigi


Yes, this is what I was/am looking for:
Setting up the width of an entire table.

(Without having to specify the width of columns or cells.)

Steffen

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
  2005-04-22 10:11 ` Duncan Hothersall
@ 2005-04-22 10:27   ` luigi.scarso
  0 siblings, 0 replies; 14+ messages in thread
From: luigi.scarso @ 2005-04-22 10:27 UTC (permalink / raw)


Duncan Hothersall wrote:

>If you want your TABLE to find natural column widths to fit the content,
>use [option=stretch] on the \bTABLE command. (NB it doesn't work as an
>option to \setupTABLE, only on the actual \bTABLE.)
>
>Then, assuming you don't need splitting over pages, you can set your
>TABLE inside a vbox to define its width. (If you do need splitting, try
>putting the TABLE into a textbackground - with no background color set
>unless you want it - and set the width and/or margins of that?)
>
>Hope that helps.
>  
>
Many thanks !
(I start from \ifautoTBLspread inside core-ntb but after 30secs it comes 
your answer..)

luigi

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
       [not found] <20050422100003.61A93127E9@ronja.ntg.nl>
@ 2005-04-22 10:11 ` Duncan Hothersall
  2005-04-22 10:27   ` luigi.scarso
  0 siblings, 1 reply; 14+ messages in thread
From: Duncan Hothersall @ 2005-04-22 10:11 UTC (permalink / raw)


Luigi wrote:

> \SetTableToWidth{10cm} \starttable[|c|c|c|]...\stoptable set width to
> 10 cm, but if I  don't care about cell I can have an overfull box.
> 
> So the problem seem to be "Can I set the total width of a TABLE using
> a macros like \setupTABLE[tablewidth=10cm] ?"
> 
> To solve this problem, I usually set every cell width using 
> \setupTABLE[x][n][width=..];
> 
> 
> But with \setupTABLE[tablewidth=...] I will  avoid to specify every
> single cell width, and the TABLE will find the right dimensions.
> 
> I will look into core-ntb.tex.
> 
> luigi

If you want your TABLE to find natural column widths to fit the content,
use [option=stretch] on the \bTABLE command. (NB it doesn't work as an
option to \setupTABLE, only on the actual \bTABLE.)

Then, assuming you don't need splitting over pages, you can set your
TABLE inside a vbox to define its width. (If you do need splitting, try
putting the TABLE into a textbackground - with no background color set
unless you want it - and set the width and/or margins of that?)

Hope that helps.

Duncan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
  2005-04-22  7:30       ` luigi.scarso
@ 2005-04-22  9:35         ` luigi.scarso
  0 siblings, 0 replies; 14+ messages in thread
From: luigi.scarso @ 2005-04-22  9:35 UTC (permalink / raw)



Hans Hagen wrote:

> Hi,
>
> I'm fighting deadlines right now, but later i'll try to get a look at 
> the current table thread (maybe someone can summarize the problem)
>
> Hans
>
\SetTableToWidth{10cm}
\starttable[|c|c|c|]...\stoptable
set width to 10 cm, but if I  don't care about cell I can have an 
overfull box.

So the problem seem to be
"Can I set the total width of a TABLE using a macros like 
\setupTABLE[tablewidth=10cm] ?"

To solve this problem, I usually set every cell width using
\setupTABLE[x][n][width=..];


But with \setupTABLE[tablewidth=...]
I will  avoid to specify every single cell width,
and the TABLE will find the right dimensions.

I will look into core-ntb.tex.

luigi

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
  2005-04-21 19:17     ` Peter Münster
@ 2005-04-22  7:30       ` luigi.scarso
  2005-04-22  9:35         ` luigi.scarso
  0 siblings, 1 reply; 14+ messages in thread
From: luigi.scarso @ 2005-04-22  7:30 UTC (permalink / raw)


Peter Münster wrote:

>Do you know, if this is possible with TABLE:
>
>\starttext
>\SetTableToWidth{10cm}
>\starttable[|c|c|c|]
>\HL
>\VL xxxxxxxxxxxxxxx \VL xxxxxxx \VL x \VL\AR
>\HL
>\stoptable
>\stoptext
>
>Cheers, Peter
>  
>
Hmm, I change a little your code to better understand it

\starttext
\SetTableToWidth{10cm}
\setbox100=\vbox{\starttable[|c|c|c|]
\HL
\VL xxxxxxxxxxxxxxx  xxxxxxxxxxxxxxx \VL xxxxxxx xxxxxxx \VL x x \VL\AR
\HL
\stoptable}
\starttyping
\SetTableToWidth{10cm}
\setbox100=\vbox{%
\starttable[|c|c|c|]
\HL
\VL xxxxxxxxxxxxxxx  xxxxxxxxxxxxxxx \VL xxxxxxx xxxxxxx \VL x x \VL\AR
\HL
\stoptable}
\stoptyping

\type{\wd100=}{\tt \PtToCm{\wd100}}\par
\type{\ruledvbox{\unvbox100}:}\par
\ruledvbox{\unvbox100}
\stoptext

and I see on log
Overfull \hbox (11.63779pt too wide) in paragraph at lines 14--14
[][]\*12pttttf* \VL[] []xxxxxxxxxxxxxxx[] [][] []xxxxxxxxxxxxxxx[] 
[]\VL[] []xx
xxxxx[] []xxxxxxx[] []\VL[] []x[] []x[] []\VL\AR

If I fix table width, I must care about cell content to avoid overfull hbox;
so fix table width is useless, because I have already calculate by 
fixing cell content.

I will look into natural table to see something similar to \SetTableToWidth




luigi

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
  2005-04-21 17:42   ` luigi.scarso
@ 2005-04-21 19:17     ` Peter Münster
  2005-04-22  7:30       ` luigi.scarso
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Münster @ 2005-04-21 19:17 UTC (permalink / raw)


On Thu, 21 Apr 2005, luigi.scarso wrote:

> luigi.scarso wrote:
> 
> > (x=0.25 in your example, because you have 4 columns:
> > so you have
> > \setupTABLE[x][width=0.25\textwidth]
> > )
> 
> Of course this setup a TABLE with four columns of equal width and total 
> width =\textwidth;
> For different width :
> \setupTABLE[x][1][width=0.2\textwidth]
> \setupTABLE[x][2][width=0.25\textwidth]
> \setupTABLE[x][3][width=0.25\textwidth]
> \setupTABLE[x][4][width=0.3\textwidth]

Do you know, if this is possible with TABLE:

\starttext
\SetTableToWidth{10cm}
\starttable[|c|c|c|]
\HL
\VL xxxxxxxxxxxxxxx \VL xxxxxxx \VL x \VL\AR
\HL
\stoptable
\stoptext

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
  2005-04-21 11:27 ` luigi.scarso
@ 2005-04-21 17:42   ` luigi.scarso
  2005-04-21 19:17     ` Peter Münster
  0 siblings, 1 reply; 14+ messages in thread
From: luigi.scarso @ 2005-04-21 17:42 UTC (permalink / raw)


luigi.scarso wrote:

> (x=0.25 in your example, because you have 4 columns:
> so you have
> \setupTABLE[x][width=0.25\textwidth]
> )

Of course this setup a TABLE with four columns of equal width and total 
width =\textwidth;
For different width :
\setupTABLE[x][1][width=0.2\textwidth]
\setupTABLE[x][2][width=0.25\textwidth]
\setupTABLE[x][3][width=0.25\textwidth]
\setupTABLE[x][4][width=0.3\textwidth]


luigi

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
@ 2005-04-21 13:46 Steffen Wolfrum
  0 siblings, 0 replies; 14+ messages in thread
From: Steffen Wolfrum @ 2005-04-21 13:46 UTC (permalink / raw)


... sorry, it should not read *determine*, but *define* !!


I want to DEFINE the total with of a TABLE

But what is the keyword for this purpose with \setupTABLE?


Steffen



>Date: Thu, 21 Apr 2005 12:47:46 +0200
>To: ntg-context@ntg.nl
>From: Steffen Wolfrum <context@st.estfiles.de>
>Subject: total with of TABLE ?
>Cc:
>Bcc:
>X-Attachments:
>
>Hi,
>
>a quite basic question, nevertheless I couldn'T find an answer:
>
>How do I determine the total with of a TABLE?
>
>I though it should be ...
>
>\setupTABLE[width=\textwidth]
>
>\bTABLE
>\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 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 cc \eTD \bTD dd \eTD \eTR
>\bTR \bTD aa \eTD \bTD bb \eTD \bTD cc \eTD \bTD dd \eTD \eTR
>\eTABLE
>
>... but this means that all column's INDIVIDUAL width=\textwidth !
>
>But what about the TOTAL width - regardless of the individual column's width?
>
>Steffen

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: total with of TABLE ?
  2005-04-21 10:47 Steffen Wolfrum
@ 2005-04-21 11:27 ` luigi.scarso
  2005-04-21 17:42   ` luigi.scarso
  0 siblings, 1 reply; 14+ messages in thread
From: luigi.scarso @ 2005-04-21 11:27 UTC (permalink / raw)


Steffen Wolfrum wrote:

> Hi,
>
> a quite basic question, nevertheless I couldn'T find an answer:
>
> How do I determine the total with of a TABLE?
>
> I though it should be ...
>
> \setupTABLE[width=\textwidth]
>
> \bTABLE
> \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 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 cc \eTD \bTD dd \eTD \eTR
> \bTR \bTD aa \eTD \bTD bb \eTD \bTD cc \eTD \bTD dd \eTD \eTR
> \eTABLE
>
> ... but this means that all column's INDIVIDUAL width=\textwidth !
>
> But what about the TOTAL width - regardless of the individual column's 
> width?
>
With \setbox:
\setbox100=\vbox{%
\setupTABLE[...]
\bTABLE...\eTABLE%
}
ht=\the\ht100  ,  dp=\the\dp100 ,  wd= \the\wd100 
and you can determine the dimensions of your table.

But I think you need to setup x dimension, so

\setupTABLE[x][width=x\textwidth]

where x = 1/number_of_columns
(x=0.25 in your example, because you have 4 columns:
so you have
\setupTABLE[x][width=0.25\textwidth]
)

luigi

^ permalink raw reply	[flat|nested] 14+ messages in thread

* total with of TABLE ?
@ 2005-04-21 10:47 Steffen Wolfrum
  2005-04-21 11:27 ` luigi.scarso
  0 siblings, 1 reply; 14+ messages in thread
From: Steffen Wolfrum @ 2005-04-21 10:47 UTC (permalink / raw)


Hi,

a quite basic question, nevertheless I couldn'T find an answer:

How do I determine the total with of a TABLE?

I though it should be ...

\setupTABLE[width=\textwidth]

\bTABLE
\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 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 cc \eTD \bTD dd \eTD \eTR
\bTR \bTD aa \eTD \bTD bb \eTD \bTD cc \eTD \bTD dd \eTD \eTR
\eTABLE

... but this means that all column's INDIVIDUAL width=\textwidth !

But what about the TOTAL width - regardless of the individual column's width?

Steffen

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2005-04-23  7:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-22 14:08 total with of TABLE ? Steffen Wolfrum
2005-04-22 14:51 ` luigi.scarso
  -- strict thread matches above, loose matches on Subject: below --
2005-04-23  7:25 Steffen Wolfrum
2005-04-22 15:39 Steffen Wolfrum
2005-04-22 13:52 Steffen Wolfrum
     [not found] <20050422100003.61A93127E9@ronja.ntg.nl>
2005-04-22 10:11 ` Duncan Hothersall
2005-04-22 10:27   ` luigi.scarso
2005-04-21 13:46 Steffen Wolfrum
2005-04-21 10:47 Steffen Wolfrum
2005-04-21 11:27 ` luigi.scarso
2005-04-21 17:42   ` luigi.scarso
2005-04-21 19:17     ` Peter Münster
2005-04-22  7:30       ` luigi.scarso
2005-04-22  9:35         ` luigi.scarso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).