I get the following result: a container that must always have the width of
\textwidth, regardless of the image size. At the moment I’m achieving this
with command=\framed[width=broad...

%--------------------------------------------------------------------------------------------------
\definefloat[figure:textwidth][figure]
  [default=here,
  command={\framed[width=broad, offset=1em]}]

\setupcaption[figure:textwidth]
  [location={bottom, right},
  width=0.4\textwidth,
  align={right},
  spacebefore=halfline]


\starttext
  \startplacefloat
    [figure:textwidth]
    [title={Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.},
    reference=fig:nonexisting]

    \externalfigure[figure][height=3cm, width=3cm]
  \stopplacefloat
\stoptext
%--------------------------------------------------------------------------------------------------

My question is whether there is any way to achieve this using some
parameter of \setupfloat, without needing to use command=\framed. To
repeat: I saw in the wiki that there is a minwidth option, but it doesn’t
seem to work for me when set via \setupfloats (which also makes me wonder
whether minwidth is actually a supported parameter there). In strc-flt.mkvi
(around line 1389) I noticed \edef\p_minwidth{\floatparameter\c!minwidth}%,
but I can’t find \c!minwidth documented as a parameter of \setupfloats in
this file (it does appear for \setupcaptions). Am I misunderstanding how
minwidth is supposed to be used, or is it simply not a \setupfloats
parameter?

Best regards,
Jonatán


El dom, 14 dic 2025 a las 11:41, Hans Hagen via ntg-context (<
[email protected]>) escribió:

> On 12/14/2025 2:16 PM, Jonatán O. Perren wrote:
> > Hi, list! I’m trying to make all my floats have the same width
> > (regardless of the width of the image inside). In the wiki I saw there
> > is a minwidth option, but it doesn’t work for me. In strc-flt.mkvi
> > <https://source.contextgarden.net/strc-flt.mkvi>, on line 1389, I saw
> it
> > says \edef\p_minwidth{\floatparameter\c!minwidth}%, but I haven’t seen
> > \c!minwidth listed as a parameter of \setupfloats (it is for
> > \setupcaptions). I’d like to know whether I’m reading something wrong or
> > doing something wrong.
> >
> > For now, Max suggested using command={\framed[width=broad, offset=1em,
> > boffset=-4pt]} (or command={\framed[width=broad, offset=1em]}).
>
> you have to be more specific of what you want to achieve i.e. make an
> example
>
> \setupcaption[figure][width=1tw]
>
> \startplacefigure[title=\samplefile{tufte}]
>      \framed{this is a test}
> \stopplacefigure
>
> \startplacefigure[title=\samplefile{tufte}]
>      \leftline{\framed{this is a test}}
> \stopplacefigure
>
> \setupcaption[figure][width=.5tw]
>
> \startplacefigure[title=\samplefile{tufte}]
>      \framed{this is a test}
> \stopplacefigure
>
>
>
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : [email protected] /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
>
> ___________________________________________________________________________________
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to