Skip to main content

The PreTeXt Guide

Section 30.6 Page Shape

The conversion to defaults to US Letter paper with reasonable margins. However, the geometry package
 1 
ctan.org/pkg/geometry
has numerous options for paper sizes and margins. The publication file can be used to insert any configuration the package supports. See Subsection 44.3.6 for the exact syntax.
Note that if you change the paper size, you may want to change the text width computed by PreTeXt, and the more changes you make, the more default settings you may need to adjust. However, if you are producing your book for print-on-demand (Chapter 43) getting the page size and margins just right is a key step of the process.
Note also that when you use the <geometry> element of the publication file, the content of the element (text between the opening and closing tags) will be duplicated exactly into a source file. Being careless here is a good explanation for the compilation step to fail.
Here is an example:
<latex>
  <page>
    <geometry>a4paper,total={16cm,25cm}</geometry>
  </page>
</latex>
twhich will produce in the output
\geometry{a4paper,total={16cm,25cm}}
An electronic PDF may be printed on physical paper, but perhaps you want to make a version that works well on a portable device that naturally supports a portrait orientation, such as an Android tablet, an iPad, a Kindle (device or application), smart phone, Sony Digital Paper, or a ReMarkable tablet. Aspect ratios vary across these devices, but once you settle on a target ratio, we have had good luck with the following algorithm and parameters:
  1. Specify 10 point text
  2. Text width of about 4.5 inches
  3. Add quarter-inch left/right margins to compute text width
  4. Use aspect ratio to compute an overall height (about 6.5 inches)
  5. Subtract quarter-inch top and bottom margins to obtain text height
Then you can provide the geometry package the overall size as the papersize and the text width and text height as the total size of the body, resulting in equal (tight) margins all around, and good use of limited screen real estate. These parameters create a PDF that is very legible on a larger smart phone, and for fine detail, rotating the device to landscape works well. Really.
Suppose you are a publisher, or an author who is also your publisher, and you wish to manufacture a paperback copy of your book in a 6-inch wide by 9-inch tall version. It is unlikely your printer has paper of this size. Use the geometry option above to specify the logical size of the paper for your book and then set margins, etc. to determine exactly how the text block sits on the page. Then there is a @crop-marks option available though the publication file. You set it to a paper size describing the paper in your printer, likely letter (US) or a4 (Europe). Then your logical page will be centered on the physical page, and indications in each corner will describe the boundaries of the page.
To see this in action, you need to explicity set a smaller page size. So the value of the geometry could be set to
paperwidth=6in,paperheight=9in,total={5in,7in}
Do not forget to turn off any page-scaling in your printer configuration before printing onto paper. See Subsection 44.3.6 for the exact syntax of how to enable crop marks.
Crop marks may be requested by a publisher, when it is understood that you are providing camera-ready copy. Or you may find it useful for visualizing how your text and margins will look at a smaller page size. The crop package has other useful options, such as framing the entire logical page. You can hand-edit these into your file, or make a feature request.

Best Practice 30.6.1. Avoid Too Much Text on a Printed Page.

With freedom comes responsibility. Resist the temptation to pack in as much text on the page as you can. PreTeXt varies the width of the text in reaction to the font size and is already very close to the maximum number of characters per line for comfortable reading by humans. Similarly, very narrow margins can be uncomfortable for reading (or holding a printed book).