[NTG-context] starttabulate questions

Aditya Mahajan adityam at umich.edu
Tue Sep 25 01:52:00 CEST 2007


On Tue, 25 Sep 2007, frantisek holop wrote:

> good evening,
>
> all the examples in the manual use \NC before \NR
> is this a necessity?

Yes.

> what is the logics behind this?
> is it more like an ending to the previous \NC ?

It is for historic reason. Originally, there was table (\starttable) 
which is syntax sugar and some extensions over the TaBlE macro package 
by Michael Wichura. In the TaBlE macro, the rule between the column is 
a column in iteself. So, in table macros

\starttable[|l|l|l|]
  \NC 1 \NC 2 \NC 3 \NC \NR
\stoptable

will expand to something like

\halign{ <preamble> \cr
{
<first column separator> & 1 & <1-2 col sep> & 2 & <2-3> col sep> & 3
& <last col sep> \cr
}

On the other hand, if you needed rules (lines) between the columns, 
you replace \NC by \VC,

\starttable[|l|l|l|]
\VC 1 \VC 2 \VC 3 \VC \NR
\stoptable

In this case, the inter-column separator in the \halign are replaced 
by the appropriate macros for rules. In this case, the last \VC is 
needed to indicate that you want a rule at the end. And if you do not 
want a rule, you need to indicate this by a \NC.

Tabulate started as a mechanism to replace table, so the syntax was 
kept the same. Right now, tabulate does not implement vertical rules, 
so in the context of tabulate, having a last \NC seems redundant. As 
far as I understand, tabulate is supposed to ultimately backward 
compatible with table, and features will be added according to user 
demands or Hans needs.


> \starttabulate[|l|l|l|]
> \NC A. \NC This Perfect Day           \NC Ira Levin           \NC \NR
> \NC B. \NC Opstaan op Zaterdag        \NC Jan Gerhart Toonder \NC \NR
> \NC C. \NC Tot waar zal ik je brengen \NC Anton Koolhaas      \NC \NR
> \NC D. \NC The City And The Stars     \NC Arthur Clarke       \NC \NR
> \stoptabulate
>
>
> please consider the following minimal example:
>
> \starttext
> \starttabulate
> \NC column 1
> \NC
> \input tufte
> \input tufte
> \input tufte
> \NC \NR
> \stoptabulate
>
> \starttabulate
> \NC column 1
> \NC
> \input tufte
> \input tufte
> \NC \NR
> \stoptabulate
> \stoptext
>
> if i don't put something between the two tabulates,
> they behave just like one, as if i didn't seperate them,
> they show up on the same page.  am i missing something?

Why do you expect them to be on different pages? If you want vertical 
space between the tables, you can add a \blank in between the tables.

Aditya


More information about the ntg-context mailing list