Re: [NTG-context] How to use local setups in selected components of a project only

2010-08-17 Thread Hans Hagen

On 9-8-2010 9:34, Elias Oltmanns wrote:


Compiling project.tex results in both sections being unnumbered.
Compiling just compb.tex yields the expected result. Apparently, the
setups of localenv stay in effect for all components processed
subsequently.


indeed, local is not local in the sense of grouped, it just permits 
nesting ; you need to use grouping to localize settings



What is the recommended approach to such a problem? Do I have to undo
local setups manually at the end of a component?


grouping

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] How to use local setups in selected components of a project only

2010-08-09 Thread Elias Oltmanns
Hi all,

it has been suggested on this list before, that people should use modes
instead of \localenvironment and friends. Unfortunately, I don't seem to
get either of them working as expected. Consider the following example:

% project.tex
\startproject project
\environment environ
\component compa
\component compb
\stopproject


% environ.tex
\startenvironment environ
% global setups
% ...
\startmode[compa]
\setuphead[section][number=no]
\stopmode
\stopenvironment


% localenv.tex
\startlocalenvironment [compa]
\setuphead[section][number=no]
\stoplocalenvironment


% compa.tex
\startcomponent compa
%\enablemode[compa]
\project project
\localenvironment localenv

\section{First section}
Some text

%\disablemode[compa]
\stopcomponent


% compb.tex
\startcomponent compb
\project project

\section{Second section}
More text
\stopcomponent


Compiling project.tex results in both sections being unnumbered.
Compiling just compb.tex yields the expected result. Apparently, the
setups of localenv stay in effect for all components processed
subsequently.

Commenting out \localenvironment and uncommenting \enablemode /
\disablemode in compa.tex, however, does not solve the problem either:
When I compile just compa.tex, everything works as expected. Compiling
preject.tex, however, results in all sections being numbered. Obviously,
the call to \enablemode comes too late.

What is the recommended approach to such a problem? Do I have to undo
local setups manually at the end of a component?

Thanks in advance for any advice,

Elias
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___