% Project in ConTeXt
% Basic layout


\startproject Example

\environment layout

\product beginmat       %Frontmatter: Intro, lists etc.

\startbodymatter

\product Chapter1       %Chapter 1 contains components:
                              %Component 11
                              %Component 12
                              %Component 13

\product Chapter2    %Chapter 2 no components
\product Chapter3    %Chapter 3 contains components:
                              %Component 31
                              %Component 32

\stopbodymatter

\product backmat     %Backmatter: Index
\product appendix    %Appendices: contanining components
                              %Impressum

\nomorefiles

\stopproject


% Project-product file

\startproduct Chapter1
\project Example

\component Component11
\component Component12
\component Component13

\stopproduct


%Project-component file

\startcomponent Component11
\product Chapter1
\project Example

\stopcomponent

%environment file

\startenvironment layout

\startmode[book]

  .. all kind of setupinformation ..

\stopmode

\startmode[screen]

  .. all kind of setupinformation ..

\stopmode


\startmode[presentation]

  .. all kind of setupinformation ..

\stopmode


% Running the project


texexec --mode=book Example --> the whole project is produced

texexec --mode=book Chapter1 --> the chapter 1 with all its components is typeset

texexec --mode=book Component11 --> the component number 11 is typeset.



% Structuring the content

You might want to perform specific tasks or specific bits of content only when using a certain mode

\doifmode{screen}{%

    all what you want to do only for this condition
}

\startmode[book]

    what should be done when in mode book

\stopmode
