[NTG-context] Title from setupinteraction used in header

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Sun Feb 3 17:34:30 CET 2019


Jan U. Hasecke schrieb am 03.02.19 um 14:23:
> Hi all,
> 
> it is quite easy to have chapters in headers and footers as shows this
> example.
> 
> \setuppagenumbering[location=]
> 
> \setupheadertexts
> [text]
> [chapter]
> []
> []
> [chapter]
> 
> \setupinteraction
>      [title={foo},
>      subtitle={bar},
>      author={Peter},
>      keyword={context}]
> 
> \starttext
> 	\startchapter[title={chapter title},]
> 	\input lorem
> 	\stopchapter
> 
> 	\startchapter[title={another chapter title},]
> 	\input lorem
> 	\stopchapter
> \stoptext
> 
> 
> How can I insert title, subtitle and author from setupinteraction into
> headertexts?
> 
> 
> Background: authors shall define title, subtitle etc in the product file
> with setupinteraction (or a better method if available).
> 
> In the environment file I want to insert theses informations into
> headers and footers.

Use \setupdocument to set the metadata for the PDF. You can access the 
values with the \documentvariable command.

\setuppagenumbering
   [location=]

\setupheadertexts
   [\documentvariable{metadata:title} – \documentvariable{metadata:author}]

\setupdocument
   [metadata:title={foo},
    metadata:subtitle={bar},
    metadata:author={Peter},
    metadata:keyword={context}]

\starttext
\samplefile{lorem}
\stoptext

Wolfgang



More information about the ntg-context mailing list