Thanks for the answer. What would the proper mechanism to get data from a floating object be? After changing the macro (I do not remember where I got doifnottext it from, maybe an LLM gave it to me), I don't get a failure, but the "suffix" key in captions is placed after the Llabel and number, before the caption. So it renders "Figura X: Fuente: lorem ipsum Caption of the figure". Is there any mechanism to place things just after the caption?
El mar, 6 oct 2026 a las 8:59, <[email protected]> escribió: > Send ntg-context mailing list submissions to > [email protected] > > To subscribe or unsubscribe via email, send a message with subject or > body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of ntg-context digest..."Today's Topics: > > 1. SVG2 specs (Henning Hraban Ramm) > 2. Re: About \floatuserdataparameter use (Luis Montgomery) > > > > ---------- Forwarded message ---------- > From: Henning Hraban Ramm <[email protected]> > To: mailing list for ConTeXt users <[email protected]> > Cc: > Bcc: > Date: Tue, 6 Oct 2026 13:18:38 +0200 > Subject: [NTG-context] SVG2 specs > to whom it may concern… > > “The SVG Working Group invites implementations of an updated Candidate > Recommendation Snapshot of Scalable Vector Graphics (SVG) 2.” > > > https://www.w3.org/news/2026/updated-candidate-recommendation-scalable-vector-graphics-svg-2/ > > https://www.w3.org/TR/2026/CR-SVG2-20261006/ > > Changes: https://www.w3.org/TR/2026/CR-SVG2-20261006/changes.html > > > > ---------- Forwarded message ---------- > From: Luis Montgomery <[email protected]> > To: mailing list for ConTeXt users <[email protected]> > Cc: > Bcc: > Date: Tue, 6 Oct 2026 07:51:57 -0600 > Subject: [NTG-context] Re: About \floatuserdataparameter use > \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 > > ___________________________________________________________________________________ > -- 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 ___________________________________________________________________________________
