Re: [NTG-context] Align caption text separately from figure label

2012-05-24 Thread John Dyreby
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
___


Re: [NTG-context] Align caption text separately from figure label

2012-05-13 Thread Marco
On 2012-05-11 John Dyreby jjdyr...@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
___