Alan Braslau schrieb am 23.07.2020 um 00:21:
Hello,
I have put the following in an environment
\startenvironment MYENVIRONMENT
\setupdocument [metadata:title={\documentvariable{title}}, metadata:subtitle={\documentvariable{subtitle}}, metadata:author={\documentvariable{author}}, metadata:keywords={\documentvariable{keywords}}]
\stopenvironment
and correct use would be
\environment MYENVIRONMENT
\startdocument [title={My title}]
\stopdocument
because, of course, the environment contains more than \setupdocument such as font loading that should be done before the \startdocument.
The metadata does not get set properly, having to do with expansion or other notions of TeX that I never seem to get right. What might be the proper way of handling this?
What exactly doesn't work and do you get the same problems when you set the values in the following minimal example (everything has to be in the same file). %%%% begin example \setupdocument [metadata:title={\documentvariable{title}}, metadata:subtitle={\documentvariable{subtitle}}, metadata:author={\documentvariable{author}}, metadata:keywords={\documentvariable{keywords}}] \startdocument [title={My title}] \input knuth \stopdocument %%%% end example Wolfgang