From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Side-by-Side tables
Date: Wed, 24 Aug 2011 13:25:30 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.02.1108241319140.3016@nqv-gnoyrg> (raw)
In-Reply-To: <CAFP+xFKMBRAjHPPvtz17K-BxsfyKx21OiujowLnsGEe+ZntyVg@mail.gmail.com>
On Wed, 24 Aug 2011, Troy Henderson wrote:
>>
>> have you tried the 'inbetween' or 'distance' parameter from
>> \setupcombinations?
>>
>
> Well what I would like would be for the following to work
>
> \setupcombinations[before={\hfill},inbetween={\hfill},after={\hfill}]
>
> but it doesn't do what I would like for it to do.
before and after go on the top and the bottom of the combination block,
inbetween goes between the figure/table and the caption.
One possibility to simplify measurement is to abuse figurecollections
(Please wikify).
\startbuffer[table:1]
\startTABLE
\NC A \NC B \NC C \NC D \NC \NR
\NC A \NC B \NC C \NC D \NC \NR
\NC A \NC B \NC C \NC D \NC \NR
\NC A \NC B \NC C \NC D \NC \NR
\stopTABLE
\stopbuffer
\startbuffer[table:2]
\startTABLE
\NC A \NC B \NC C \NC D \NC E \NC F \NC \NR
\NC A \NC B \NC C \NC D \NC E \NC F \NC \NR
\NC A \NC B \NC C \NC D \NC E \NC F \NC \NR
\NC A \NC B \NC C \NC D \NC E \NC F \NC \NR
\NC A \NC B \NC C \NC D \NC E \NC F \NC \NR
\NC A \NC B \NC C \NC D \NC E \NC F \NC \NR
\NC A \NC B \NC C \NC D \NC E \NC F \NC \NR
\NC A \NC B \NC C \NC D \NC E \NC F \NC \NR
\stopTABLE
\stopbuffer
% Ideally, we should be able to place the figure definitions inside the
% \startexternalfigurecollection, but that macro starts a group, so the
% figure definitions inside are lost.
\useexternalfigure[one][table:1][method=buffer]
\useexternalfigure[two][table:2][method=buffer]
\startexternalfigurecollection[tables]
\useexternalfigure[dummy][one]
\useexternalfigure[dummy][two]
\stopexternalfigurecollection
\definemeasure
[sidebyside]
[\the\dimexpr\hsize/2
- \externalfigurecollectionmaxwidth{tables}/2
- \externalfigurecollectionminwidth{tables}/2]
\definecombination[sidebyside]
[distance=\measure{sidebyside},
location=middle]
\starttext
\showframe
\placetable
[here,nonumber]{Side by side tables}
\startcombination[sidebyside][2*1]
{\externalfigure[one]}{(a)}
{\externalfigure[two]}{(b)}
\stopcombination
\stoptext
@Hans: Can we also have totalheight and totalwidth as parameters of figure
combinations (is relatively easy to implement)?
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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2011-08-24 17:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 11:56 Troy Henderson
2011-08-24 12:10 ` Peter Rolf
2011-08-24 12:16 ` Troy Henderson
2011-08-24 12:35 ` Peter Rolf
2011-08-24 12:41 ` Troy Henderson
2011-08-24 17:25 ` 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.LNX.2.02.1108241319140.3016@nqv-gnoyrg \
--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).