ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Steffen Wolfrum <context@st.estfiles.de>
Subject: Re: total with of TABLE ?
Date: Sat, 23 Apr 2005 09:25:44 +0200	[thread overview]
Message-ID: <a06210200be8fa6fcbf47@[62.134.76.108]> (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

             reply	other threads:[~2005-04-23  7:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-23  7:25 Steffen Wolfrum [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-04-22 15:39 Steffen Wolfrum
2005-04-22 14:08 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='a06210200be8fa6fcbf47@[62.134.76.108]' \
    --to=context@st.estfiles.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).