Am 16.04.2013 um 09:32 schrieb Aditya Mahajan <adit...@umich.edu>:

> Has something changed recently on how product-component structure is supposed 
> to
> be used? I have three files:
> 
> 1. prd.tex
> 
>    \environment env
> 
>    \startproduct prd
> 
>    \component cmp
> 
>    \stopproduct
> 
> 2. env.tex
> 
> 
>    \startenvironment env
> 
>    \define\testing{This is a test}
> 
>    \stopenvironment
> 
> 3. cmp.tex
> 
> 
>    \product prd
> 
>    \startcomponent cmp
> 
>    Testing \testing
> 
>    \stopcomponent
> 
> When I compile cmp.tex, I get:
> 
> %--------------------------%<-----------------------------
> […]
> mtx-context     | fatal error: return code: 1% 
> %--------------------------%<-----------------------------
> 
> Shouldn't the product file not load the component file (or anything else 
> inside
> \startproduct .. \stopproduct) when compiling a component?

The product file loads the component but this isn’t what you’re doing.

You process the component which doesn’t load product file because this would 
end in a loop
because the product would then again load the component etc.

Add “\environment env” at the begin of your component file and the problem 
disappears.
Since environment files are loaded only once it doesn’t matter when the line is 
in each
component file.

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

Reply via email to