From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35676 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Booktabs equivalent in Context Date: Sun, 5 Aug 2007 21:13:25 -0400 (EDT) Message-ID: References: <20070803171006.gn644njnhw88sggg@web.mail.umich.edu> 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: sea.gmane.org 1186365346 20058 80.91.229.12 (6 Aug 2007 01:55:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2007 01:55:46 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Aug 06 03:55:44 2007 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 1IHrop-00082y-8h for gctc-ntg-context-518@m.gmane.org; Mon, 06 Aug 2007 03:55:39 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AF3481FA86; Mon, 6 Aug 2007 03:55:38 +0200 (CEST) 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 19805-02; Mon, 6 Aug 2007 03:55:37 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1E5EB1FEF2; Mon, 6 Aug 2007 03:13:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0E7501FEF2 for ; Mon, 6 Aug 2007 03:13:33 +0200 (CEST) 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 15045-03-14 for ; Mon, 6 Aug 2007 03:13:29 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by ronja.ntg.nl (Postfix) with ESMTP id C14481FE67 for ; Mon, 6 Aug 2007 03:13:28 +0200 (CEST) Original-Received: FROM aditya.hsd1.il.comcast.net. (c-24-13-160-16.hsd1.il.comcast.net [24.13.160.16]) BY hellskitchen.mr.itd.umich.edu ID 46B675B6.46DAD.19814 ; 5 Aug 2007 21:13:26 -0400 In-Reply-To: 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:35676 Archived-At: On Sat, 4 Aug 2007, Patrick Gundlach wrote: > Hello Aditya, > >> To me this looks exactly similar to the example in the booktabs manual. >> Am I missing something, or is it fair to say that context can generate >> booktabs like tables? > > > Any way to shorten the rule \DL[2]? IMO this is critical for nicely > set tables. > > But the rest looks very, very good! So many thanks for that! > > I once had to typeset a huge table, with huge in the sense of 'lots of > rows and lots of columns' on a A4 single page. This would not have > been possible without the help of \cmidrule which is a rule between > two rows but restricted to a number of columns and with the ability to > trim the rule on the left, the right or both sides. > > > Gnu stuffed > -------- ----------- > Emu stuffed > > So the first rule should be aligned left with the other rules in that > table, the two rules must not touch each other (this is the trick to > avoid the ugly vertical rules!) In booktabs speak this would be > \cmidrule(r){1-1} and \cmidrule(l){2-2}. (booktabs.pdf on a LaTeX > installation). Ah. Thank you for the explaination. I now understand the need for cmidrule. It should be possible to get something like this with TaBlE, but in the absense of the original PCTEX manual, I have not been able to understand how to set tables. thrd-tab.tex says that you can actually control the tokens for columns using alternate vrules, but I have not been able to get it to work. > Is there something like \arraystretch(?) which is a factor that every > vertical whitespace in a table is multiplied with? This way you can > increase/decrease the height of a table without big trouble. If you are happy with an integer scaling, and do not use \Lower (it may be possible to do this more correctly, with distance={{a}{b}{c}}, and action for unknown set so that we call \OpenUp{a}{b}\def\LOW{\Lower{c}}). \unprotected\def\defineTABLEunits {\processaction [\@@tidistance] [ \v!none=>\OpenUp00\def\LOW{\Lower6 }, \v!small=>\OpenUp00\def\LOW{\Lower6 }, % == baseline \v!medium=>\OpenUp11\def\LOW{\Lower7 }, \v!big=>\OpenUp22\def\LOW{\Lower8 }, \v!unknown=>\expandafter\OpenUp\@@tidistance]%AM: Added \doifelse\@@tidistance\v!none {\chardef\TABLErowfactor\zerocount} {\chardef\TABLErowfactor\plustwo }} \setuptables[rulethickness=0.03em] \startbuffer \starttable[s0|l|i2l|i2r|] \HL[3] \NC \Use2[c]{Item} \NC \NC \AR \DL[2] \DC \DR \NC Animal \NC Description \NC Price (\$) \NC \AR \HL[2] \NC Gnat \NC per gram \NC 13.65 \NC \AR \NC \NC each \NC 0.01 \NC \AR \NC Gnu \NC stuffed \NC 92.50 \NC \AR \NC Emu \NC stuffed \NC 33.33 \NC \AR \NC Armadillo \NC frozen \NC 8.99 \NC \AR \HL[3] \stoptable \stopbuffer \starttext \getbuffer \setuptables[distance=big] \getbuffer \setuptables[distance={{1}{10}}] \getbuffer \setuptables[distance=55] \getbuffer \stoptext 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 ___________________________________________________________________________________