# [NTG-context] Labelling figures

Hans Hagen pragma at wxs.nl
Tue Sep 16 16:28:45 CEST 2008

Wolfgang Schuster wrote:
> Hi all,
>
> any new news about my question below.
>
> Wolfgang
>
> On Fri, Jun 6, 2008 at 9:51 AM, Wolfgang Schuster
>> Hi,
>>
>> what is the best method to add labels to a figure; I want them not only on
>> the figure but their position should be relative to the figure size.

how about just using a layer ...

>>
>> I tried start/stopfigure (mentioned as outdated in the source) but the label
>> is not shown.
>>
>> \setupexternalfigures[location={local,global,default}]
>>
>> \starttext
>>
>> \startfigure[kuh][cow]
>> \referring(1,1)(1,1)[r:horn]
>> \stopfigure
>>
>> \externalfigure[kuh]
>>
>> \stoptext
>>
>>
>> After this I tried collector and got with a little extra and a box and to dimens
>> what I wanted but it's not very elegant.
>>
>> \setupexternalfigures[location={local,global,default}]
>>
>> \starttext
>>
>> \newbox\labelbox \setbox\labelbox\hbox{\externalfigure[cow]}
>>
>> \newdimen\labelwidth  \labelwidth \wd\labelbox
>> \newdimen\labelheight \labelheight\ht\labelbox
>>
>> \definecollector[label][state=repeat]
>>
>> \setcollector[label]{\box\labelbox}
>>
>> \setcollector[label][x=.65\labelwidth,y=.75\labelheight]{udder}
>>
>> \placefigure
>>  {A labelled cow}
>>  {\flushcollector[label]}
>>
>>
>> \stoptext
>>
>>
>> Figurelabel as described in the label manual [1] seem to be the perfect
>> solution but the module isn't finished :-(
>>
>>
>> Is there not better way to achieve what I want and do I have to live with
>> my second method or could I hope for the future.
>>
>>
>>
>>
>> Greetings
>> Wolfgang
>>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

--

-----------------------------------------------------------------