![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Taco Hoekwater schrieb am 21.09.2020 um 14:44:
Hi Hans,
On 15 Sep 2020, at 18:44, Hans Hagen
wrote: (2) Another change is in the \startdocument mechanism. This (already old and rusted) wrapper runs on top of variables but we think no one knows (or uses) that. So, it now is a real wrapper with inheritance and such. It is dedicated to Tomas Hala who had to struggle with the old one but still gave a presentation using it. Here's an example:
\definedocument[thesis]
\setupdocument[a=b,e=f] \setupdocument[thesis][a=x,c=d]
\startsetups[document:start] START \stopsetups
\startsetups[thesis:stop] STOP \stopsetups
\startthesis
(\currentdocument/a): \documentvariable{a}\par (\currentdocument/c): \documentvariable{c}\par (\currentdocument/e): \documentvariable{e}\par
\stopthesis The auto-inheritance of the setups does not work yet, because the \definedocument[thesis] does not set up local version of the before= and after= keys of \startthesis.
\definedocument (re)defines the value of the actual setup “thesis:start” correctly to inherit the parent’s \directsetuo, but because the actual before and after keys are inherited from the (document) parent as well, the effect on \startthesis still remains equivalent to this:
\setupdocument [thesis] [before=\directsetup{document:start}, after=\directsetup{document:stop}]
So we need something like this: \appendtoks \setexpandeddocumentparameter\c!before{\noexpand\directsetup{\currentdocument:\v!start}}% \setexpandeddocumentparameter\c!after {\noexpand\directsetup{\currentdocument:\v!stop }}% \to \everydefinedocument Wolfgang