Am 07.01.2013 um 22:20 schrieb Marco Patzer
Hi,
what is the best solution to place the content of annotations before they are defined in the text? What comes to mind is writing the content into an external file and read it in the next run. But maybe I overcomplicate things (usually I do) and there's a simpler solution. Here's an example:
\usemodule [annotation]
\defineannotation [myannotation]
\setupannotation [myannotation] [alternative=myalternative]
\defineannotationalternative [myalternative] [renderingsetup=annotation:myalternative]
\startsetups [annotation:myalternative] Content: \placeannotationcontent \stopsetups
\starttext
%% The annotation content should be placed here.
\input ward \blank
%% Although it is defined later \startmyannotation \input knuth \stopmyannotation
\stoptext
That’s not possible because the content is stored only in memory and is therefore only available after you put the environment in your document. What you can do is to set the content of the environment at the begin of the document and refer to it at a later position like you can do with buffers. \usemodule[annotation] \defineannotation[test][method=buffer,text=Test] \starttest[one] \input knuth \stoptest \starttest[two] \input ward \stoptest \starttext \gettest[two][title=Ward] \gettest[one][title=Knuth] \stoptext Wolfgang