From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/48098 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Simplified input for natural tables Date: Sun, 8 Mar 2009 20:26:52 +0100 Message-ID: <115224fb0903081226r738a5286v7c91e71ac364955@mail.gmail.com> References: <1C61EC31-CF0E-4A26-9EA9-2B26C14116CD@gmail.com> <49B3F93F.5080707@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1236540470 1311 80.91.229.12 (8 Mar 2009 19:27:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Mar 2009 19:27:50 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Mar 08 20:29:06 2009 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 1LgOgL-0001B1-3j for gctc-ntg-context-518@m.gmane.org; Sun, 08 Mar 2009 20:29:05 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 80AA31FB49; Sun, 8 Mar 2009 20:27:40 +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 07216-05-5; Sun, 8 Mar 2009 20:27:04 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 98FB41FB1F; Sun, 8 Mar 2009 20:27:04 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E7A831FB1F for ; Sun, 8 Mar 2009 20:27:02 +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 07216-05-4 for ; Sun, 8 Mar 2009 20:26:53 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by ronja.ntg.nl (Postfix) with ESMTP id 7161C1FADC for ; Sun, 8 Mar 2009 20:26:53 +0100 (CET) Original-Received: from mail-bw0-f165.google.com (mail-bw0-f165.google.com [209.85.218.165]) by filter2-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n28JQqV1029619 for ; Sun, 8 Mar 2009 20:26:52 +0100 Original-Received: by bwz9 with SMTP id 9so1004860bwz.2 for ; Sun, 08 Mar 2009 12:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=D4UDEC1J64kg3yNr6mi01h3WiOov4ZaAaC/nw21XwKI=; b=IWYsjU58ECGycGsN8JCoA5V5mScOszCqD603kFihm5fvb7pfR26lOpUF5UhcOm4JdF 0mX0oj91pDiuJqjisCqMnwO4pepLhJw5v2Xp6Ibunp9NJ4MF3QyW0YPZmb+cUFYi8rbO XsTF6stwxs7vzRC0hOHC7pmfYcyGD86T5j6KM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=qWAf88fpZCEk7ROqJFQl5aLJrUOneQoB5CChoNxjDOS8y4tB/SOYSTBARPssGpv+zA 2iuviAXKd+FmhIIaQW5c/XEdgPj/9lWsaj4wrLLVSO/KuD/SUIOZAr9+xgMXuqKY5bNx 30hMbPPgHh5SFdu9K0Z5dHmIkwAP2Jlt16ALw= Original-Received: by 10.223.112.130 with SMTP id w2mr3851538fap.65.1236540412102; Sun, 08 Mar 2009 12:26:52 -0700 (PDT) In-Reply-To: <49B3F93F.5080707@wxs.nl> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.218.165; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 190307585 - 2c198f379098 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:48098 Archived-At: On Sun, Mar 8, 2009 at 5:58 PM, Hans Hagen wrote: > Aditya Mahajan wrote: >> >> On Sun, 8 Mar 2009, Wolfgang Schuster wrote: >> >>> Hi Hans, >>> >>> natural tables are perfect to create tables with a fixed size for the >>> cells but the syntax requires sometimes a lot of typing for small conte= nt and >>> takes to many lines of code in the document. > > less code and more efficient too ... can you test this? > > \def\startTABLE > =A0{\dosingleempty\dostartTABLE} > > \def\dostartTABLE[#1]% > =A0{\bgroup > =A0 \bTABLE[#1]% > =A0 \let\NC\doTABLENC > =A0 \let\NR\doTABLENR > =A0 \let\bTR\relax > =A0 \let\bTD\relax > =A0 \let\bTH\relax > =A0 \let\bTN\relax} > > \def\stopTABLE > =A0{\eTABLE > =A0 \egroup} > > \newconditional\inTABLEnc > > \unexpanded\def\doTABLENR > =A0{\eTR > =A0 \setfalse\inTABLEnc} > > \unexpanded\def\doTABLENC > =A0{\futurelet\next\dodoTABLENC} > > \def\dodoTABLENC > =A0{\ifx\next\doTABLENR \else > =A0 =A0 \expandafter\dododoTABLENC > =A0 \fi} > > \long\def\dododoTABLENC#1\NC > =A0{\ifconditional\inTABLEnc\else\settrue\inTABLEnc\parseTR[][]\fi > =A0 \parseTD[][]#1\eTD\NC} Can you change this to \long\def\dododoTABLENC#1\NC {\ifconditional\inTABLEnc\else\settrue\inTABLEnc\parseTR[][]\fi \dodoubleempty\parseTD#1\eTD\NC} I want to be able to give argument with \NC too, it's important for me to be able to use spanned columns/rows in the simple form. Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________