ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Number of rows in tables
@ 2005-09-21  9:02 Otared Kavian
  2005-09-21 13:45 ` Otared KAVIAN
  0 siblings, 1 reply; 3+ messages in thread
From: Otared Kavian @ 2005-09-21  9:02 UTC (permalink / raw)


Hi everyone,

In the process of learning the table mechanism I followed the  
discussions on the list, but could not figure out whether it is  
possible to create a table with a given number of rows. For instance,  
is it possible to add something to Mojca's solution for cells with  
backgrounds (see below) to have a table with (for example) 15 rows?  
Something like
\setupTable[number_of_rows=15,number_of_columns=4]

Thanks for your insight: OK

%%%%%%%%%%%%%%%%%%%% Mojca's solution
\setupcolors[state=start]
\starttext
% row 1
\setupTABLE[r][1] 
[style=bold,background=color,backgroundcolor=green,align=middle]
\setupTABLE[c][1][width=3cm] % column 1
\setupTABLE[c][3][width=2.75cm] % column 3
\setupTABLE[c][4][width=7cm]
\bTABLE
\bTR
     \bTD Name \eTD
     \bTD Location \eTD
     \bTD Date \eTD
     \bTD Signature \eTD
\eTR
\bTR
     \bTD\strut \eTD
     \bTD \eTD
     \bTD \eTD
     \bTD \eTD
\eTR
\eTABLE
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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

* Re: Number of rows in tables
  2005-09-21  9:02 Number of rows in tables Otared Kavian
@ 2005-09-21 13:45 ` Otared KAVIAN
  2005-09-21 17:32   ` Willi Egger
  0 siblings, 1 reply; 3+ messages in thread
From: Otared KAVIAN @ 2005-09-21 13:45 UTC (permalink / raw)


Hi everyone,

Actually the solution to my own question is quite simple... :-)
The appropriate use of \dorecurse does the thing:

\setupcolors[state=start]
\starttext
% row 1
\setupTABLE[r][1][%
style=bold,background=color,backgroundcolor=green,align=middle]
\setupTABLE[c][1][width=3cm] % column 1
\setupTABLE[c][3][width=2.75cm] % column 3
\setupTABLE[c][4][width=7cm]
\bTABLE
\bTR
	\bTD Name \eTD
	\bTD Location \eTD
	\bTD Date \eTD
	\bTD Signature \eTD
\eTR
\dorecurse{25}{ %we repeat here 25 times creating a row
\bTR
	\bTD\strut \eTD
	\bTD \eTD
	\bTD \eTD
	\bTD \eTD
\eTR}
\eTABLE
\stoptext

On 9/21/05, Otared Kavian <otared@gmail.com> wrote:
> Hi everyone,
>
> In the process of learning the table mechanism I followed the
> discussions on the list, but could not figure out whether it is
> possible to create a table with a given number of rows. For instance,
> is it possible to add something to Mojca's solution for cells with
> backgrounds (see below) to have a table with (for example) 15 rows?
> Something like
> \setupTable[number_of_rows=15,number_of_columns=4]
>
> Thanks for your insight: OK
>
> %%%%%%%%%%%%%%%%%%%% Mojca's solution
> \setupcolors[state=start]
> \starttext
> % row 1
> \setupTABLE[r][1]
> [style=bold,background=color,backgroundcolor=green,align=middle]
> \setupTABLE[c][1][width=3cm] % column 1
> \setupTABLE[c][3][width=2.75cm] % column 3
> \setupTABLE[c][4][width=7cm]
> \bTABLE
> \bTR
>      \bTD Name \eTD
>      \bTD Location \eTD
>      \bTD Date \eTD
>      \bTD Signature \eTD
> \eTR
> \bTR
>      \bTD\strut \eTD
>      \bTD \eTD
>      \bTD \eTD
>      \bTD \eTD
> \eTR
> \eTABLE
> \stoptext
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
>

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

* Re: Re: Number of rows in tables
  2005-09-21 13:45 ` Otared KAVIAN
@ 2005-09-21 17:32   ` Willi Egger
  0 siblings, 0 replies; 3+ messages in thread
From: Willi Egger @ 2005-09-21 17:32 UTC (permalink / raw)


Hi Otared,

I just started reading your previous mail and started to type you your 
own solution.
So that  is in your case the best way to do it!

Willi

Otared KAVIAN wrote:

>Hi everyone,
>
>Actually the solution to my own question is quite simple... :-)
>The appropriate use of \dorecurse does the thing:
>
>\setupcolors[state=start]
>\starttext
>% row 1
>\setupTABLE[r][1][%
>style=bold,background=color,backgroundcolor=green,align=middle]
>\setupTABLE[c][1][width=3cm] % column 1
>\setupTABLE[c][3][width=2.75cm] % column 3
>\setupTABLE[c][4][width=7cm]
>\bTABLE
>\bTR
>	\bTD Name \eTD
>	\bTD Location \eTD
>	\bTD Date \eTD
>	\bTD Signature \eTD
>\eTR
>\dorecurse{25}{ %we repeat here 25 times creating a row
>\bTR
>	\bTD\strut \eTD
>	\bTD \eTD
>	\bTD \eTD
>	\bTD \eTD
>\eTR}
>\eTABLE
>\stoptext
>
>On 9/21/05, Otared Kavian <otared@gmail.com> wrote:
>  
>
>>Hi everyone,
>>
>>In the process of learning the table mechanism I followed the
>>discussions on the list, but could not figure out whether it is
>>possible to create a table with a given number of rows. For instance,
>>is it possible to add something to Mojca's solution for cells with
>>backgrounds (see below) to have a table with (for example) 15 rows?
>>Something like
>>\setupTable[number_of_rows=15,number_of_columns=4]
>>
>>Thanks for your insight: OK
>>
>>%%%%%%%%%%%%%%%%%%%% Mojca's solution
>>\setupcolors[state=start]
>>\starttext
>>% row 1
>>\setupTABLE[r][1]
>>[style=bold,background=color,backgroundcolor=green,align=middle]
>>\setupTABLE[c][1][width=3cm] % column 1
>>\setupTABLE[c][3][width=2.75cm] % column 3
>>\setupTABLE[c][4][width=7cm]
>>\bTABLE
>>\bTR
>>     \bTD Name \eTD
>>     \bTD Location \eTD
>>     \bTD Date \eTD
>>     \bTD Signature \eTD
>>\eTR
>>\bTR
>>     \bTD\strut \eTD
>>     \bTD \eTD
>>     \bTD \eTD
>>     \bTD \eTD
>>\eTR
>>\eTABLE
>>\stoptext
>>%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>>
>>    
>>
>_______________________________________________
>ntg-context mailing list
>ntg-context@ntg.nl
>http://www.ntg.nl/mailman/listinfo/ntg-context
>  
>

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

end of thread, other threads:[~2005-09-21 17:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-21  9:02 Number of rows in tables Otared Kavian
2005-09-21 13:45 ` Otared KAVIAN
2005-09-21 17:32   ` Willi Egger

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