From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: More table questions
Date: Tue, 22 Sep 2020 16:02:17 -0400 (EDT) [thread overview]
Message-ID: <nycvar.YAK.7.78.908.2009221546050.1537316@nqv-guvaxcnq> (raw)
In-Reply-To: <87pn6dwqp5.fsf@a16n.net>
[-- Attachment #1: Type: text/plain, Size: 1470 bytes --]
On Tue, 22 Sep 2020, Peter Münster wrote:
> On Tue, Sep 22 2020, Aditya Mahajan wrote:
>
> > The same effect is rather easy to achieve when using natural tables as
> > well.
>
> But it fails, when there is only one data-row... :(
Then don't create tables with only one data row :-)
A better solution is to create a dedicate framehandler which draws the bottom frame at half the thickness:
\startuseMPgraphic{booktabs_bottom}
draw bottomboundary OverlayBox withpen pencircle scaled (OverlayLineWidth/2)
withcolor OverlayColor;
setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
\defineoverlay[booktabs_bottom] [\uniqueMPgraphic{booktabs_bottom}]
\installbottomframerenderer{booktabs}{\uniqueMPgraphic{booktabs_bottom}}
\startsetups booktabs
\setupTABLE[each][each][frame=off, rulethickness=1.2bp]
\setupTABLE[row][first][topframe=on, bottomframe=booktabs]
\setupTABLE[row][last] [bottomframe=on]
\setupTABLE[row][first][style=bold]
\stopsetups
\starttext
\startTABLE[setups=booktabs]
\NC Heading 1 \NC Heading 2 \NC Heading 3 \NC \NR
\NC Value 1 \NC Value 2 \NC Value 3 \NC \NR
\NC Value 1 \NC Value 2 \NC Value 3 \NC \NR
\NC Value 1 \NC Value 2 \NC Value 3 \NC \NR
\stopTABLE
\blank[2*line]
\startTABLE[setups=booktabs]
\NC Heading 1 \NC Heading 2 \NC Heading 3 \NC \NR
\NC Value 1 \NC Value 2 \NC Value 3 \NC \NR
\stopTABLE
\stoptext
Aditya
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2020-09-22 20:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 8:03 Denis Maier
2020-09-22 14:31 ` Henning Hraban Ramm
2020-09-22 20:26 ` Denis Maier
2020-09-22 18:55 ` Aditya Mahajan
2020-09-22 19:34 ` Peter Münster
2020-09-22 20:02 ` Aditya Mahajan [this message]
2020-09-22 20:18 ` Denis Maier
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=nycvar.YAK.7.78.908.2009221546050.1537316@nqv-guvaxcnq \
--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).