Skip to main content

Section 30.17 File

The file created by PreTeXt will contain the majority of your content in a form that you could use it in a new standalone document, in accordance with Principle 1.1.1:9. However some constructions which are not natural in , such as a <sidebyside>, may be cumbersome to reuse. We continue to improve and refine these situations, though.

Our philosophy is to create and use many new environments, allowing styling and fine-tuning to occur in the preamble. This makes the body look more like simple and allows for much greater flexiblity in styling, along with greater reliability for successful compilation.

The existence, variety, and quality of packages changes continuously. We can, and will, swap out some packages for replacements, as needed or desirable. This is to your advantage, as you are absolved of the need to evaluate competing packages, and to insure that they do not clash with each other. So resist the temptation to modify the output significantly prior to compilation, as it will inevitably lead to frustration. The file is a means to an end—it allows us to create a PDF with excellent typography, and especially for the demands of technical discplines, such as STEM and music. It is meant to ephemeral, not archival.

If some other variety of (or ) file is desired, a new conversion could be created. Many of the more complicated aspects of any conversion are purposely isolated in the pretext-common.xsl file so that they can be easily re-purposed and there is consistency across output formats.

Best Practice 30.17.1. Only Edit Files Rarely.

We want to stress that the file created by various conversions is mean to be an intermediate format. In other words, it is ephemeral. We try to make it clean and organized, but it is not the a human would write. You might be able to recycle a paragraph or two in other documents you create without PreTeXt. But it is not meant to be stable or archival and no long-term use is supported in any way. In other words, it is not a supported output format, beyond compiling to a PDF without errors.

Having said all that, you may find it necessary to manually adjust a file to control widows or orphans, or maybe the placement of a graphics file, or similar adjustments. We view this as the final step before making a new edition, which might be a PDF that you submit to a print-on-demand service (Chapter 42). So this might be an annual exercise, at the most frequent.