Pablo Rodriguez via ntg-context schrieb am 15.08.2021 um 18:33:
On 8/15/21 6:02 PM, Fabrice Couvreur via ntg-context wrote:
A small note : this method works if I compile the project but if I
compile only one chapter, the header no longer appears.
Hi Fabrice,
I have never used projects and chapters (or whatever the right name is).
I’m not sure I get what you’re experiencing: with a single chapter, do
you have the fancy layout or not?
It would make sense that the fancy chapter doesn’t appear only compiling
a chapter. I guess there is no \startbodymatter...\stopbodymatter
wrapping it.
Another approach would be:
[...]
Setting values for \title is a way to avoid the chapter setup for the
table of contents etc.
but there is a way to set values which are used only when you process a
component file.
To make it work one has to load the environment file after
\startcomponent because you
can use the *component mode to check whether the parent file is a
product or a component.
%%%% begin product
\startproduct [*]
\environment [...]
\startfrontmatter
...
\stopfrontmatter
\startbodymatter
\component [...]
\stopbodymatter
\stopproduct
%%%% end product
%%%% begin component
\startcomponent [*]
\environment [...]
...
\stopcomponent
%%%% end component
%%%% begin environment
\startenvironment [*]
\startsetups [section:chapter]
\setuphead
[chapter]
[...]
\stopsetups
\startsectionblockenvironment [bodypart]
\directsetup{section:chapter}
\stopsectionblockenvironment
\doifmode{*component}{\directsetup{section:chapter}}
\stopenvironment
%%%% end environment
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
___________________________________________________________________________________