Kate F
17. Januar 2016 um 18:53
On 17 January 2016 at 17:00, Wolfgang Schuster

I don't know, actually. In this case these are values which remain
constant throughout the document. So all I'm after here is a mechanism
for storing variables by name. Is there something more appropriate to
use for those kind of variables?
You can use the \setvariables command the set the values and access them with \getvariables:

\setvariables
  [information]
  [title=Document title,
   author=Author name]

\setupinteraction
  [ state=start,
    title=\getvariable{information}{title},
   author=\getvariable{information}{title}]

\starttext
\unknown
\stoptext


There is also the \setupdocument command (a simple wrapper for the \setvariables command)
which uses predefined keywords to set fields in the pdf file. You can access the values from
\setupdocument command in your document with \documentvariable{<KEY>}.

\setupdocument
  [ metadata:title=Document title,
   metadata:author=Author name]

\setupinteraction[state=start]

\starttext
\unknown
\stoptext

Wolfgang