\floatuserdataparameter is not the right mechanism for reading data from a
figure.
On the other hand, I'm not sure whether \doifnottext exists. I'd try
\doifsomething{\currentfloatparameter{...}}
when the float is active.

El lun, 5 oct 2026 a las 21:19, Andres Conrado Montoya (<
[email protected]>) escribió:

> I have been using figures like this for several books:
>
> %%%%%%%%%%
>
> \define[1]\fuentefig{\par\blank[2pt]\start\switchtobodyfont[8pt]\emph{Fuente:}~#1\par\stop}
> \def\propia{\fuentefig{elaboración propia}}
> \defineexternalfigure[figuramd][maxwidth=.6\textwidth]
>
> \setupcaptions[style={\small},
>               width=max,
>               prefix=yes,
>               way=bychapter,
>               prefixsegments=chapter,
>               headstyle={\tf},
>               suffixseparator={},
>               distance={.5em},
>               align={middle,nothyphenated,verytolerant,stretch}]
>
> \startdocument
> \startplacefigure[list={Convergencia absoluta para una muestra grande de
> países},title={Convergencia absoluta para una muestra grande de
> países\propia}]
>   \externalfigure[2_Crecimiento/media/image8.pdf][figuramd]
> \stopplacefigure
> \stopdocument
> %%%%%%%%%%
>
> Works reasonably well, but I wanted to avoid the repetition, since the
> source (or potential notes) for the caption are polluting the caption
> itself, I have to repeat the caption for the list. I was looking into
> \floatuserdataparameter, but with no success. This is what I tried:
>
> %%%%%%%%%%%%%%%%%%
> \define[1]\subcap{
>   #1
>   \doifnottext{\floatuserdataparameter{fuente}}{}{%
>     \blank[2pt]%
>     \start
>     \switchtobodyfont[8pt]%
>     \emph{Fuente:}~\floatuserdataparameter{fuente}\par
>     \stop
>   }%
> }
>
> \setupcaption[figure][textcommand={\subcap}]
> %%%%%%%%%%
>
> But this fails with "Control sequence expected instead of undefined". I
> have also tried suffix with no avail. The following fails with the same
> error message:
>
> %%%%%%%%%%%%%
> \define\subcap{
>   \doifnottext{\floatuserdataparameter{fuente}}{}{%
>     \blank[2pt]%
>     \start
>     \switchtobodyfont[8pt]%
>     \emph{Fuente:}~\floatuserdataparameter{fuente}\par
>     \stop
>   }%
> }
>
> \setupcaption[figure][suffix={\subcap}]
> %%%%%%%%%%%%%
>
> Attached also, an image of what I want to obtain.
>
> [image: imagen.png]
>
> Thank you for your time.
>
> --
> Andrés Conrado Montoya
> [email protected]
> http://sesentaycuatro.com
> ----------------------------------------
> Los fines no justifican los medios, porque la medida verdadera de nuestro
> carácter está dada por los medios que estamos dispuestos a utilizar, no por
> los fines que proclamamos.
>
> ___________________________________________________________________________________
> 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