From: John Dyreby <jjdyreby@wisc.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Align caption text separately from figure label
Date: Thu, 24 May 2012 06:44:08 -0500 [thread overview]
Message-ID: <4C60EF56-68AB-4C25-BD6C-AE6850AD6FB6@wisc.edu> (raw)
In-Reply-To: <20120513130948.7050953e@Zewz>
Marco - thanks for your help!
I found an alternative way to do it that centers the whole caption, including the figure label:
\starttext
% Centers the caption text, label is offset (suggested by Marco):
\setupcaptions [headstyle={\hskip-5em\bold},width=4in]
\startplacefigure [title={This is a very, very, very, very, very, very, very, very, very, very, very long caption.}]
\externalfigure [dummy]
\stopplacefigure
% Centers the entire caption, including the label:
\setupcaptions [headstyle=bold,style={\hangindent=6em},distance=2em,width=4in]
\startplacefigure [title={This is a very, very, very, very, very, very, very, very, very, very, very long caption.}]
\externalfigure [dummy]
\stopplacefigure
\stoptext
For both methods the spacing is hardcoded; for my application I ended up creating a short macro that checked the length of the figure label and adjusted things accordingly so that the the spacing for Figure 10+ worked the same as for Figures 1-9.
John
On May 13, 2012, at 6:09 AM, Marco wrote:
> On 2012-05-11 John Dyreby <jjdyreby at wisc.edu> wrote:
>
>> Or if this formatting works...
>>
>> How it currently looks:
>> Figure 1 This is a caption that extends
>> to multiple lines.
>>
>> What I'm trying to get:
>> Figure 1 This is also a caption that
>> extends to multiple lines.
>
> This is a hack, but seems to work:
>
> \setupcaptions [headstyle={\hskip-5em\bold}]
> \starttext
> \startplacefigure [title={\input knuth\par}]
> \externalfigure [dummy]
> \stopplacefigure
> \stoptext
>
> Marco
>
>
>
___________________________________________________________________________________
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:[~2012-05-24 11:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 17:27 John Dyreby
2012-05-13 11:09 ` Marco
2012-05-24 11:44 ` John Dyreby [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=4C60EF56-68AB-4C25-BD6C-AE6850AD6FB6@wisc.edu \
--to=jjdyreby@wisc.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).