ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Trouble with ConTeXt's project structure
@ 2010-10-17 19:43 Stefan Müller
  2010-10-17 23:29 ` Henning Hraban Ramm
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Müller @ 2010-10-17 19:43 UTC (permalink / raw)
  To: ntg-context

Dear list,

I tried to set up a project of mine using the project structure propagated in 
the wiki [1]. Because I ran into some trouble I made the following small 
example (using MkIV, minimals 2010.10.14 13:14).

%% project_mymag.tex
\startproject project_mymag
	\environment env_mymag
	\product prd_year2004-01
	\completecontent[criterium=all]
\stopproject
%% EOF

%% env_mymag.tex
\startenvironment env_mymag
	\setupindenting[medium, yes] %some random setup
\stopenvironment
%% EOF

%% prd_year2004-01
\startproduct prd_year2004-01
	\project project_mymag
	\component c_editorial
	\component c_article01
\stopproduct
%% EOF

%% c_editorial.tex
\startcomponent c_editorial
	\product prd_year2004-01
	\project project_mymag
	\chapter{Editorial}
		Dear reader...
\stopcomponent
%% EOF

%% c_article01.tex
\startcomponent c_article01
	\product prd_year2004-01
	\project project_mymag
	\chapter{First Article}
		This will be awesome...
\stopcomponent
%% EOF

When I translate the project file I get what I want, e.g. 3 pages: first page 
"Editorial", second page "First Article", third page "Content".

When I translate the product file I don't get "Editorial", "First Article" as 
expected, but "Content", "Editorial", "First Article". It seems as if context 
first typesets the project file without going down inside the products again, 
before typesetting the originally called project.

When I translate one of the component files, lets say c_editorial.tex, I get 
"Contents", "Editorial" instead of just one page "Editorial". Again, it seems 
as if context first looks inside the project file (without going down) and only 
then typesets the component.

Another case, same problem. If I drop the "product", i.e. I only have a 
project file including several components, the individual component files and an 
environment file, kind of the same problems appear. Translating the project file 
works well. Translating the component file c_editorial.tex results in a PDF 
with 4 pages (instead of one with "Editorial"): "Editorial", "First Article", 
"Contents", "Editorial". Context puts the whole project in the PDF and appends 
the component c_editorial...

All this seems very strange to me, especially since a friend told me project 
structure works pretty well in his projects. I tested on two different machines 
(Windows Vista and Linux). Am I doing something wrong? Is this a bug or a 
feature?

Thanks for your help in advance.
Best wishes,
Stefan.

[1] http://wiki.contextgarden.net/Project_structure
___________________________________________________________________________________
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] 3+ messages in thread

* Re: Trouble with ConTeXt's project structure
  2010-10-17 19:43 Trouble with ConTeXt's project structure Stefan Müller
@ 2010-10-17 23:29 ` Henning Hraban Ramm
  2010-10-18 10:00   ` Stefan Müller
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Hraban Ramm @ 2010-10-17 23:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2010-10-17 um 21:43 schrieb Stefan Müller:

> I tried to set up a project of mine using the project structure  
> propagated in
> the wiki [1]. Because I ran into some trouble I made the following  
> small
> example (using MkIV, minimals 2010.10.14 13:14).
...
> All this seems very strange to me, especially since a friend told me  
> project
> structure works pretty well in his projects. I tested on two  
> different machines
> (Windows Vista and Linux). Am I doing something wrong? Is this a bug  
> or a
> feature?

Consider it a feature that actual code in your project file is always  
executed.
Consider the table of content call in the wiki a bad example. Mea  
culpa. Change it.

Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___________________________________________________________________________________
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] 3+ messages in thread

* Re: Trouble with ConTeXt's project structure
  2010-10-17 23:29 ` Henning Hraban Ramm
@ 2010-10-18 10:00   ` Stefan Müller
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Müller @ 2010-10-18 10:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 18.10.2010 01:29, Henning Hraban Ramm wrote:
> Am 2010-10-17 um 21:43 schrieb Stefan Müller:
>
>> I tried to set up a project of mine using the project structure
>> propagated in
>> the wiki [1]. Because I ran into some trouble I made the following small
>> example (using MkIV, minimals 2010.10.14 13:14).
> ...
>> All this seems very strange to me, especially since a friend told me
>> project
>> structure works pretty well in his projects. I tested on two different
>> machines
>> (Windows Vista and Linux). Am I doing something wrong? Is this a bug or a
>> feature?
>
> Consider it a feature that actual code in your project file is always
> executed.
> Consider the table of content call in the wiki a bad example. Mea culpa.
> Change it.
>
> Greetlings from Lake Constance!
> Hraban
> ---
> http://www.fiee.net/texnique/
> http://wiki.contextgarden.net
> https://www.cacert.org (I'm an assurer)

Okay, so the \completecontent should be put inside another component, right?

 >> Another case, same problem. If I drop the "product", i.e. I only
 >> have a project file including several components, the individual
 >> component files and an environment file, kind of the same problems
 >> appear. Translating the project file works well. Translating the
 >> component file c_editorial.tex results in a PDF with 4 pages
 >> (instead of one with "Editorial"): "Editorial", "First Article",
 >> "Contents", "Editorial". Context puts the whole project in the PDF
 >> and appends the component c_editorial...

For me the trouble lies more in my second example "Another case, same 
problem" because the "\component c_something" calls are also considered 
as "actual code", not only the \completecontent. Using a (fake) product 
in this case seems to me like a workaround.

Thank you very much so far,
Stefan.
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2010-10-18 10:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-17 19:43 Trouble with ConTeXt's project structure Stefan Müller
2010-10-17 23:29 ` Henning Hraban Ramm
2010-10-18 10:00   ` Stefan Müller

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).