Re: [NTG-context] \everystarttext in components
On Wed, 28 Nov 2018 09:12:45 +0100 Hans Hagen wrote: > On 11/27/2018 9:40 PM, Marco Patzer wrote: > > On Tue, 27 Nov 2018 18:42:51 +0100 > > Wolfgang Schuster wrote: > > > >>> Has that changed over the course of the last year or always been > >>> that way? > >> > >> This was always the case. > > > > OK, I'm wondering why I set it up that way back then. I'm sure I > > tested it. But I don't remember. > with nested files (components etc) you can end up with > > \starttext >\starttext > \starttext > > and it's the outer one that counts, so appending after that one is > seen, won't help you I (falsely) assumed it gets triggered on *every* \starttext, not just the outer one. Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \everystarttext in components
On 11/27/2018 9:40 PM, Marco Patzer wrote: On Tue, 27 Nov 2018 18:42:51 +0100 Wolfgang Schuster wrote: Has that changed over the course of the last year or always been that way? This was always the case. OK, I'm wondering why I set it up that way back then. I'm sure I tested it. But I don't remember. with nested files (components etc) you can end up with \starttext \starttext \starttext and it's the outer one that counts, so appending after that one is seen, won't help you Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \everystarttext in components
Marco Patzer schrieb am 27.11.18 um 21:40: On Tue, 27 Nov 2018 18:42:51 +0100 Wolfgang Schuster wrote: Has that changed over the course of the last year or always been that way? This was always the case. OK, I'm wondering why I set it up that way back then. I'm sure I tested it. But I don't remember. When you load the environment before \startcomponent etc. you add your command to the token register before it is flushed but when you load the environment after \startcomponent etc. the register is flushed before you add them. This doesn’t mean you should use \everystarttext in your document (or in a module) because this stuff shouldn’t depend on the order in which environments are loaded. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \everystarttext in components
On Tue, 27 Nov 2018 18:42:51 +0100 Wolfgang Schuster wrote: > > Has that changed over the course of the last year or always been > > that way? > > This was always the case. OK, I'm wondering why I set it up that way back then. I'm sure I tested it. But I don't remember. > > ... it's not a godo idea to use that hook to add content > > I'm not adding content, it was just for the MWE. I'll post another > > thread about what I intend to achieve. > > When you use \startdocument you can use > > \startsetups [document:start] > ... > \stopsetups > > to insert code at the begin of the document. I tried that, to no avail. I posted my actual issue including MWE as a new thread. Thanks for the quick response Hans and Wolfgang. Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \everystarttext in components
Marco Patzer schrieb am 27.11.18 um 18:34: On Tue, 27 Nov 2018 18:21:45 +0100 Hans Hagen wrote: MWE: \startcomponent * \appendtoks Foobar \to\everystarttext \startdocument\null\stopdocument \stopcomponent If the first and last line is commented out, it prints “Foobar”, when compiled as a component it doesn't. it kicks in when context things a text starts (so earler in this case) Has that changed over the course of the last year or always been that way? This was always the case. ... it's not a godo idea to use that hook to add content I'm not adding content, it was just for the MWE. I'll post another thread about what I intend to achieve. When you use \startdocument you can use \startsetups [document:start] ... \stopsetups to insert code at the begin of the document. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \everystarttext in components
On Tue, 27 Nov 2018 18:21:45 +0100 Hans Hagen wrote: > > MWE: > > > > \startcomponent * > >\appendtoks Foobar \to\everystarttext > >\startdocument\null\stopdocument > > \stopcomponent > > > > If the first and last line is commented out, it prints “Foobar”, > > when compiled as a component it doesn't. > it kicks in when context things a text starts (so earler in this > case) Has that changed over the course of the last year or always been that way? > ... it's not a godo idea to use that hook to add content I'm not adding content, it was just for the MWE. I'll post another thread about what I intend to achieve. Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \everystarttext in components
On 11/27/2018 5:59 PM, Marco Patzer wrote: Hi! I've got an issue with my documents after updating context (to 2018.11.18 14:07). I believe it has something to do with \everystarttext. But I'm still digging. Question: Is it intended behaviour that \everystarttext doesn't work in components? MWE: \startcomponent * \appendtoks Foobar \to\everystarttext \startdocument\null\stopdocument \stopcomponent If the first and last line is commented out, it prints “Foobar”, when compiled as a component it doesn't. it kicks in when context things a text starts (so earler in this case) ... it's not a godo idea to use that hook to add content Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] \everystarttext in components
Hi! I've got an issue with my documents after updating context (to 2018.11.18 14:07). I believe it has something to do with \everystarttext. But I'm still digging. Question: Is it intended behaviour that \everystarttext doesn't work in components? MWE: \startcomponent * \appendtoks Foobar \to\everystarttext \startdocument\null\stopdocument \stopcomponent If the first and last line is commented out, it prints “Foobar”, when compiled as a component it doesn't. Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___