From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: professional looking tables
Date: Thu, 22 Dec 2016 18:53:35 -0800 (PST) [thread overview]
Message-ID: <alpine.OSX.2.02.1612221846570.71817@nqv-znpobbx> (raw)
In-Reply-To: <freemail.20161218191918.42877.1@fmxmldata07.freemail.hu>
On Sun, 18 Dec 2016, Csikos Bela wrote:
> Dear context users:
>
> In latex I could make professional looking tables using booktabs module.
> Using longtable package I could make nice looking multipage tables.
>
> I see that context offers several table environments. Which one of them
> is suitable for making professional (publication quality) tables?
>
> The requirements for such tables are the follows:
>
> - Only horizontal rules are needed
> - Ability to set the rule's thickness for top rule, bottom rule, middle rule
> - Ability to set the distance between rules and table content
> - Ability to set rule length shorter than cell or row width on both left and right sides
> - Ability to set rules for spanning only some of the columns
Natural tables can give the same visual output as booktabs but the only
way to shorten rules is to either use a "fake" column as spacer or use
metapost to draw borders. For simple tables, you could get around this by
being a little creative.
For example, here is the example from the booktabs package with very
little manual tweaking.
\startsetups booktabs
\setupTABLE[frame=off, rulethickness=0.5bp, loffset=1em]
\setupTABLE[column][first][loffset=0em]
\setupTABLE[row][first][topframe=on, rulethickness=1.5bp]
\setupTABLE[row][last] [bottomframe=on, rulethickness=1bp]
\stopsetups
\starttext
\bTABLE[setups=booktabs]
\setupTABLE[column][3][align=flushright]
\bTR[topframe=on]
\bTD[nc=2, align=middle] Item \eTD
\bTD \eTD
\eTR
\bTR[bottomframe=on]
\bTD[topframe=on] Animal \eTD
\bTD[topframe=on] Description \eTD
\bTD Price (\$) \eTD
\eTR
\bTR
\bTD Gnat \eTD
\bTD per gram \eTD
\bTD 13.65 \eTD
\eTR
\bTR
\bTD \eTD
\bTD each \eTD
\bTD 0.01 \eTD
\eTR
\bTR
\bTD Gnu \eTD
\bTD stuffed \eTD
\bTD 92.50 \eTD
\eTR
\bTR
\bTD Emu \eTD
\bTD stuffed \eTD
\bTD 33.33 \eTD
\eTR
\bTR
\bTD Armadillo \eTD
\bTD frozen \eTD
\bTD 8.99 \eTD
\eTR
\eTABLE
\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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2016-12-23 2:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-18 18:19 Csikos Bela
2016-12-18 21:01 ` Pablo Rodriguez
2016-12-22 15:02 ` Csikos Bela
2016-12-22 15:56 ` Hans Hagen
2016-12-22 19:26 ` Csikos Bela
2016-12-23 12:36 ` Csikos Bela
2016-12-30 15:28 ` xtables feature request, (professional looking tables) Csikos Bela
2016-12-23 2:53 ` Aditya Mahajan [this message]
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=alpine.OSX.2.02.1612221846570.71817@nqv-znpobbx \
--to=adityam@umich.edu \
--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).