Skip to main content

The PreTeXt Guide

Section 44.7 Source Options

Subsection 44.7.1 Directory Management

Two directories of additional files need to be specified, as paths relative to the main PreTeXt source file, in order that they can be managed automatically for the construction of various output formats. Study Section 5.6 carefully for the exact details. To set these directories, the
element must have the following two attributes:
  • @external: a directory of files produced independently of your project.
  • @generated: a directory of files produced automatically via PreTeXt tools, from aspects of your PreTeXt source.
It is an error to only specify one of the two directories. It is all or nothing.

Subsection 44.7.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
attribute should be a space-separated list of component names. For example, if <version> has
include="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 44.7.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.
element can have the following attributes:
  • @customizations: A filename for a structured file of <custom> elements, each with a @name attribute 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 37.2 for details about the use of a private solutions file.
  • @webwork-problems: A filename for a structured file of multiple representations of WeBWorK problems. It is now recommended that when using WeBWorK, that you also use managed directories (see Section 5.6), in which case this attribute is unsused.