Changes

Jump to navigation Jump to search
48 bytes added ,  19:10, 4 October 2018
move \product and \project below \start...
If you tex (compile) one single component (e.g. a chapter of a book) or product (e.g. one volume of a magazine), the environment file of the project is used.
In addition, you have to keep in mind that when compiling a product or component file, ConTeXt goes "up" to the project file and compiles everything it finds in there that is not a <{{cmd>|product</cmd> }} (e.g. table of content, sectioning commands, text, <{{cmd>|component</cmd> }} etc.). So all the things on project level have to be put inside a <{{cmd>|product</cmd>}}, otherwise they will show up in the individual components (or products), too. That also makes it problematic to use <{{cmd>|component</cmd> }} directly inside a project file, i.e. you '''have ''' to use <{{cmd>|product</cmd>}}, you can't skip it. While you can compile ("tex") products and single components, the project is not intended for compiling; trying might lead to infinite inclusion loops and the error message "TeX capacity exceeded".
==File and directory setup==
\product prd_year2004-03
\product prd_year2004-04
 
\product tableofcontent
\stopproject
\startcomponent c_editorial
\product prd_year2004-01 % but you can use it in other products anyway
\project project_mymag
\title{Editorial}
{|
| || <{{cmd>|project</cmd> }} || <{{cmd>|environment</cmd> }} || <{{cmd>|product</cmd> }} || <{{cmd>|component</cmd> }}
|-
| <{{cmd>|starttext</cmd> }} || &mdash; || once || &mdash; || at every mention
|-
| <{{cmd>|startproject</cmd> }} || &mdash; || once || once || &mdash;
|-
| <{{cmd>|startenvironment</cmd> }} || &mdash; || once || &mdash; || &mdash;
|-
| <{{cmd>|startproduct</cmd> }} || once || once || &mdash; || at every mention
|-
| <{{cmd>|startcomponent</cmd> }} || once || once || &mdash; || at every mention
|}
==See also==
Hans Hagen (2011) [http://pragma-ade.com/general/magazines/mag-1101.pdf Project Structure], ConTEXt ConTeXt magazine #1101.

Navigation menu