On Mon, 3 Sep 2012, Michael Rogers wrote:
On Sep 2, 2012, at 12:24 PM, Aditya Mahajan wrote:
Is it possible to stretch the widths of each column in natural TABLEs,
so that the widths are in a certain propotion? For example, suppose I
have a table with three columns and I want to set the width of the
first column to a fixed amount, and split the remaining space between
columns two and three in a 1:2 ratio.
If you know the width of the first column and total width, then you can use
arithmetic, as in the example below. But perhaps this already occurred to you,
and you were wondering if the widths and stretching can be handled
automatically -- the short answer is I don't know.
\starttext
\setupTABLE[c][1][width={2cm}]
\setupTABLE[c][2][width={\dimexpr(\textwidth-2cm)/3\relax}]
\setupTABLE[c][3][width={\dimexpr(\textwidth-2cm)* 2 / 3\relax}]
\startTABLE
\NC One \NC Two \NC Three \NC\NR
\NC A \NC B \NC C \NC\NR
\stopTABLE
\stoptext
Apart from being hard to maintain, this works well if I know the width of
a cell in advance. But most of the time I want something the width of the
fixed column to be determined using width=fit option, so I cannot
precompute the width of other columns.
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________