From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/73989 Path: news.gmane.org!not-for-mail From: Brian Landy Newsgroups: gmane.comp.tex.context Subject: xtable formatting issues Date: Wed, 18 Jan 2012 23:30:45 -0500 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1326947515 5425 80.91.229.12 (19 Jan 2012 04:31:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2012 04:31:55 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 19 05:31:51 2012 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 1RnjfC-0002zG-B0 for gctc-ntg-context-518@m.gmane.org; Thu, 19 Jan 2012 05:31:50 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 139A3CB201; Thu, 19 Jan 2012 05:31:49 +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 FTmMH1oIcpXi; Thu, 19 Jan 2012 05:31:48 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 56A62CB1FA; Thu, 19 Jan 2012 05:31:46 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E7ABFCB1FA for ; Thu, 19 Jan 2012 05:31:44 +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 hIa9PWGZlXJX for ; Thu, 19 Jan 2012 05:31:30 +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 DD807CB1F8 for ; Thu, 19 Jan 2012 05:31:30 +0100 (CET) Original-Received: from vms173013pub.verizon.net (vms173013pub.verizon.net [206.46.173.13]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q0J4VT3d017116 for ; Thu, 19 Jan 2012 05:31:30 +0100 Original-Received: from percy.landy.cx ([unknown] [72.89.177.246]) by vms173013.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LY100B9X37KLBM0@vms173013.mailsrvcs.net> for ntg-context@ntg.nl; Wed, 18 Jan 2012 22:30:57 -0600 (CST) Original-Received: from localhost (localhost [127.0.0.1]) by percy.landy.cx (Postfix) with ESMTP id 65A10C6320D for ; Wed, 18 Jan 2012 23:30:56 -0500 (EST) Original-Received: from percy.landy.cx ([127.0.0.1]) by localhost (percy.landy.cx [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sf0l+ehOeG28 for ; Wed, 18 Jan 2012 23:30:46 -0500 (EST) Original-Received: from landlord.landy.cx (landlord.landy.cx [192.168.170.20]) by percy.landy.cx (Postfix) with ESMTPSA id 45404C63201 for ; Wed, 18 Jan 2012 23:30:46 -0500 (EST) X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=206.46.173.13; country=US; latitude=38.0000; longitude=-97.0000; http://maps.google.com/maps?q=38.0000,-97.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0cGngvus1 - 2cedd4d2d196 - 20120119 (trained as not-spam) 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:73989 Archived-At: Hi, I=92ve been experimenting a bit with converting some natural tables int= o xtables and ran across two issues. The first has to do with nested xtables and settings. In particular, if yo= u attempt to set a cell=92s width on the internal table using \setupxtable = the option is lost. In the below example testtable1 doesn=92t format prope= rly when nested; testtable2 does. I also included some font and color exam= ples to show they cascade more as I=92d expect (the outer table=92s setting= s are used unless overridden by the inner table). The second thing I noticed is that attempting to set the font via foregroun= dstyle only works when done vie \setupxtable. Attempting to assign this di= rectly to the cell causes compile errors (the commented table in the exampl= e). Maybe I should be setting the font some other way? (this is how I alw= ays did it with natural tables). Finally, does xtable have something like the aligncharacter mechanism in na= tural tables? Thanks, Brian \starttext \setupxtable[wd1][background=3Dcolor,backgroundcolor=3Dyellow,width=3D1.0in] \setupxtable[wd2][background=3Dcolor,backgroundcolor=3Dgreen,width=3D2.0in] \setupxtable[fnit][foregroundstyle=3D{\switchtobodyfont[modern,ss]\it}] \setupxtable[fnbf][foregroundstyle=3D{\switchtobodyfont[modern,ss]\bf}] \startbuffer[testtable1] \startxtable \startxrow \startxcell[fnbf] bold \stopxcell \startxcell[wd1] 1in? \stopxce= ll \stopxrow \stopxtable \stopbuffer \startbuffer[testtable2] \startxtable \startxrow \startxcell[fnbf] bold \stopxcell \startxcell[background=3Dcolor= ,backgroundcolor=3Dyellow,width=3D1.0in] 1in? \stopxcell \stopxrow \stopxtable \stopbuffer \getbuffer[testtable1] \getbuffer[testtable2] \startxtable \startxrow \startxcell[fnit] \getbuffer[testtable1] \stopxcell \startxcell[= wd2] \getbuffer[testtable1] \stopxcell \stopxrow \startxrow \startxcell[fnit] \getbuffer[testtable2] \stopxcell \startxcell[= wd2] \getbuffer[testtable2] \stopxcell \stopxrow \stopxtable % below fails, foregroundstyle set in this fashion must be done through \se= tuptable %\startxtable %\startxrow \startxcell[foregroundstyle=3D{\switchtobodyfont[modern,rm]\it}= ] italic \stopxcell \stopxrow %\stopxtable \stoptext ___________________________________________________________________________= ________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________