ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: captions in float combinations
Date: Sun, 8 Sep 2013 15:56:25 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.02.1309081553590.5125@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <96971F8A-CC8B-4E23-9210-9C206DDADB33@gmail.com>

On Sun, 8 Sep 2013, Robert Blackstone wrote:

>
> On 8 sep. 2013, at 17:01,  Marco Patzer <lists@homerow.info wrote:
>
>>
>> On 2013?09?08 Robert Blackstone wrote:
>>
>>> In my project I have all figure captions located above the figure.
>>> How can I move also these subcaptions to the top, to a position
>>> just below the main caption?
>>
>> As far as I can see, this is not supported by the combination
>> mechanism because the captions in combinations are not implemented
>> using the float captions mechanism.
>>
>> What you can do instead, is using a float caption and a float
>> combination, which will respect the global caption setups.
>>
>> \useMPlibrary [dum]
>>
>> \definefloat
>>  [combinationfloat]
>>  [combinationfloats]
>>  [figure]
>>
>> \setupcaption
>>  [combinationfloat]
>>  [number=no]
>>
>> \setupcaptions
>>  %% [location=bottom]
>>  [location=top]
>>
>> \starttext
>>  \startplacefigure [title=Foobar]
>>    \startfloatcombination [2*2]
>>      \startplacecombinationfloat [title=alpha] \externalfigure \stopplacecombinationfloat
>>      \startplacecombinationfloat [title=beta]  \externalfigure \stopplacecombinationfloat
>>      \startplacecombinationfloat [title=gamma] \externalfigure \stopplacecombinationfloat
>>      \startplacecombinationfloat [title=delta] \externalfigure \stopplacecombinationfloat
>>    \stopfloatcombination
>>  \stopplacefigure
>> \stoptext
>>
>> Marco
>
> Hi Marco,
>
> Thanks for your solution. It took me a while to harmonize your new float with my other floats in my document setups. These are all placed on the left side of the page and that caused yor float to move almost off the page.
> So I added:
>
> \setupfloat[combinationfloat][location=middle,spacebefore=medium,spaceafter=medium,sidespacebefore=medium,sidespaceafter=medium]
>
> and now it works beautifully.
>
> There is, however, another complication which makes that unfortunately I cannot use your solution "out of the box" in all situations.
> The paired figures in my particular project are often of different size, in particular of different height, (but small enough to be placed side by side).
> The author wants not only the figure captions at the top, but also the figures themselves.
> I did not mention this complication because, a) I had found a hack to place both figures at the top, and b) I had not expected that the solution for the problem I posted would be a new type of float instead of a new type of combination.
>
> So now the captions are at the top but the figures are not. (Law of Conservation of Misery)

You can try playing around with the location parameter of \externalfigure. 
For example:

\useMPlibrary [dum]

\definefloat
   [combinationfloat]
   [combinationfloats]
   [figure]

\setupcaption
   [combinationfloat]
   [number=no]

\setupcaptions
   %% [location=bottom]
   [location=top]

\starttext
   filler text \input ward
   \startplacefigure [title=Foobar]
     \startfloatcombination [4*1]
       \startplacecombinationfloat [title=alpha] \externalfigure[dummy][width=1cm, height=2cm, location=top] \stopplacecombinationfloat
       \startplacecombinationfloat [title=beta]  \externalfigure[dummy][width=1cm, height=3cm, location=top] \stopplacecombinationfloat
       \startplacecombinationfloat [title=gamma] \externalfigure[dummy][width=1cm, height=4cm, location=top] \stopplacecombinationfloat
       \startplacecombinationfloat [title=delta] \externalfigure[dummy][width=1cm, height=5cm, location=top] \stopplacecombinationfloat
     \stopfloatcombination
   \stopplacefigure

   More text \input knuth
\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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2013-09-08 19:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.57.1378652473.18665.ntg-context@ntg.nl>
2013-09-08 19:01 ` Robert Blackstone
2013-09-08 19:56   ` Aditya Mahajan [this message]
2013-09-08 19:58   ` Marco Patzer
     [not found] <mailman.61.1378710738.18665.ntg-context@ntg.nl>
2013-09-09 20:50 ` Robert Blackstone
2013-09-09 21:45   ` Aditya Mahajan
2013-09-08  7:32 Robert Blackstone
2013-09-08 10:33 ` Marco Patzer

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.1309081553590.5125@ybpnyubfg.ybpnyqbznva \
    --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).