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; 6+ 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] 6+ 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; 6+ 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] 6+ messages in thread

* Re: Re: total with of TABLE ?
  2005-04-22 20:51 ` Hans Hagen
@ 2005-04-23  6:48   ` Peter Münster
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Münster @ 2005-04-23  6:48 UTC (permalink / raw)


On Fri, 22 Apr 2005, Hans Hagen wrote:

> setting the total width is not that complex, (maxwidth is already taken
> so i use textwidth)

The problem is, that the other settings get lost:
\setupTABLE[column][1][width=1cm,align=left]
\setupTABLE[column][5][width=1cm,align=middle]

Peter

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

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

* Re: Re: total with of TABLE ?
  2005-04-22 15:39 Steffen Wolfrum
  2005-04-22 16:35 ` luigi.scarso
@ 2005-04-22 20:51 ` Hans Hagen
  2005-04-23  6:48   ` Peter Münster
  1 sibling, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2005-04-22 20:51 UTC (permalink / raw)


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][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"?
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
> 
> 
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------

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

* Re: Re: total with of TABLE ?
  2005-04-22 15:39 Steffen Wolfrum
@ 2005-04-22 16:35 ` luigi.scarso
  2005-04-22 20:51 ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: luigi.scarso @ 2005-04-22 16:35 UTC (permalink / raw)


Steffen Wolfrum wrote:

> Not much left of those defined spaces, right?
>
Sorry, now I see.
I had made the pdf before postings, but I had not understood well it.
(option=stretch seem related with \hsize;
I must admit that when I 'm typeset tables, I always fix dimension, to 
avoid surprises:
I never use stretch.)

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

core-ntb has changed from last time I saw it, and some things are not so 
clear to me now: I 'll try to investigate.

luigi

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

* Re: Re: total with of TABLE ?
  2005-04-21 13:46 Steffen Wolfrum
@ 2005-04-21 16:41 ` Peter Münster
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Münster @ 2005-04-21 16:41 UTC (permalink / raw)


On Thu, 21 Apr 2005, Steffen Wolfrum wrote:

> I want to DEFINE the total with of a TABLE
> 
> But what is the keyword for this purpose with \setupTABLE?

This has already been asked here in the list, without any response, so I
believe it's a missing feature. When you find a possibility, it would be
nice to add it to the http://contextgarden.net/Tables_Overview
Cheers, Peter

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

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

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

Thread overview: 6+ 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-22 15:39 Steffen Wolfrum
2005-04-22 16:35 ` luigi.scarso
2005-04-22 20:51 ` Hans Hagen
2005-04-23  6:48   ` Peter Münster
2005-04-21 13:46 Steffen Wolfrum
2005-04-21 16:41 ` Peter Münster

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).