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