From: "Hamid Kamrani" <hamid.kamrani@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Booktabs equivalent in Context
Date: Thu, 9 Aug 2007 01:06:59 -0400 [thread overview]
Message-ID: <a38ba5b30708082206i2e71f01fyabc976cd77d8ef02@mail.gmail.com> (raw)
In-Reply-To: <20070808182353.5z60n2ipesg88s0o@web.mail.umich.edu>
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 <adityam@umich.edu> wrote:
> Quoting Johannes Graumann <johannes_graumann@web.de>:
>
> > 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
___________________________________________________________________________________
next prev parent reply other threads:[~2007-08-09 5:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 21:10 Aditya Mahajan
2007-08-04 7:28 ` Patrick Gundlach
2007-08-06 1:13 ` Aditya Mahajan
2007-08-11 21:05 ` Patrick Gundlach
2007-08-08 12:03 ` Johannes Graumann
2007-08-08 22:23 ` Aditya Mahajan
2007-08-09 5:06 ` Hamid Kamrani [this message]
2007-08-09 6:43 ` Wolfgang Schuster
2007-08-09 7:43 ` Aditya Mahajan
2007-08-09 8:56 ` Wolfgang Schuster
2007-08-09 16:14 ` Aditya Mahajan
2007-08-10 5:44 ` Wolfgang Schuster
2007-08-11 21:05 ` Patrick Gundlach
2007-08-09 16:01 ` Hamid Kamrani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a38ba5b30708082206i2e71f01fyabc976cd77d8ef02@mail.gmail.com \
--to=hamid.kamrani@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).