Need help with project: TeX capacity exceeded
![](https://secure.gravatar.com/avatar/880e9a15b17a0bf7159f4e31030a9be2.jpg?s=120&d=mm&r=g)
Hello, this is my second try to start with context and I can’t even do the first step. I’m planing to convert a large but simple document to context. The document consists of 3 Parts. Each part has several chapters. Thus I started to build a project with three products, see enclosed archive. According to my understanding I should be able to context c_01 to get one chapter context prd_A to get one product context project_ecm to get the whole book. The first two steps lead to circular inclusion and the TeX capacity error. The last step doesn’t load the products and creates no files. I got my information from https://wiki.contextgarden.net/Project_structure and think I adapted them correctly, but obviously I didn’t. I included the log files in case there is something broken with my setup. Greetings Axel
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Hi,
On 4 Oct 2018, at 08:47, Axel Kielhorn
wrote: Hello,
this is my second try to start with context and I can’t even do the first step.
I’m planing to convert a large but simple document to context. The document consists of 3 Parts. Each part has several chapters.
Thus I started to build a project with three products, see enclosed archive.
According to my understanding I should be able to context c_01 to get one chapter context prd_A to get one product context project_ecm to get the whole book.
Any whole book should be a product, and the Parts should just be components. The project level is only there to connect meta-info across a book series. You are not supposed to run ‘context’ on the project file. That said, it is definitely not your installation or understanding of the wiki page that creates the circular inclusion. The same happens here. I discovered it works OK if I move the \product to within the \startcomponent, and I assume that is how it supposed to work: \startcomponent \product prd_1 … \stopcomponent At a guess, I think the wiki page is wrong. But before editing that, I would like to have confirmation of the above assumption. Best wishes, Taco
![](https://secure.gravatar.com/avatar/880e9a15b17a0bf7159f4e31030a9be2.jpg?s=120&d=mm&r=g)
Am 04.10.2018 um 09:27 schrieb Taco Hoekwater
: According to my understanding I should be able to context c_01 to get one chapter context prd_A to get one product context project_ecm to get the whole book.
Any whole book should be a product, and the Parts should just be components. The project level is only there to connect meta-info across a book series. You are not supposed to run ‘context’ on the project file.
I see. I’ll probably keep it as three books. It’s easy to change later as long as the components have different names. Right now that’s just a limitation of the word processor.
That said, it is definitely not your installation or understanding of the wiki page that creates the circular inclusion. The same happens here. I discovered it works OK if I move the \product to within the \startcomponent, and I assume that is how it supposed to work:
\startcomponent \product prd_1 … \stopcomponent
Works here as well, thank you. What about the project? Right now it is outside the \start{product|component} and it works. Now it is inside the \start{product|component} and it works as well. Next question: Should the environment be inside \startproject \stopproject? It seems to make no difference. Thus having the whole file inside \start{project|product|component} \stop… would be a good idea and consistent.
At a guess, I think the wiki page is wrong. But before editing that, I would like to have confirmation of the above assumption.
Thanks for the quick response, now I can tell pandoc to convert the book to context:-) Greetings Axel
![](https://secure.gravatar.com/avatar/e5aa6984b53b8925e405ebbdbc051ad9.jpg?s=120&d=mm&r=g)
Am 2018-10-04 um 10:08 schrieb Axel Kielhorn
Thus having the whole file inside \start{project|product|component} \stop… would be a good idea and consistent.
That’s what I do. Since I wrote that wiki page (some years ago) I’ll change it. Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
![](https://secure.gravatar.com/avatar/880e9a15b17a0bf7159f4e31030a9be2.jpg?s=120&d=mm&r=g)
Am 04.10.2018 um 20:59 schrieb Henning Hraban Ramm
: Am 2018-10-04 um 10:08 schrieb Axel Kielhorn
: Thus having the whole file inside \start{project|product|component} \stop… would be a good idea and consistent.
That’s what I do. Since I wrote that wiki page (some years ago) I’ll change it.
I appreciate that. How about offering a skeleton project for download? Here is my corrected ECM with the following README: This is a skeleton project. You can copy it and change the files to contain your content. The top level project collects metatdata to make all products have the same layout. It is not meant to be processed by context. The products are used to generate the whole book, but you can process each component seperately to reduce the processing time. Greetings Axel
![](https://secure.gravatar.com/avatar/e5aa6984b53b8925e405ebbdbc051ad9.jpg?s=120&d=mm&r=g)
Am 2018-10-05 um 08:31 schrieb Axel Kielhorn
How about offering a skeleton project for download?
I’m offering a Python script that creates projects: https://github.com/fiee/tools/blob/master/contextproject.py This avoids renaming everything. In my bigger projects I use additional shell scripts to create directories and generic content (e.g. ISBN barcode). Since these are very specific it wouldn’t make sense to share them. Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
I took a look at your example files and there a few things which can be improved. Product file: 1. You don’t need the actual name of the current file and use * instead 2. You can use brackets as delimiters for the file name instead of a space after the name 3. In products you can put all content in a document environment which has hooks to insert text etc. at the begin and end of the document (which can be used to insert a titlepage or endpage). You can even use \startdocument (or \setupdocument) to set the document name in the pdf viewer (yes it can also be done with \setupinteraction but \startdocument is nicer). A minimal file would be \startproduct [*] \project [project_skel] \startdocument \component [c_01] \component [c_02] \stopdocument \stopproduct or \startproduct [*] \project [project_skel] \startdocument \startbodymatter \component [c_01] \component [c_02] \stopbodymatter \stopdocument \stopproduct Environment file: 1. Don’t load the project from your environment file 2. Don’t use \usepath to set the folders for the product files, use it instead to set the folders for your component files which are loaded from the products 3. You can remove the braces around the subfolder which aren’t necessary. Wolfgang Axel Kielhorn schrieb am 05.10.18 um 08:31:
Am 04.10.2018 um 20:59 schrieb Henning Hraban Ramm
: Am 2018-10-04 um 10:08 schrieb Axel Kielhorn
: Thus having the whole file inside \start{project|product|component} \stop… would be a good idea and consistent. That’s what I do. Since I wrote that wiki page (some years ago) I’ll change it. I appreciate that.
How about offering a skeleton project for download?
Here is my corrected ECM with the following README:
This is a skeleton project. You can copy it and change the files to contain your content.
The top level project collects metatdata to make all products have the same layout. It is not meant to be processed by context.
The products are used to generate the whole book, but you can process each component seperately to reduce the processing time.
Greetings Axel
___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/880e9a15b17a0bf7159f4e31030a9be2.jpg?s=120&d=mm&r=g)
Am 05.10.2018 um 17:33 schrieb Wolfgang Schuster
: I took a look at your example files and there a few things which can be improved.
Product file:
1. You don’t need the actual name of the current file and use * instead
2. You can use brackets as delimiters for the file name instead of a space after the name
Does this mean I can use a space in the filename?
3. In products you can put all content in a document environment which has hooks to insert text etc. at the begin and end of the document (which can be used to insert a titlepage or endpage). You can even use \startdocument (or \setupdocument) to set the document name in the pdf viewer (yes it can also be done with \setupinteraction but \startdocument is nicer).
A minimal file would be
\startproduct [*]
\project [project_skel]
\startdocument
\component [c_01] \component [c_02]
\stopdocument
\stopproduct
or
[..]
Environment file:
1. Don’t load the project from your environment file
2. Don’t use \usepath to set the folders for the product files, use it instead to set the folders for your component files which are loaded from the products
Does this mean that I should use a product level environment file for the \usepath? (Accessing things like ../img_global?)
3. You can remove the braces around the subfolder which aren’t necessary.
Thanks for the clarification. I have updated my project. Greetings Axel
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Axel Kielhorn schrieb am 05.10.18 um 18:44:
Am 05.10.2018 um 17:33 schrieb Wolfgang Schuster
: I took a look at your example files and there a few things which can be improved.
Product file:
1. You don’t need the actual name of the current file and use * instead
2. You can use brackets as delimiters for the file name instead of a space after the name Does this mean I can use a space in the filename?
It’s possible but the safer method is to use a underscore or hyphen in file names.
3. In products you can put all content in a document environment which has hooks to insert text etc. at the begin and end of the document (which can be used to insert a titlepage or endpage). You can even use \startdocument (or \setupdocument) to set the document name in the pdf viewer (yes it can also be done with \setupinteraction but \startdocument is nicer).
A minimal file would be
\startproduct [*]
\project [project_skel]
\startdocument
\component [c_01] \component [c_02]
\stopdocument
\stopproduct
or [..]
Environment file:
1. Don’t load the project from your environment file
2. Don’t use \usepath to set the folders for the product files, use it instead to set the folders for your component files which are loaded from the products Does this mean that I should use a product level environment file for the \usepath? (Accessing things like ../img_global?)
With \usepath (and \usesubpath) you can set folders which are searched when you use the \component command to load chapters etc. in your product (or component) files. To load images from other folder you use \setupexternalfigure[directory=...] where you can also use "../images" to load them from a global folder for all documents in your project. Wolfgang
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Taco Hoekwater schrieb am 04.10.18 um 09:27:
Hi,
On 4 Oct 2018, at 08:47, Axel Kielhorn
wrote: Hello,
this is my second try to start with context and I can’t even do the first step.
I’m planing to convert a large but simple document to context. The document consists of 3 Parts. Each part has several chapters.
Thus I started to build a project with three products, see enclosed archive.
According to my understanding I should be able to context c_01 to get one chapter context prd_A to get one product context project_ecm to get the whole book. Any whole book should be a product, and the Parts should just be components. The project level is only there to connect meta-info across a book series. You are not supposed to run ‘context’ on the project file.
That said, it is definitely not your installation or understanding of the wiki page that creates the circular inclusion. The same happens here. I discovered it works OK if I move the \product to within the \startcomponent, and I assume that is how it supposed to work:
\startcomponent \product prd_1 … \stopcomponent
At a guess, I think the wiki page is wrong. But before editing that, I would like to have confirmation of the above assumption.
The \product command is more or less useless because it provides only the information of the main file of the document. The real question is where you should put the \project or \environment commands. When you put them before \startproduct you’re loading your fonts before the start of the document and the Latin Modern fallback isn’t used but when you put them after \startproduct you load your font after the Latin Modern fallback. One advantage when you load the project/environment after \startproduct (or \startcomponent) is that you can use the product or component modes in your environment file to set different image or subpath folder dependant on which file type you typeset. In the end it doesn’t matter whether you load your project/environment before or after \startproduct because there is no difference. Wolfgang
participants (4)
-
Axel Kielhorn
-
Henning Hraban Ramm
-
Taco Hoekwater
-
Wolfgang Schuster