Re: Questions about \start-ing things with \environment and \project
Jim <[email protected]>
| Newsgroups | gmane.comp.tex.context |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Mar 25, 2026 at 22:38 (+0100), Henning Hraban Ramm wrote:
Hraban,
thanks very much for your answers. Just some small follow-ups...
> Am 25.03.26 um 21:17 schrieb Jim:
>> Q2: Is it "accidental" that \startcomponent and \startproduct work for me
>> right now, or is it part of ConTeXt's design that they work like this?
> You should be able to typeset a single component, but (in my older
> experience, not recently checked) you must include the \environment, and
> it can matter if your components are in subdirectories (paths of
> environment, images etc.).
That makes sense.
FWIW, *part* of what I am trying to do here is to improve how AUCTeX deals
with ConTeXt. If I want to typeset a small portion of a large document,
AUCTeX needs to find what the LaTeX people call the "preamble", which is
(AIUI) the part before the "\begin{document}". But ConTeXt is more
flexible, and I'm trying to hone in on how the "preamble" can be
automatically found.
If a document uses
\environment ...
\startcomponent ...
...
then one can say the "preamble" is that stuff before \startcomponent.
But if one uses them the other way, automatically finding the "preamble" is
trickier. Or maybe in general next to impossible.
>> Q3: When one uses \startproduct, does it matter if any \environment
>> commands go before or after? That is, are both of these equally valid,
>> or is one The Right Way and one The Wrong Way?
>> (a)
>> \environment myenv
>> \startproduct mydoc
>> ...
>> (b)
>> \startproduct mydoc
>> \environment myenv
>> ...
>> Q4: When one uses \startproduct, does it matter if any \project
>> commands go before or after? That is, are both of these equally valid,
>> or is one The Right Way and one The Wrong Way?
>> (a)
>> \project myproject
>> \startproduct mydoc
>> ...
>> (b)
>> \startproduct mydoc
>> \project myproject
>> ...
> Not sure. I have \environment, \project etc. after \startcomponent /
> \startproduct
Good to know that your way works. ANSS does it the other way around
(\environment before \start{product,component}), perhaps because JAL is an
emacs user and that made it work for him.
>> Q5: In addition to \starttext, \startTEXpage, \startcomponent and
>> \startproduct, are there any other \start<something> commands which
>> signify the start of the text to be typeset?
> e.g. \startdocument or any other “documents” that are defined with
> \definedocument
> also \startMPpage
Thanks for those two. I expect that user-defined commands to start the
document will be difficult to deal with, but I'll add \startdocument and
\startMPpage (I should have remembered that one!) to the list.
Cheers.
Jim
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________