ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Side-by-Side tables
@ 2011-08-24 11:56 Troy Henderson
  2011-08-24 12:10 ` Peter Rolf
  0 siblings, 1 reply; 6+ messages in thread
From: Troy Henderson @ 2011-08-24 11:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 657 bytes --]

I am trying to place two tables side-by-side one another with equal spacing
between the margin and each table and between tables.  That is, I would like
the layout to be like

--- A --- B ---

where A and B are tables and --- represents an equal amount of spacing on
the left of table A, between tables A and B, and on the right of table B.

At this point, I've been able to place A and B immediately beside one
another using \startcombination[2*1] ... \stopcombination, but this doesn't
give me the horizontal spacing between the tables that I would like.

I would appreciate any help in getting the layout that I am looking for.

Thanks in advance,

Troy

[-- Attachment #1.2: Type: text/html, Size: 710 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Side-by-Side tables
  2011-08-24 11:56 Side-by-Side tables Troy Henderson
@ 2011-08-24 12:10 ` Peter Rolf
  2011-08-24 12:16   ` Troy Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Rolf @ 2011-08-24 12:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 24.08.2011 13:56, schrieb Troy Henderson:
> I am trying to place two tables side-by-side one another with equal
> spacing between the margin and each table and between tables.  That is,
> I would like the layout to be like
> 
> --- A --- B ---
> 
> where A and B are tables and --- represents an equal amount of spacing
> on the left of table A, between tables A and B, and on the right of table B.
> 
> At this point, I've been able to place A and B immediately beside one
> another using \startcombination[2*1] ... \stopcombination, but this
> doesn't give me the horizontal spacing between the tables that I would like.
>
have you tried the 'inbetween' or 'distance' parameter from
\setupcombinations?

http://wiki.contextgarden.net/Reference/en/setupcombinations

Best wishes, Peter

> I would appreciate any help in getting the layout that I am looking for.
> 
> Thanks in advance,
> 
> Troy
> 
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Side-by-Side tables
  2011-08-24 12:10 ` Peter Rolf
@ 2011-08-24 12:16   ` Troy Henderson
  2011-08-24 12:35     ` Peter Rolf
  2011-08-24 17:25     ` Aditya Mahajan
  0 siblings, 2 replies; 6+ messages in thread
From: Troy Henderson @ 2011-08-24 12:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 275 bytes --]

>
> 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.

Troy

[-- Attachment #1.2: Type: text/html, Size: 494 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Side-by-Side tables
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Rolf @ 2011-08-24 12:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 24.08.2011 14:16, schrieb Troy Henderson:
>     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}]
>
I looked into the ConTeXt manual (p229[259]) and 'distance' is used for
the horizontal distance between objects.
You can try '\hss' for the vertical distance (imo less problematic than
\hfill). If it all fails, do it yourself. Measure the two table widths
with boxes and calculate the offset.

> but it doesn't do what I would like for it to do.
> 
> Troy
> 
> 
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Side-by-Side tables
  2011-08-24 12:35     ` Peter Rolf
@ 2011-08-24 12:41       ` Troy Henderson
  0 siblings, 0 replies; 6+ messages in thread
From: Troy Henderson @ 2011-08-24 12:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 8 bytes --]

Thanks!

[-- Attachment #1.2: Type: text/html, Size: 12 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Side-by-Side tables
  2011-08-24 12:16   ` Troy Henderson
  2011-08-24 12:35     ` Peter Rolf
@ 2011-08-24 17:25     ` Aditya Mahajan
  1 sibling, 0 replies; 6+ messages in thread
From: Aditya Mahajan @ 2011-08-24 17:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-24 17:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-24 11:56 Side-by-Side tables 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 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).