Section 45.10 Source Options
Subsection 45.10.1 Directory Management
The destination for files produced automatically via PreTeXt tools is specified as a path relative to the main PreTeXt source file. Study Section 5.7 carefully for the exact details. The
/publication/source/directories
element has the attribute:
-
@generated: a directory of files produced automatically via PreTeXt tools, from aspects of your PreTeXt source.
The companion directory of files produced independently of the project is a property of your source, declared with a
@external attribute on a <directories> element within <docinfo> (Section 4.25); an @external attribute here is deprecated, but honored while the <docinfo> is silent. The @generated attribute is optional: with no declaration at all, a directory named generated next to the main PreTeXt source file is assumed, and created when it is needed.Subsection 45.10.2 Versions
Different versions of your source can be constructed by marking elements as belonging to different components. Each component has a name of your choosing, and then you elect components to include or exclude via the publication file. See Section 27.2 for the exact details and examples.
To specify components to include, the
/publication/source/version/@include
attribute should be a space-separated list of component names. For example, if
<version> hasinclude="videos labs"
then a version would be created that includes all of the videos and all of the labs (since the author placed them into these components), but would not contain any elements whose component is
genome. Note that videos, labs, and genome are names peculiar to the organization of your project, and are not PreTeXt element names (even if they are used consistently with similar element names, such as <video>).Subsection 45.10.3 Extras
Some source material is optional, and may be included based on the publisher and the audience. The values of the attributes below are filenames. They could be absolute paths (which is not very portable, and so likely a bad idea), or relative paths. In the latter case, they are relative to the source file that contains the
<pretext> element (the “main” file if you have modularized your source). Temporarily using an absolute path can be useful when you are having problems with any of these files and want to eliminate one variable while debugging.
The
/publication/source
element can have the following attributes:
-
@customizations: A filename for a structured file of<custom>elements, each with a@nameattribute and content meant to be substituted into source. See Section 27.1 for details about the use of customizations. -
@private-solutions: A filename for a structured file of<hint>,<answer>,<solution>that will see limited distribution (for example, instructors only). See Section 38.2 for details about the use of a private solutions file.
