ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Building a Component
@ 2016-09-12 11:03 Malte Stien
  2016-09-12 12:29 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Malte Stien @ 2016-09-12 11:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

I am just familiarising myself with projects/products/components. I have a number of documents that all belong to a large set of Reference Manuals and so far I have built them all separately and have relied a lot on the simple \input... statement. I assume with projects/products/components I might be able to do something much smarter. Let’s see.

I get stuck quite early on, though. I have created a minimal component file ‘component-1.tex’ and when I build it, context runs into what seems to be an infinite recursion. Here is the file:


\project test-project
\product reference-manual-1
\startcomponent component-1
\starttext

\section[c1-s1]{Component 1 Section 1}
This is a paragraph in Component 1 Section 1

\stoptext
\stopcomponent


...and here is the console when I run it:


> context component-1.tex
...
...
...
open source     > 196 > 198 > component-1.tex
open source     > 197 > 199 > reference-manual-1.tex
open source     > 198 > 200 > component-1.tex
open source     > 199 > 201 > reference-manual-1.tex
open source     > 200 > 202 > component-1.tex
open source     > 201 > 203 > reference-manual-1.tex

tex error       > tex error on line 2 in file reference-manual-1.tex: ! TeX capacity exceeded, sorry [text input levels=600]


\m_syst_action_nop #1 ->\clf_startproduct {#1}
                                              
l.11 \startproduct reference-manual-1
                                   

1     % \project test-project
2 >>  \startproduct reference-manual-1
3     
4     \component component-1
5     
6     \stopproduct
7     


Here is reference-manual-1.tex:


\project test-project
\startproduct reference-manual-1

\component component-1

\stopproduct


This is with the latest context downloaded today. All I really know about this is from here http://wiki.contextgarden.net/Project_structure; anything else I should be reading?

Any ideas? Thank you,
Malte.

--
“The Electric Monk was a labour-saving device, like a dishwasher or a video recorder... Electric Monks believed things for you, thus saving you what was becoming an increasingly onerous task, that of believing all the things the world expected you to believe. ― Douglas Adams, Dirk Gently's Holistic Detective Agency

___________________________________________________________________________________
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: Building a Component
  2016-09-12 11:03 Building a Component Malte Stien
@ 2016-09-12 12:29 ` Wolfgang Schuster
  2016-09-12 23:28   ` Malte Stien
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2016-09-12 12:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 886 bytes --]

> Malte Stien <mailto:malte@stien.de>
> 12. September 2016 um 13:03
> Hi all,
>
> I am just familiarising myself with projects/products/components. I 
> have a number of documents that all belong to a large set of Reference 
> Manuals and so far I have built them all separately and have relied a 
> lot on the simple \input... statement. I assume with 
> projects/products/components I might be able to do something much 
> smarter. Let’s see.
>
> I get stuck quite early on, though. I have created a minimal component 
> file ‘component-1.tex’ and when I build it, context runs into what 
> seems to be an infinite recursion. Here is the file:
>
>
> \project test-project
> \product reference-manual-1
Move the two lines after \startcomponent.
> \startcomponent component-1
> \starttext
You don’t need \starttext/\stoptext when you use product and component 
files.

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2156 bytes --]

[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Building a Component
  2016-09-12 12:29 ` Wolfgang Schuster
@ 2016-09-12 23:28   ` Malte Stien
  0 siblings, 0 replies; 3+ messages in thread
From: Malte Stien @ 2016-09-12 23:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2533 bytes --]

Hi Wolfgang,

Thank you, that works indeed. It seems to be incorrect on http://wiki.contextgarden.net/Project_structure <http://wiki.contextgarden.net/Project_structure>; see Example Files/Component.

What is the significance of those two lines, though? The documentation states I can use the Component in any Product even if not specified on the \product line. I assume it just makes sure that the environment file for the Product is pulled in, would that be right? Does it do anything else?

Analogous, the \project line just pulls in environment file for the project?

Thank you,
Malte.

--
“The Electric Monk was a labour-saving device, like a dishwasher or a video recorder... Electric Monks believed things for you, thus saving you what was becoming an increasingly onerous task, that of believing all the things the world expected you to believe. ― Douglas Adams <http://www.goodreads.com/author/show/4.Douglas_Adams>, Dirk Gently's Holistic Detective Agency <http://www.goodreads.com/work/quotes/1042123>
> On 12 Sep 2016, at 22:29 , Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
> 
>> Malte Stien <mailto:malte@stien.de> 12. September 2016 um 13:03
>> Hi all,
>> 
>> I am just familiarising myself with projects/products/components. I have a number of documents that all belong to a large set of Reference Manuals and so far I have built them all separately and have relied a lot on the simple \input... statement. I assume with projects/products/components I might be able to do something much smarter. Let’s see.
>> 
>> I get stuck quite early on, though. I have created a minimal component file ‘component-1.tex’ and when I build it, context runs into what seems to be an infinite recursion. Here is the file:
>> 
>> 
>> \project test-project
>> \product reference-manual-1
> Move the two lines after \startcomponent.
>> \startcomponent component-1
>> \starttext
> You don’t need \starttext/\stoptext when you use product and component files.
> 
> Wolfgang
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 5847 bytes --]

[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-12 23:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12 11:03 Building a Component Malte Stien
2016-09-12 12:29 ` Wolfgang Schuster
2016-09-12 23:28   ` Malte Stien

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