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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
= Page Category Keys
:description: Reference list of the available page category keys and their value types.
:navtitle: Page
:source-language: yaml
[#page]
== page
The keys in the `page` category control the size, margins, and background of the pages in a document (i.e., canvas).
We recommended that you define this category before all other categories.
NOTE: The background of the title page can be styled independently of other pages.
See xref:title-pages.adoc[] and xref:title-page.adoc[] for details.
[cols="3,4,5a"]
|===
|Key |Value Type |Example
|<<background-color,background-color>>
|xref:color.adoc[Color] +
(default: `'FFFFFF'`)
|[source]
page:
background-color: #FEFEFE
|xref:images.adoc#background[background-image]
|xref:images.adoc#specify[image macro] {vbar} xref:images.adoc#specify[path] +
(default: _not set_)
|[source]
page:
background-image: image:page-bg.png[]
|xref:images.adoc#recto-and-verso[background-image-(recto{vbar}verso)]
|xref:images.adoc#specify[image macro] {vbar} xref:images.adoc#specify[path] +
(default: _not set_)
|[source]
page:
background-image:
recto: image:page-bg-recto.png[]
verso: image:page-bg-verso.png[]
|<<columns,columns>>
|Integer +
(default: _not set_)
|[source]
page:
columns: 2
|column-gap
|xref:measurement-units.adoc[Measurement] +
(default: _$base-font-size_)
|[source]
page:
columns: 2
columns-gap: 12
|xref:images.adoc#foreground[foreground-image]
|xref:images.adoc#specify[image macro] {vbar} xref:images.adoc#specify[path] +
(default: _not set_)
|[source]
page:
foreground-image: image:watermark.svg[]
|initial-zoom
|`Fit` {vbar} `FitH` {vbar} `FitV` +
(default: `FitH`)
|[source]
page:
initial-zoom: Fit
|layout
|`landscape` {vbar} `portrait` +
(default: `portrait`)
|[source]
page:
layout: landscape
|margin
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom,left\]] +
(default: `36`)
|[source]
page:
margin: [0.5in, 0.67in, 1in, 0.67in]
|<<rotated-margin,margin-rotated>>
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom,left\]] +
(default: `$page-margin`)
|[source]
page:
margin-rotated: [0.5in, 0.5in, 1in, 0.5in]
|<<prepress-margins,margin-inner>>
|xref:measurement-units.adoc[Measurement] +
(default: `48`)
|[source]
page:
margin-inner: 0.75in
|<<prepress-margins,margin-outer>>
|xref:measurement-units.adoc[Measurement] +
(default: `24`)
|[source]
page:
margin-outer: 0.59in
|mode
|`outline` {vbar} `none` {vbar} `thumbs` {vbar} `fullscreen` {vbar} `fullscreen outline` {vbar} `fullscreen none` {vbar} `fullscreen thumbs` +
(default: `outline`)
|[source]
page:
mode: fullscreen none
|size
|https://github.com/prawnpdf/pdf-core/blob/0.6.0/lib/pdf/core/page_geometry.rb#L16-L68[Named size^] {vbar} xref:measurement-units.adoc[Measurement[width,height\]] +
(default: `A4`)
|[source]
page:
size: Letter
|===
[#background-color]
=== Disable background-color
To turn off the background color for the page, set the value of the `background-color` key to white (i.e., `#FFFFFF`).
The color keyword `transparent` is not recognized in this context.
[#rotated-margin]
=== Rotated margin
The rotated margin is applied to the opposing page layout when a page is rotated.
If the initial page layout is portrait, then the rotated margin applies to landscape pages, and vice versa.
The `margin` key applies to the initial page layout.
The rotated margin does not honor <<prepress-margins>>.
Rather, it's the same margin regardless of whether the page side is recto or verso.
[#prepress-margins]
=== Inner and outer margins
The margins for `recto` (right-hand, odd-numbered) and `verso` (left-hand, even-numbered) pages are calculated automatically from the `margin-inner` and `margin-outer` values.
These margins are only used when the value `prepress` is assigned to the `media` document attribute.
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`.
See xref:cover.adoc[] for information about the `cover` category keys.
TIP: Setting `front-cover-image` to `~` makes the converter acts as though a front cover is present without reserving a page for it.
It essentially informs the converter that the front cover will be inserted by a separate process.
[#columns]
=== Columns
The columns are only applied to the body of a document with the article or manpage doctype.
The body of the document begins after the document title and TOC, if present.
If the columns are set on the index section using the `index-columns` key, they will be ignored when `page-columns` is set.
[#numbering]
== page-numbering
The key in the `page-numbering` category controls where the integer (1-based) page numbering begins.
[cols="3,4,5a"]
|===
|Key |Value Type |Example
|start-at
|xref:page-numbers.adoc#start-at[Start page] {vbar} Integer +
(default: `body`)
|[source]
page:
numbering:
start-at: cover
|===
See xref:page-numbers.adoc#start-at[Starting integer page numbering] for more information about the `start-at` key, its values, and their requirements.
|