From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Re: total with of TABLE ?
Date: Fri, 22 Apr 2005 22:51:09 +0200 [thread overview]
Message-ID: <426963BD.4070004@wxs.nl> (raw)
In-Reply-To: <a06210205be8ec9c81216@[62.134.76.108]>
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
-----------------------------------------------------------------
next prev parent reply other threads:[~2005-04-22 20:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-22 15:39 Steffen Wolfrum
2005-04-22 16:35 ` luigi.scarso
2005-04-22 20:51 ` Hans Hagen [this message]
2005-04-23 6:48 ` Peter Münster
-- strict thread matches above, loose matches on Subject: below --
2005-04-22 14:08 Steffen Wolfrum
2005-04-22 14:51 ` luigi.scarso
2005-04-21 13:46 Steffen Wolfrum
2005-04-21 16:41 ` Peter Münster
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=426963BD.4070004@wxs.nl \
--to=pragma@wxs.nl \
--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).