Changes

Jump to navigation Jump to search
1,531 bytes added ,  11:41, 9 May 2022
m
more links
< [[Layout]] | [[Columns]] | Collectors are an alternative to [[Overlays]] | [[Logos]] | that can be used to build-up composite objects; they are like [[Layers]] >, but not for whole pages but only for single objects (e.g. images).
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 [[manual:details.pdf| details]] manual for further explanations.
{\framed{4}}
\startTEXpage \composedcollector{example}\stopTEXpage
\stoptext
</td><td>
<context>
\setupexternalfigures[location={local,default}]
\definecollector[example]
\setcollector [example] {\externalfigure[cow][width=4cm,frame=on]}
{\framed{4}}
\startTEXpage \composedcollector{example2}\stopTEXpage
\stoptext
</td><td>
<context>
\setupexternalfigures[location={local,default}]
\definecollector[example2]
\setcollector [example2] {\externalfigure[cow][width=4cm,frame=on]}
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.
 
 
== Example - copyright labels on images ==
 
Some journals credit the name of the artist / photographer / copyright owner of an image by printing the text running up the side of the image. I wanted to do this so that the figure caption could be used purely to describe the image.
 
In this example the cow is drawn with the figure caption below as normal and with the copyright text running upwards along the edge of the right-hand edge of the image. And if you want to fine tune the space between the image and the text then it's easy to \framed the text and play around with the size and offsets.
 
<table><tr valign="top"><td>
<texcode>
\starttext
\definecollector[example]
\setcollector [example] {\externalfigure[cow][width=4cm,frame=off]}
\setcollector [example] [corner={right,bottom},location={right,top}]
{\rotate[rotation=90]{\tfx \copyright A great artist}}
\placefigure [ ] [fig:cow] {A fine figure of a cow} {\composedcollector{example}}
\stoptext
</texcode>
</td><td>
<context>
\starttext
\definecollector[example]
\setcollector [example] {\externalfigure[cow][width=4cm,frame=off]}
\setcollector [example] [corner={right,bottom},location={right,top}]
{\rotate[rotation=90]{\tfx \copyright A great artist}}
\placefigure [ ] [fig:cow] {A fine figure of a cow} {\composedcollector{example}}
\stoptext
</context>
</td></tr></table>
{{todo|We need more documentation and examples for this complicated subject.}}
 
== See also ==
 
* [[Layers]] – [[:Category:Command/Layers]]
* [[Overlays]] – [[:Category:Command/Overlays]]
* {{cmd|definecollector}}
* {{cmd|setcollector}}
* {{cmd|composedcollector}}
[[Category:Graphics]] [[Category:Layers]]

Navigation menu