ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Jan Tosovsky" <j.tosovsky@email.cz>
To: "'mailing list for ConTeXt users'" <ntg-context@ntg.nl>
Subject: Re: Centering the last line in combination subcaptions
Date: Sat, 8 Feb 2014 12:22:55 +0100	[thread overview]
Message-ID: <42032.8601998792$1391858624@news.gmane.org> (raw)
In-Reply-To: <D34A06EB-B1B2-423F-B8CD-110A234FF951@gmail.com>

On 2014-02-08 Wolfgang Schuster wrote:
> 
> > I haven't find any better way to extend the caption width than that
> > negative value for narrowed text. It works, but that empty space above 
> > looks weird
> 
> You have to force a certain width for your images because the width
> of the text space depends on the width of the images. You can use
> \framed (instead of loffset/roffset you can also set a fixed width) or
> \simplealignedbox to set the width of the images.
> 
> \setupexternalfigures[location=default]
> 
> \defineframed[CombinationBox][frame=off,offset=none,loffset=3cm,roffset
> =3cm]
> 
> \starttext
> 
> \startplacefigure[location={force,none}]
>   \startcombination[nx=1,ny=2,align={last,hz,hanging},style=\itx]
>     % first image
>     \startcontent
> 
> %\simplealignedbox{11cm}{middle}{\externalfigure[cow][width=5cm]}
> 	  \CombinationBox{\externalfigure[cow][width=5cm]}
> 	\stopcontent
> 	\startcaption
> 	  \input{ward}
> 	\stopcaption
> 	% second image
>     \startcontent
> 
> %\simplealignedbox{11cm}{middle}{\externalfigure[cow][width=5cm]}
> 	  \CombinationBox{\externalfigure[cow][width=5cm]}
> 	\stopcontent
> 	\startcaption
> 	  \input{ward}
> 	\stopcaption
>   \stopcombination
> \stopplacefigure
> 
> \stoptext

Thanks a lot, it is much simpler! I also like that \start \stop structure
which makes the code more clear.

Just for future reference: CombinationBox extends the current image width
with the fixed value. When different image widths are used in your document,
the caption width varies as well. To keep the consistency within the
document I've chosen that simplealignedbox instead. 

Jan

___________________________________________________________________________________
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:[~2014-02-08 11:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <008201cf0356$ccebf400$66c3dc00$@tosovsky@email.cz>
2014-02-07 21:25 ` Jan Tosovsky
     [not found] ` <016201cf244b$29d9f210$7d8dd630$@tosovsky@email.cz>
2014-02-07 23:07   ` Jan Tosovsky
     [not found]   ` <52f56744.c8310f0a.7ef8.ffffb680SMTPIN_ADDED_BROKEN@mx.google.com>
2014-02-08  6:35     ` Wolfgang Schuster
2014-02-08 11:22       ` Jan Tosovsky [this message]
     [not found]       ` <52f613a9.09240f0a.5c33.ffff9f93SMTPIN_ADDED_BROKEN@mx.google.com>
2014-02-08 15:27         ` Wolfgang Schuster
2013-12-27 22:55 Jan Tosovsky

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='42032.8601998792$1391858624@news.gmane.org' \
    --to=j.tosovsky@email.cz \
    --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).