[NTG-context] marking?

Thomas A. Schmitz thomas.schmitz at uni-bonn.de
Fri Feb 24 17:42:24 CET 2012


On 02/24/2012 05:09 PM, Wolfgang Schuster wrote:
> Marks aren’t the right tool for this because they are meant for text which
> goes into the header and footer after the page is finished. There is another
> mechanism which does what you want.
>
> \setupheadertexts[chapter]
>
> \define[2]\ChapterCommand
>    {\vbox\bgroup\starttabulate
>     \NC Title   \EQ \structurevariable{title}   \NC\NR
>     \NC Marking \EQ \structurevariable{marking} \NC\NR
>     \stoptabulate\egroup}
>
> \setuphead[chapter][command=\ChapterCommand]
>
> \starttext
>
> \startchapter[title={Hello World},marking={A}]
>
> \starttabulate
> \NC Title   \EQ \namedstructurevariable{chapter}{title}   \NC\NR
> \NC Marking \EQ \namedstructurevariable{chapter}{marking} \NC\NR
> \stoptabulate
>
> \stopchapter
>
> \stoptext
>
> Wolfgang

Thank you, Wolfgang! The example was maybe too minimal - what I'm 
looking for is for an xml conversion; I want to define a command that 
will do different things depending on the chapter it is in, so I thought 
\getmarking was the way to go (with a \doifelse test). But 
\namedstructurevariable is as well.

Thanks

Thomas
-- 
Prof. Dr. Thomas A. Schmitz
Abteilung für Griechische und Lateinische Philologie
Universität Bonn
Am Hof 1e
53113 Bonn
http://www.philologie.uni-bonn.de/personal/schmitz


More information about the ntg-context mailing list