ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Reading product environment within a component file
@ 2012-12-02 21:56 Romain Diss
  0 siblings, 0 replies; only message in thread
From: Romain Diss @ 2012-12-02 21:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

Since I read the thread concerning the LaTeX \includeonly equivalent, I tried 
again to make to project structure work for me (I gave up some time ago).

Here is my problem:
I have a product file p.tex
%% p.tex
\startproduct p
 \environment e
 \component c
 \component d
\stopproduct
%% end

an environment file e.tex
%% e.tex
\startenvironment e
% style commands...
\stopenvironment
%% end

and two component files c.tex and d.tex
%% c.tex (d.tex is the same file, except content part)
\setupreferencing[autofile=yes]
\setupinteraction[state=start]
\startcomponent c
 \product p
 % content
\stopcomponent

but no project file.

When I run context on the product file, everything is ok. But when I run 
context on one component file, it doesn't read the environment file because 
the \product command doesn't seem to be read (that's what I understand from 
the documentation). So, how should I do to inform context to read the 
environment mentionned in the product file. Is it obligatory to use a project 
file to be able to read the parent environment when processing a component?

Another question which I think is linked to the previous one is: is one 
supposed to run context on a component? My different tests shows that a run on 
a component load all the other components mentionned in the product. So it 
seems to be equivalent to run context on a product or on a component (except 
for the environment problem mentionned before). That's also what the wiki 
seems to say (http://wiki.contextgarden.net/Project_structure):
 "In addition, you have to keep in mind that when compiling a product or 
component file, ConTeXt goes "up" to the project file and compiles everything 
it finds in there that is not a \product".

So, actually, I'm not able to reproduce the \includeonly equivalent with 
\component (even if I use \setupreferencing[autofile=yes] and 
\setupinteraction[state=start]). 

Do I miss something?

All the best.

-- 
Romain Diss
<romain.diss@yahoo.fr>
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-02 21:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-02 21:56 Reading product environment within a component file Romain Diss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).