Changes
Created a page on this complicated feature. It will need to be enriched with experience.
< [[Layout]] | [[Columns]] | [[Overlays]] | [[Logos]] | [[Layers]] >
Collectors are an alternative to overlays that can be used to build-up composite objects.
[[Layers]] on the other hand, are used to define whole pages.
See the [http://www.pragma-ade.com/general/manuals/details.pdf details] manual for further explanations.
==Example==
Adding labels to a figure.
<texcode>
\starttext
\definecollector[example]
\setcollector [example] { \externalfigure[cow][width=4cm,frame=on] }
\setcollector [example] [corner={right,bottom},location={right,bottom}]
{\framed{1}}
\setcollector [example] [corner={right,top},location={right,top}]
{\framed{2}}
\setcollector [example] [corner={left,top},location={left,top}]
{\framed{3}}
\setcollector [example] [corner={left,bottom},location={left,bottom}]
{\framed{4}}
\startTEXpage
\composedcollector{example}
\stopTEXpage
\stoptext
</texcode>
<context>
\definecollector[example]
\setcollector [example] { \externalfigure[cow][width=4cm,frame=on] }
\setcollector [example] [corner={right,bottom},location={right,bottom}]
{\framed{1}}
\setcollector [example] [corner={right,top},location={right,top}]
{\framed{2}}
\setcollector [example] [corner={left,top},location={left,top}]
{\framed{3}}
\setcollector [example] [corner={left,bottom},location={left,bottom}]
{\framed{4}}
\composedcollector{example}
</context>
Notice that the size of the collected object grows as text is added.
As a consequence, the positions of the corners get redefined as the bounding box grows.
Collectors are an alternative to overlays that can be used to build-up composite objects.
[[Layers]] on the other hand, are used to define whole pages.
See the [http://www.pragma-ade.com/general/manuals/details.pdf details] manual for further explanations.
==Example==
Adding labels to a figure.
<texcode>
\starttext
\definecollector[example]
\setcollector [example] { \externalfigure[cow][width=4cm,frame=on] }
\setcollector [example] [corner={right,bottom},location={right,bottom}]
{\framed{1}}
\setcollector [example] [corner={right,top},location={right,top}]
{\framed{2}}
\setcollector [example] [corner={left,top},location={left,top}]
{\framed{3}}
\setcollector [example] [corner={left,bottom},location={left,bottom}]
{\framed{4}}
\startTEXpage
\composedcollector{example}
\stopTEXpage
\stoptext
</texcode>
<context>
\definecollector[example]
\setcollector [example] { \externalfigure[cow][width=4cm,frame=on] }
\setcollector [example] [corner={right,bottom},location={right,bottom}]
{\framed{1}}
\setcollector [example] [corner={right,top},location={right,top}]
{\framed{2}}
\setcollector [example] [corner={left,top},location={left,top}]
{\framed{3}}
\setcollector [example] [corner={left,bottom},location={left,bottom}]
{\framed{4}}
\composedcollector{example}
</context>
Notice that the size of the collected object grows as text is added.
As a consequence, the positions of the corners get redefined as the bounding box grows.