From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/12675 Path: main.gmane.org!not-for-mail From: "Willi Egger" Newsgroups: gmane.comp.tex.context Subject: Re: ConTeXt project structure? Date: Tue, 22 Jul 2003 14:05:12 +0200 Organization: BOEDE Sender: ntg-context-admin@ntg.nl Message-ID: <002201c35049$8d3c7490$0100a8c0@vademecum> References: Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_001B_01C3505A.44B1FD60" X-Trace: main.gmane.org 1058875774 25435 80.91.224.249 (22 Jul 2003 12:09:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 22 Jul 2003 12:09:34 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Tue Jul 22 14:09:33 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19evwo-0006V9-00 for ; Tue, 22 Jul 2003 14:08:50 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 8FE0E10B1B; Tue, 22 Jul 2003 14:09:57 +0200 (MEST) Original-Received: from smtpzilla3.xs4all.nl (smtpzilla3.xs4all.nl [194.109.127.139]) by ref.ntg.nl (Postfix) with ESMTP id 045E510B1B for ; Tue, 22 Jul 2003 14:05:44 +0200 (MEST) Original-Received: from vademecum (a80-126-172-1.adsl.xs4all.nl [80.126.172.1]) by smtpzilla3.xs4all.nl (8.12.9/8.12.9) with SMTP id h6MC5XpY049938 for ; Tue, 22 Jul 2003 14:05:44 +0200 (CEST) Original-To: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:12675 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:12675 This is a multi-part message in MIME format. ------=_NextPart_000_001B_01C3505A.44B1FD60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi Gerben, > > It is probably my lack of brain cells, but I do not understand chapter > 2 of the ConTeXt manual at all. > > Suppose I have a manual-like document and I want to produce different > PDF-files out of it: > > 1. The book > 2. The book in another layout > 3. The book in screen format with navigation > 4. A simple presentation with bullet points, one or more pages per > chapter > > As I understand it I will need 4 environments: No you can define modes in a single environment file. Later you can ask texexec to use one ore more of the defined modes. texexec --mode=mode1 texexec --mode=mode1,mod5 > > .../foo/bookenv.tex > .../foo/book2env.tex > .../foo/bookscreenenv.tex > .../foo/presentation.tex > > and I can put each chapter in a component file, i.e. chapter1.tex, > chapter2.tex etc. > > .../foo/chapter1.tex > .../foo/chapter2.tex > You can do this. It might be worthwhile to think about making the chapter a product, then you keep the possibility to add components if the size of the chapters is too large. > But here my understanding stops. > - Should I create a project file for each of the 4 modes above? And put > these in different subdirectories as in: > > .../foo/book/book.tex > .../foo/book2/book2.tex No, use modes in the environment file. > > etc.? Or do I use multiple environments in one project and I can get 4 > PDF's as a result? texexec --mode=mode-x --result=jobname-mode-x jobname Or are these multiple products (I would guess this, > but how then to set it up)? Should my chapter files contain > \startcomponent \stopcomponent and does that mean they are > independently compilable? Any level of the project can be compiled separatly. So you can compile a component, a product or the project. > > I have been reading and re-reading this, but the relation between > project, environment, component and product keeps escaping me. The basic idea is not that complicated: The project(file) is the cuboard The product(file)s are drawers of the cupboard The component(file)s are boxes in one of the drawers whithin the cupboard. Teh environment is used to handle the whole project. > > Is there a good example somewhere? > Whether is is a good example you will have to decide... Success Willi ------=_NextPart_000_001B_01C3505A.44B1FD60 Content-Type: application/octet-stream; name="project.tex" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="project.tex" % 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=3Dbook Example --> the whole project is produced texexec --mode=3Dbook Chapter1 --> the chapter 1 with all its components = is typeset texexec --mode=3Dbook 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 ------=_NextPart_000_001B_01C3505A.44B1FD60--