1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
= Print and Prepress Modes
[#print]
== Print mode
Asciidoctor PDF provides the following behaviors to assist with printing:
* Shows the URLs for links unless the linked text matches the URL
* Consolidates page ranges in the index
* Deactivates the links from page numbers in the index to the locations of terms in the document
To enable these printing features, set the `media` document attribute to `print` in the header of your AsciiDoc document or from the API or CLI (e.g., `-a media=print`).
You may also want to consider using the print-optimized theme, which uses darker, grayscale colors for text and borders (e.g., `--theme default-for-print`).
[#prepress]
== Prepress mode
In addition to the <<print,print mode>>, Asciidoctor PDF provides the following behaviors to assist with publishing:
* Double-sided (mirror) page margins
* Automatic facing pages
Set the `media` attribute to `prepress` in the header of your AsciiDoc document or from the API or CLI (e.g., `-a media=prepress`) to activate the publishing features.
The following sections describe the behaviors that this setting activates.
You may also want to consider using the print-optimized theme, which uses darker, grayscale colors for text and borders (e.g., `--theme default-for-print`).
=== Double-sided page margins
The page margins for the recto (right-hand, odd-numbered) and verso (left-hand, even-numbered) pages are automatically calculated by replacing the side page margins with the values of the `page-margin-inner` and `page-margin-outer` keys.
For example, let's assume you've defined the following settings in your theme:
[,yaml]
----
page:
margin: [0.5in, 0.67in, 0.67in, 0.67in]
margin-inner: 0.75in
margin-outer: 0.59in
----
The page margins for the recto and verso pages will be resolved as follows:
recto page margin:: [0.5in, *0.59in*, 0.67in, *0.75in*]
verso page margin:: [0.5in, *0.75in*, 0.67in, *0.59in*]
The page margins alternate between recto and verso.
The first page in the document (after the front cover) is a recto page.
The recto margin is applied to the title page if a front cover is specified.
To apply the recto margin to the title page without specifying a front cover, assign the value `~` to the `front-cover-image`.
=== Automatic facing pages
When converting the book doctype using the `prepress` media setting, a blank page will be inserted when necessary to ensure the following elements start on a recto page:
* Title page
* Table of contents
* First page of body
* Parts and chapters
Other "`facing`" pages may be added in the future.
It's possible to disable the automatic facing feature for a given part or chapter.
This can be done by applying the `nonfacing` option to a section.
When the `nonfacing` option is present, the part or chapter title will be placed on the next adjacent page rather than the next facing page.
[,asciidoc]
----
[%nonfacing]
= Minor Chapter
content
----
|