ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Florian Wobbe <Florian.Wobbe@awi.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: three more table questions
Date: Mon, 11 Apr 2011 13:42:46 +0200	[thread overview]
Message-ID: <051AC704-B893-49D6-9383-4CBCFDD59746@awi.de> (raw)
In-Reply-To: <3982E723-57BA-475E-90C7-F9070CB36EB7@googlemail.com>

>> 3) Consider this example:
>> 
>> \bTABLE[option=stretch]
>> \setupTABLE[frame=off,offset=0pt]
>> \bTABLEhead
>> \bTR[bottomframe=on] \bTD Col1 \eTD \bTD Col2 \eTD \bTD Col3 \eTD \bTD Col4 \eTD \eTR
>> \eTABLEhead
>> \bTABLEbody
>> \dorecurse{5}{\bTR \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD this is a long entry \eTD \eTR}
>> \eTABLEbody
>> \eTABLE
>> 
>> Is it possible to auto-stretch only the first three columns, so that "this is a long entry" is always aligned to the right margin? All columns should stay flushleft.
> 
> You can exclude columns from stretching when you set a width, e.g. \setupTABLE[column][last][width=4cm,align=flushright]

Thanks again for your suggestions! Still I have problems with the last column, which should be flushleft, exactly as wide as the containing text, and still aligned to the right page margin (the frame in this case).

I experimented:

\framed{
\bTABLE[option=stretch]
\setupTABLE[frame=off,offset=0pt]
\setupTABLE[column][last][width=2mm] % here is the difference
\bTABLEhead
\bTR[bottomframe=on] \bTD Col1 \eTD \bTD Col2 \eTD \bTD Col3 \eTD \bTD Col4 \eTD \eTR
\eTABLEhead
\bTABLEbody
\dorecurse{5}{\bTR \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD \blackrule[height=5pt, width=30mm] \eTD \eTR}
\eTABLEbody
\eTABLE}

\framed{
\bTABLE[option=stretch]
\setupTABLE[frame=off,offset=0pt]
\setupTABLE[column][last][width=30mm] % here is the difference
\bTABLEhead
\bTR[bottomframe=on] \bTD Col1 \eTD \bTD Col2 \eTD \bTD Col3 \eTD \bTD Col4 \eTD \eTR
\eTABLEhead
\bTABLEbody
\dorecurse{5}{\bTR \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD \blackrule[height=5pt, width=30mm] \eTD \eTR}
\eTABLEbody
\eTABLE}

In this case I know the last column width (30mm) but the output is unpredictable.

In case I don't know the text width, is there a way to get a dummy width equal to \settowidth (latex)?

Florian

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2011-04-11 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-11 10:44 Florian Wobbe
2011-04-11 10:53 ` Wolfgang Schuster
2011-04-11 11:42   ` Florian Wobbe [this message]
2011-04-11 13:02     ` Aditya Mahajan
2011-04-11 13:18       ` Florian Wobbe

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=051AC704-B893-49D6-9383-4CBCFDD59746@awi.de \
    --to=florian.wobbe@awi.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).