From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/72503 Path: news.gmane.org!not-for-mail From: "Christian" Newsgroups: gmane.comp.tex.context Subject: Re: Table cell colo(u)rs Date: Thu, 17 Nov 2011 11:35:18 +0100 Message-ID: <015e01cca514$9b00c670$d1025350$@gmx.de> References: <4EC3C6D7.3040305@bespokespaces.com> 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: dough.gmane.org 1321526142 14166 80.91.229.12 (17 Nov 2011 10:35:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Nov 2011 10:35:42 +0000 (UTC) To: , "'mailing list for ConTeXt users'" Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 17 11:35:36 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RQzJg-0001mi-0e for gctc-ntg-context-518@m.gmane.org; Thu, 17 Nov 2011 11:35:36 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F3F46CB0BD; Thu, 17 Nov 2011 11:35:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AKTGbe9aVDsy; Thu, 17 Nov 2011 11:35:32 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 51F88CB0EF; Thu, 17 Nov 2011 11:35:32 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CE51BCB0BD for ; Thu, 17 Nov 2011 11:35:30 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bxsCI2fzGWex for ; Thu, 17 Nov 2011 11:35:28 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 0A0D8CB0EF for ; Thu, 17 Nov 2011 11:35:27 +0100 (CET) Original-Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with SMTP id pAHAZRe1003157 for ; Thu, 17 Nov 2011 11:35:27 +0100 Original-Received: (qmail invoked by alias); 17 Nov 2011 10:35:26 -0000 Original-Received: from f053214075.adsl.alicedsl.de (EHLO christiandelux) [78.53.214.75] by mail.gmx.net (mp038) with SMTP; 17 Nov 2011 11:35:26 +0100 X-Authenticated: #61879178 X-Provags-ID: V01U2FsdGVkX1/zJ0xDpbzz+0ZL65beTc6SSsoXMT3bfwdIUiwWIa PQgcAVZrkYgvwn In-Reply-To: <4EC3C6D7.3040305@bespokespaces.com> X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQI5LVt7l8VICN9Z3ngacDJwAMS8UpTXzVxw Content-Language: de X-Y-GMX-Trusted: 0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.165.64.22; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cFWazr0Q - 4f9939b6e5e6 - 20111117 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:72503 Archived-At: > Hello, > > I am trying to do a simple cell background shading in a table using the > example at the wiki: > > http://wiki.contextgarden.net/Table > > Unfortunately, I get an "Undefined control sequence ..." error: > > ! Undefined control sequence. > > system > tex > error on line 4 in file tmp.tex: Undefined control > sequence ... > > 1 \setupcolors[state=start] > 2 \starttable[|l|l|] > 3 \HL > 4 >> \BL[1]\SR > 5 \NC Command \NC Meaning \NC\SR > 6 \HL > 7 \NC \tex{NC} \NC next column \NC\FR > 8 \NC \tex{NR} \NC next row \NC\LR > 9 \HL > 10 \CL[green]\SR > 11 \NC \tex{AR} \NC automatic row\NC\SR > 12 \HL > 13 \stoptable > 14 > > \BL > > l.4 \BL > [1]\SR > ? > > Any suggestions? Well, not for this particular problem, it happens here, too. But may I suggest the use of "natural tables" (aka TALBES)? I find them way more comfortable to use and the code is cleaner (to my eyes, at least). This should get you going: % Start of file \setupTABLE[r][first][foregroundstyle={\ss \bf \color[white]},background=color,backgroundcolor=blue,framecolor=blue] \setupTABLE[column][each][leftframe=off,rightframe=off] \setupTABLE[column][1][align=right] \setupTABLE[column][2][alignmentcharacter={.},aligncharacter=yes,align=middle,style={\color[red]}] \chardef\characteralignmentmode=2 \starttext \startplacetable[title=test] \bTABLE \bTR \bTH Category \eTH \bTH Data entry \eTH \eTR \bTR \bTD First \eTD \bTD 35.12 \eTD \eTR \bTR \bTD[background=color,backgroundcolor=red] Second \eTD \bTD 5.014 \eTD \eTR \bTR[background=color,backgroundcolor=gray] \bTD Total \eTD \bTD 110 \eTD \eTR \eTABLE \stopplacetable \stoptext % End of file More information: http://wiki.contextgarden.net/TABLE Many more examples: http://www.pragma-ade.com/general/manuals/enattab.pdf Cheers! ___________________________________________________________________________________ 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 ___________________________________________________________________________________