On Mon, 18 Jun 2007, fiëé visuëlle wrote:
Am 2007-06-18 um 12:50 schrieb nicola:
I have a project with a few products sharing the same layout, which is specified in a global environment file. Each product is in a separate subdirectory together with its components. Then, I want to put some setups and figure definitions in product-specific environments and I do it like this:
\startproduct OneProduct \project MyProject \environment OneProductDir/LocalEnvironment ...
The problem is that the local environment is not read when I typeset a particular component, but only when I typeset the whole product. How can I fix that?
Put your product specific settings in the product file.
AFAIU, they will not be executed. There is really no clean way of doing this without adding extra markup. Suppose I have a product file which says \startproduct product \environemnt env1 \environemnt env2 Title Text \component one \component two \stopproduct and a component \startcomponent one \product product text \stopcomponent How can TeX parse the product file without typesetting title text? It would have been simple if title text was surronded by some markup, but it is not. This is one of the reasons projects are not supposed to have any matertial that will be typeset. So, the short answer is just add \environment commands in your components. Another way is to use localenvironments in your environment file, but I have never used them myself. Aditya