From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38427 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: nested tables? Date: Wed, 2 Jan 2008 13:55:16 -0500 (EST) Message-ID: References: <200801021622.30681.yvon.henel@orange.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1199300161 20015 80.91.229.12 (2 Jan 2008 18:56:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Jan 2008 18:56:01 +0000 (UTC) To: Yvon Henel , mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 02 19:56:17 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1JA8lE-0006f5-JK for gctc-ntg-context-518@m.gmane.org; Wed, 02 Jan 2008 19:56:16 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 81D1D1FC9B; Wed, 2 Jan 2008 19:55:38 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08662-04-4; Wed, 2 Jan 2008 19:55:30 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E101D1FBC1; Wed, 2 Jan 2008 19:55:29 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AE9721FBC1 for ; Wed, 2 Jan 2008 19:55:27 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 08662-04-3 for ; Wed, 2 Jan 2008 19:55:22 +0100 (CET) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.161]) by ronja.ntg.nl (Postfix) with ESMTP id 82C421FB4B for ; Wed, 2 Jan 2008 19:55:22 +0100 (CET) Original-Received: FROM adi-laptop.local (cpe-65-185-20-71.cinci.res.rr.com [65.185.20.71]) BY tombraider.mr.itd.umich.edu ID 477BDE15.A4520.19235 ; 2 Jan 2008 13:55:18 -0500 X-X-Sender: adityam@adi-laptop In-Reply-To: <200801021622.30681.yvon.henel@orange.fr> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:38427 Archived-At: On Wed, 2 Jan 2008, Yvon Henel wrote: > Hello again, > > I would like to nest a table inside a table, something like this: > > \starttable[|c|c|] > \NC {\bf ATout Choeur} \NC > {\starttable[|c|] > \NC Number 2008--1\FR > \NC january 2008\LR > \stoptable}\MR > \NC {\tfa Something} \NC \LR > \stoptable > > but 1/ I would like the top of the first cell of the first row to be aligned > with the top of the second one (which contains the nested table); > 2/ it seems that it does not work when the layout is set up > with "grid=yes" > > If the answer to the second question is "Effectively, it can't work in such a > layout", what could be a way of obtaining what I want? tables (starttables...stoptables) cannot be nested. Table does some automatic checking of number of columns, and that counting is global. So, nested tables messes the count. Here is an example: \starttext \starttable[|c|c|] \NC \the\currentTABLEcolumn/ \the\maxTABLEcolumn\NC {\starttable[|c|] \NC \the\currentTABLEcolumn/ \the\maxTABLEcolumn\NC \AR \NC test \NC \AR \stoptable} \NC \AR \NC \the\currentTABLEcolumn/ \the\maxTABLEcolumn\NC \NC \AR \stoptable \stoptext > As always, any hint would be greatly appreciated You can always use multicolumns, and give the impression that you are using multiple tables. For example \starttable[|c|c|c|] \NC col 1 \NC nested 1 \NC nested 2 \NC \AR \NC \NC nested 1 \NC nested 2 \NC \AR \NC col 1 \NC \TWO{ col 2 } \NC \AR \stoptable This, of course, will not work if you want nested tables with different number of columns in different rows. In that case, TABLE macros (bTABLE .. eTABLE) would be the way to go. 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________