ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans van der Meer <hansm@science.uva.nl>
Subject: Re: document structure
Date: Fri, 21 Jul 2006 20:02:55 +0200	[thread overview]
Message-ID: <63C28589-B3A5-410D-BE33-3A07730BA871@science.uva.nl> (raw)
In-Reply-To: <44C0CF64.7050002@elvenkind.com>


On Jul 21, 2006, at 14:58, Taco Hoekwater wrote:

>
>
> Hans van der Meer wrote:
>> Must I understand that "\startlocalenvironment[abc]" within an
>> environment file means that this codeblock is used only for  
>> typesetting
>> product/component abc and excluded automatically when another
>> product/component is typeset?
>
> I believe so.
>
>> How does this relate to the above question about setup-file  
>> structure?
>
> \localenvironment is sort of an alias of  \environment.
>
> Differences: there is a but less bookkeeping done, and the file
> is loaded only once in a run, never repeatedly (so that the command
> can safely be used in a number of components). The files' name
> (== the argument) is unimportant.
>

Sorry, but I think I do not yet understand and I do not get it right.
Next is in a nutshell my setup of the environments, the relevant  
projects are syllabus-s and syllabus-p

% calls up the product, file syllabus-s.tex
\startproduct syllabus-s		
\project onderwijs
\environment syllabus-setup
...
\stopproduct

% common initializations, file syllabus-setup.tex
\startenvironment syllabus-setup	
\writestring{LOADED ENVIRONMENT SYLLABUS-SETUP}\writeline
\startlocalenvironment[syllabus-s]
	\localenvironment syllabus-s-setup
\stoplocalenvironment	
\startlocalenvironment[syllabus-p]
	\localenvironment syllabus-p-setup
\stoplocalenvironment	

% setups local to p-version, file syllabus-p-setup.tex
\startlocalenvironment[syllabus-p-setup]
\writestring{LOADED ENVIRONMENT SYLLABUS-P-SETUP}\writeline
\stoplocalenvironment

% setups local to s-version, file syllabus-s-setup.tex
\startlocalenvironment[syllabus-s-setup]
\writestring{LOADED ENVIRONMENT SYLLABUS-S-SETUP}\writeline
\stoplocalenvironment

Running from product syllabus-s.tex I get this in the log:
systems         : begin file syllabus-setup at line 10
(./syllabus-setup.tex
LOADED ENVIRONMENT SYLLABUS-SETUP

systems         : begin file syllabus-s-setup at line 6
(./syllabus-s-setup.tex
LOADED ENVIRONMENT SYLLABUS-S-SETUP

)
systems         : end file syllabus-s-setup at line 6
systems         : begin file syllabus-p-setup at line 10
(./syllabus-p-setup.tex
LOADED ENVIRONMENT SYLLABUS-P-SETUP

)
systems         : end file syllabus-p-setup at line 10

And this shows that running the product syllabus-s still loads both  
localenvironments and goes inside both \startlocalenvironments!
What I am doing wrong here?


Hans van der Meer

  reply	other threads:[~2006-07-21 18:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-21 10:20 Hans van der Meer
2006-07-21 12:58 ` Taco Hoekwater
2006-07-21 18:02   ` Hans van der Meer [this message]
2006-07-22  8:19     ` Taco Hoekwater
2006-07-22 11:38       ` Hans van der Meer
2006-07-22 12:19         ` document structure (small bug) Taco Hoekwater
2006-07-22 12:40           ` Hans van der Meer

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=63C28589-B3A5-410D-BE33-3A07730BA871@science.uva.nl \
    --to=hansm@science.uva.nl \
    --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).