ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Using Product-component
Date: Tue, 16 Apr 2013 11:25:10 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.02.1304161120260.29770@nqv-guvaxcnq> (raw)
In-Reply-To: <2D100C28-1E9E-4D5E-A303-2FB607590717@gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1977 bytes --]

On Tue, 16 Apr 2013, Wolfgang Schuster wrote:

>
> Am 16.04.2013 um 09:32 schrieb Aditya Mahajan <adityam@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.

I thought that the whole point of adding `\product ...` in a component 
file was so that I do not have to add all the `\environment ...` in the 
component file.

Actually, if I change the product -> component then everything works as 
expected, so perhaps I did not remember correctly how the 
project-product-component hierarchy is to be used. I thought that the 
project part was optional, but it seems that one must include a project as 
well (if you want not to add all the environments in the component file)

Aditya

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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	other threads:[~2013-04-16 15:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16  7:32 Aditya Mahajan
2013-04-16 12:40 ` d.henman
2013-04-16 12:51 ` Wolfgang Schuster
2013-04-16 15:25   ` Aditya Mahajan [this message]
2013-04-16 16:52     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1304161120260.29770@nqv-guvaxcnq \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).