[NTG-context] defineselector

Alan Braslau alan.braslau at cea.fr
Mon Nov 7 16:32:51 CET 2011


Hi,

One can select between short and long figure captions
(for an index of figures and the figure display itself, respectively)
using a selector. The syntax is:


\defineselector [caption] [max=2,n=2] % alternate {short}{long} captions

\starttext

\placefigure [here] [fig:reference]
	{\select{caption}
		{short caption}
		{long caption: bla, bla, bla.}
	}
	{\externalfigure [myfigure]}

...


\startchapter [title={Figure index}]
 \setupselector [caption] [n=1]
 \placelistoffigures [criterium=all]
\stopchapter

\stoptext




I find "\select{caption}" to be awkward
as the label caption is not typeset
(the convention of text between {}).

Should not the syntax be rather "\select[caption]{short}{long}"
or else "\selectcaption{short}{long}"?

What do the experts think?

Alan


More information about the ntg-context mailing list