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 On 8/8/07, Aditya Mahajan <[EMAIL PROTECTED]> wrote: > Quoting Johannes Graumann <[EMAIL PROTECTED]>: > > > 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 <http://wiki.contextgarden.net/Table#Booktabs>. > >> > >> 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 ___________________________________________________________________________________