From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35835 Path: news.gmane.org!not-for-mail From: "Hamid Kamrani" Newsgroups: gmane.comp.tex.context Subject: Re: Booktabs equivalent in Context Date: Thu, 9 Aug 2007 12:01:38 -0400 Message-ID: References: <20070803171006.gn644njnhw88sggg@web.mail.umich.edu> <20070808182353.5z60n2ipesg88s0o@web.mail.umich.edu> <115224fb0708082343j1d43a312r35eb2f81278de524@mail.gmail.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: sea.gmane.org 1186675517 29505 80.91.229.12 (9 Aug 2007 16:05:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Aug 2007 16:05:17 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 09 18:05:06 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 1IJAVK-00070f-Dn for gctc-ntg-context-518@m.gmane.org; Thu, 09 Aug 2007 18:04:54 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E8B8A20248; Thu, 9 Aug 2007 18:04:53 +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 21382-09; Thu, 9 Aug 2007 18:04:53 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 888AB2020B; Thu, 9 Aug 2007 18:01:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 77BF320200 for ; Thu, 9 Aug 2007 18:01:44 +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 21382-01-2 for ; Thu, 9 Aug 2007 18:01:41 +0200 (CEST) Original-Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by ronja.ntg.nl (Postfix) with ESMTP id 7B7891FB7E for ; Thu, 9 Aug 2007 18:01:39 +0200 (CEST) Original-Received: by ug-out-1314.google.com with SMTP id h2so355992ugf for ; Thu, 09 Aug 2007 09:01:38 -0700 (PDT) Original-Received: by 10.78.204.7 with SMTP id b7mr939381hug.1186675298233; Thu, 09 Aug 2007 09:01:38 -0700 (PDT) Original-Received: by 10.78.154.11 with HTTP; Thu, 9 Aug 2007 09:01:38 -0700 (PDT) In-Reply-To: <115224fb0708082343j1d43a312r35eb2f81278de524@mail.gmail.com> Content-Disposition: inline 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:35835 Archived-At: Wolfgang, It is not just a matter of forgetting the NC. When you add that NC then the tabbing and alignment is incorrect for the last column. The rules should not extend beyond the last column and in this case they do. Aditya's formatted correctly but had the wrong syntax. Yours has the right syntax but formats incorrectly. -Hamid On 8/9/07, Wolfgang Schuster wrote: > 2007/8/9, Hamid Kamrani : > > Aditya, > > > > In the example you give with CMID you have only two column preambles > > whereas the table has 3 columns and if one adds the missing preamble > > then one gets an error. Some how your new code breaks the calculation > > for number of columns. > > > > -Hamid > > He forgot only to put a \NC before the \AR. > > The correct code should be > > \starttable[s0|l|l|l|] > \HL[3] > \NC Monat \NC 1965 \NC 1966 \NC\AR > \NC \CMID \NC \CMID \NC \CMID \DR > \NC September \NC 2000 \NC 1700 \NC\AR > \HL[3] > \stoptable > > Wolfgang > > > On 8/8/07, Aditya Mahajan wrote: > > > Quoting Johannes Graumann : > > > > > > > Aditya Mahajan wrote: > > > > > > > >> Hi, > > > >> > > > >> The question of how to get tables equivalent to latex's booktabs > > > >> package has been discussed quite a few times in the past. Booktabs > > > >> package provides (top|mid|bottom)rule commands and a cmidrule command. > > > >> The top and bottom rules are 0.08em thick, the midrule is 0.05em thick, > > > >> and the cmidrules are 0.03em thick. The cmidrules do not extend beyond > > > >> the columns edge. Here is an example of how to do something similar > > > >> using tables in context . > > > >> > > > >> 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? > > > > > > > Hello, > > > > > > > > I'm one of the booktab-equivalent requesters and in my case the request is > > > > motivated by the (sadly German-only) > > > > http://www.ctan.org/tex-archive/info/german/tabsatz/tabsatz.pdf > > > > Please compare examples on pages 4 and 5 for the cmidrule functionality I'm > > > > missing in ConTeXt. The clarity you can give classy looking tables with > > > > trimmed cmidrules is even more evident in the example on page 9. There's > > > > lots of more use of this in the document, but it gets too esoteric to be > > > > easily grasped quickly (IMHO). > > > > > > Here is one attempt, which works correctly. Of course the best solution > > > is to forget about the \omit and set the halign preamble correctly. But > > > I have not been able to figure that out yet. > > > > > > \starttext > > > > > > \def\CMID{\normalTABLEshortrule} > > > > > > \unprotect > > > \def\TableNC > > > {\checkTABLEautorow > > > \nextTABLEgrayline > > > \ifnum\currentTABLEcolumn>\maxTABLEcolumn > > > \setTABLEerror\TABLEmissingrow > > > \handleTABLEerror > > > \else > > > \global\advance\currentTABLEcolumn \plusone > > > \ifnum\currentTABLEcolumn=1\relax > > > \normalTABLEquote > > > \else > > > \fancyTABLEquote > > > \fi > > > \fi} > > > > > > \def\fancyTABLEquote {\unskip\!ttRightGlue&\omit\hskip2em&} % " > > > \protect > > > > > > \setuptables[rulethickness=0.03em] > > > > > > \starttable[s0|l|l|] > > > \HL[3] > > > \NC Monat \NC 1965 \NC 1966 \AR > > > \NC \CMID \NC \CMID \NC \CMID \DR > > > \NC September \NC 2000 \NC 1700 \AR > > > \HL[3] > > > \stoptable > > > > > > \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 > > > ___________________________________________________________________________________ > > > > > ___________________________________________________________________________________ > > 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 > > ___________________________________________________________________________________ > > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ > ___________________________________________________________________________________ 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 ___________________________________________________________________________________