[NTG-context] Frame around float and its caption, how to?

Wolfgang Schuster schuster.wolfgang at googlemail.com
Sun Sep 25 18:32:12 CEST 2011


Am 25.09.2011 um 18:10 schrieb Stefan Müller:

> Hi list,
> 
> I'm using 201100920 00:09 MkIV standalone.  Some time ago Marcin Borkowski asked [1] on this list about framing floats together with their captions.  It seems to be unanswered and now I stumbled upon a similar problem.  I want to have a figure with a caption together in a frame as wide as the surrounding text, aka \textwidth and the caption filling the available horizontal space.  I.e. I want something like
> 
> \setupcaption[width=\textwidth]
> \starttext
> \placefigure[here]{\input tufte}{\externalfigure[cow]}
> \stoptext
> 
> with a frame around it.

Found this in my mail archive:

% engine=pdftex

\setupexternalfigures[location={local,global,default}]

\setupfloats[frame=on,frameoffset=1mm]

\starttext

\section{A figure with a background}

\placefigure
 {none}
 {\placelegend
    {\externalfigure[mill][scale=2000]}
    {\placefloatcaption[figure]{A dutch mill}}}

\stoptext

It works only with MkII because \placefloatcaption isn’t yet rewritten for the new MkIV code.

Wolfgang


More information about the ntg-context mailing list