Skip to main content

The PreTeXt Guide

Section 44.3 PDF () Options

These options affect the conversion to , which can in turn be converted into PDF. See Chapter 30 for a more general overview of this conversion with more details. This includes some existing options that will eventually migrate to the publication file.

Subsection 44.3.1 Print Option

The conversion to can produce a PDF optimized for print, or optimized for use electronically on a screen. The
attribute can have the value yes to produce a print version, or the value no to produce an electronic version. The default is an electronic version. See Section 30.1 for more detail. Note that the use of page numbers in cross-references has different default behavior based on this option (which can be overidden, see Subsection 44.3.6).

Subsection 44.3.2 Sides Option

The conversion to can produce a PDF designed for printing on only one side of the page, or on both sides of the page. The
attribute can have the value one for a one-sided version, or the value two to produce a two-sided version. The default depends on if the output is electronic (one-sided) or print (two-sided). See Section 30.4 for more detail.

Subsection 44.3.3 Page Matching

A two-sided PDF will contain extra blank pages to ensure that certain divisions (usually parts and chapters) always open on an odd-numbered page. Since a one-sided PDF will omit these extra blank pages, the page numbers may get out of sync between the two versions. The
attribute can be used to force the page numbers back into sync by either also inserting the extra blank pages in a one-side PDF version (by setting the attribute to value add-blanks) or by simply skipping the page number for pages that would have been blank in the pagination (by setting the attribute to value skip-pages). If the attribute value is no for a one-sided PDF output (the default), then no adjustment is made and divisions open on the next consecutive page whether odd- or even-numbered.
Note that this attribute is ignored for two-sided PDF output, where extra blank pages are always inserted. Also note that page-matching between one- and two-sided PDF versions may require a consistent specification of the /publication/latex/@pageref option (Subsection 44.3.6). See Section 30.9 for a more thorough discussion of page number fidelity.

Subsection 44.3.4 Font Sizes

The document-wide point size can be specified with the
attribute can have the value 8, 9, 10, 11, 12, 14, 17, 20, which are interpreted in points (“pt”) as the unit of measure. The default value is 10. See Section 30.5 for details.

Subsection 44.3.5 Page Shape Options

The following options affect the “shape” of each page, so are in a way less “global” than some of the previous options. These are both attributes of the
  • Text Alignment, Right Edge.
    to values flush (default) or ragged to influence the right edge of the block of text on a page. See Section 30.3 for more.
  • Text Alignment, Bottom Edge.
    to values flush or ragged (default) to influence the bottom edge of the block of text on a page. See Section 30.3 for more.
The content of the element
element will feed directly into a \geometry{} element, with no modifications. (In other words, all whitespace, such as newlines and indentation, will be preserved.) Be sure to carefully read the advice, an example, and further detail at Section 30.6.
The attribute
may be set to the value none, or not specified at all, and nothing will happen. Otherwise, it is set to a paper size, then the logical page (whose size is presumably set by the geometry package) will be centered on the physical page specified, with marks at each corner delineating the logical page. Some publishers request camera-ready copy to have these indications. Paper sizes are arguments to the crop package, and as of 2023-05-19 the possible values were:
a0, a1, a2, a3, a4, a5, a6,
b0, b1, b2, b3, b4, b5, b6,
letter, legal, executive
There is no error-checking of these values. See Section 30.6 for more and examples.

Subsection 44.3.6 Page Numbers in Cross-References

to values yes or no to enable or disable the use of page numbers in cross-references (typically achieved with the <xref> element). The default varies, as it is dependent on the print option (Subsection 44.3.1). See Section 30.8 for more on the defaults.

Subsection 44.3.7 Worksheet Options

By default, worksheets are formatted differently than other pages, including customizable margins, workspace between exercises, and on their own pages. This separate formatting can be ignored, causing worksheets to be treated like any other division, using the
attribute, setting the value to no. The default value is yes.

Subsection 44.3.8 Covers

element has attributes @front and @back whose values can be paths to PDF files to use as the first and last page of the output PDF. The paths should be relative to your directory of external files, much like a raster image you might bring to your project being given by a @source attribute. See Section 5.6 for more about managed directories, and Section 30.13 for more detail about covers.

Subsection 44.3.10 Draft Mode

to values yes or no to enable or disable the use of the draft mode. The default is no. See Section 5.9 for more detail.

Subsection 44.3.11 Snapshot Record

to values yes or no to enable or disable the generation of a “snapshot” record of the LaTeX packages in use. The default is no. See Section 30.18 for more detail.