summaryrefslogtreecommitdiff
path: root/docs/modules/theme/pages/running-content.adoc
blob: d0e62f87d7863c28125f69d911b7fb0e311ecb9e (plain) (blame)
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
= Running Content Category Keys
:description: Reference list of the available running content, header, and footer category keys and their value types.
:navtitle: Running Content
:source-language: yaml
:conum-guard-yaml: #

The `header`, `footer`, and `running-content` category keys control the arrangement and style of running header and footer content.

[#header]
== header

The `header` category key accepts the keys listed in the following table.

IMPORTANT: If you don't specify a `height` for the header, it effectively disables the header.

[cols="3,4,6a"]
|===
|Key |Value Type |Example

|<<background-color,background-color>>
|xref:color.adoc[Color] +
(default: _not set_)
|[source]
header:
  background-color: #EEEEEE

|background-image
|xref:images.adoc#specify[image macro] {vbar} xref:images.adoc#specify[path] +
(default: _not set_)
|[source]
header:
  background-image: image:running-content.svg[fit=contain]

|border-color
|xref:blocks.adoc#border-color[Color] +
(default: _not set_)
|[source]
header:
  border-color: #DDDDDD

|border-style
|xref:blocks.adoc#border-style[Border style] +
(default: `solid`)
|[source]
header:
  border-style: dashed

|border-width
|xref:blocks.adoc#border-width[Measurement] {vbar} xref:blocks.adoc#border-width[Measurement[\]] +
(default: `$base-border-width`)
|[source]
header:
  border-width: 0.25

|column-rule-color
|xref:color.adoc[Color] +
(default: _not set_)
|[source]
header:
  column-rule-color: #CCCCCC

|column-rule-spacing
|xref:measurement-units.adoc[Measurement] +
(default: `0`)
|[source]
header:
  column-rule-spacing: 5

|column-rule-style
|`dashed` {vbar} `dotted` {vbar} `double` {vbar} `solid` +
(default: `solid`)
|[source]
header:
  column-rule-style: dashed

|column-rule-width
|xref:measurement-units.adoc[Measurement] +
(default: _not set_)
|[source]
header:
  column-rule-width: 0.25

|<<columns,columns>>
|Column specs triple +
(default: _not set_)
|[source]
header:
  columns: <50% =0% <50%

|content-margin
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom,left\]] +
(default: `[0, inherit]`)
|[source]
header:
  content-margin: 0

|font-color
|xref:color.adoc[Color] +
(default: _inherit_)
|[source]
header:
  font-color: #333333

|font-family
|xref:font-support.adoc[Font family name] +
(default: _inherit_)
|[source]
header:
  font-family: Noto Serif

|font-kerning
|`none` {vbar} `normal` +
(default: _inherit_)
|[source]
header:
  font-kerning: none

|font-size
|xref:text.adoc#font-size[Font size] +
(default: _inherit_)
|[source]
header:
  font-size: 9

|font-style
|xref:text.adoc#font-style[Font style] +
(default: _inherit_)
|[source]
header:
  font-style: italic

|<<height,height>>
|xref:measurement-units.adoc[Measurement] +
(default: _not set_)
|[source]
header:
  height: 0.75in

|image-vertical-align
|`bottom` {vbar} `middle` {vbar} `top` {vbar} xref:measurement-units.adoc[Measurement] +
(default: _not set_)
|[source]
header:
  image-vertical-align: 4

|line-height
|xref:language.adoc#values[Number] +
(default: `$base-line-height`)
|[source]
header:
  line-height: 1.2

|margin
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom(n/a),left\]] +
(default: `[0, inherit]`)
|[source]
header:
  margin: 0

|<<padding,padding>>
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom,left\]] +
(default: `0`)
|[source]
header:
  padding: [0, 3, 0, 3]

|<<levels,sectlevels>>
|Integer +
(default: `2`)
|[source]
header:
  sectlevels: 3

|text-transform
|xref:text.adoc#transform[Text transform] +
(default: `none`)
|[source]
header:
  text-transform: uppercase

|title-style
|`document` {vbar} `toc` {vbar} `basic` +
(default: `document`)
|[source]
header:
  title-style: toc

|vertical-align
|`top` {vbar} `middle` {vbar} `bottom` {vbar} [`top` {vbar} `middle` {vbar} `bottom`, xref:measurement-units.adoc[Measurement]] +
(default: `middle`)
|[source]
header:
  vertical-align: middle

|<<columns,<side>-columns>>
|Column specs triple +
(default: _not set_)
|[source]
header:
  recto:
    columns: <25% =50% >25%

|<<side,<side>-content-margin>>
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom,left\]] +
(default: _inherit_)
|[source]
header:
  recto:
    content-margin: [0, 0, 0, inherit]

|<<side,<side>-margin>>
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom(n/a),left\]] +
(default: _inherit_)
|[source]
header:
  recto:
    margin: [0, 0, 0, inherit]

|<<side,<side>-padding>>
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom,left\]] +
(default: _inherit_)
|[source]
header:
  recto:
    padding: [0, 3, 0, 3]

|<<position,<side>-<position>-content>>
|xref:quoted-string.adoc[Quoted string] +
(default: `'\{page-number}'`)
|[source]
header:
  recto:
    left:
      content: '{page-number}'
|===

[#footer]
== footer

The `footer` category key accepts the keys listed in the following table.

IMPORTANT: If you don't specify a `height` for the footer, it effectively disables the footer.

[cols="3,4,6a"]
|===
|Key |Value Type |Example

|<<background-color,background-color>>
|xref:color.adoc[Color] +
(default: _not set_)
|[source]
footer:
  background-color: #EEEEEE

|background-image
|xref:images.adoc#specify[image macro] {vbar} xref:images.adoc#specify[path] +
(default: _not set_)
|[source]
footer:
  background-image: image:running-content.svg[fit=contain]

|border-color
|xref:blocks.adoc#border-color[Color] +
(default: `$base-border-color`)
|[source]
footer:
  border-color: #DDDDDD

|border-style
|xref:blocks.adoc#border-style[Border style] +
(default: `solid`)
|[source]
footer:
  border-style: dashed

|border-width
|xref:blocks.adoc#border-width[Measurement] {vbar} xref:blocks.adoc#border-width[Measurement[\]] +
(default: `0.5`)
|[source]
footer:
  border-width: 0.25

|column-rule-color
|xref:color.adoc[Color] +
(default: _not set_)
|[source]
footer:
  column-rule-color: #CCCCCC

|column-rule-spacing
|xref:measurement-units.adoc[Measurement] +
(default: `0`)
|[source]
footer:
  column-rule-spacing: 5

|column-rule-style
|`dashed` {vbar} `dotted` {vbar} `double` {vbar} `solid` +
(default: `solid`)
|[source]
footer:
  column-rule-style: dashed

|column-rule-width
|xref:measurement-units.adoc[Measurement] +
(default: _not set_)
|[source]
footer:
  column-rule-width: 0.25

|<<columns,columns>>
|Column specs triple +
(default: _not set_)
|[source]
footer:
  columns: <50% =0% <50%

|content-margin
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom,left\]] +
(default: `[0, inherit]`)
|[source]
footer:
  content-margin: 0

|font-color
|xref:color.adoc[Color] +
(default: _inherit_)
|[source]
footer:
  font-color: #333333

|font-family
|xref:font-support.adoc[Font family name] +
(default: _inherit_)
|[source]
footer:
  font-family: Noto Serif

|font-kerning
|`none` {vbar} `normal` +
(default: _inherit_)
|[source]
footer:
  font-kerning: none

|font-size
|xref:text.adoc#font-size[Font size] +
(default: _inherit_)
|[source]
footer:
  font-size: 9

|font-style
|xref:text.adoc#font-style[Font style] +
(default: _inherit_)
|[source]
footer:
  font-style: italic

|<<height,height>>
|xref:measurement-units.adoc[Measurement] +
(default: _not set_)
|[source]
footer:
  height: 0.75in

|image-vertical-align
|`bottom` {vbar} `middle` {vbar} `top` {vbar} xref:measurement-units.adoc[Measurement] +
(default: _not set_)
|[source]
footer:
  image-vertical-align: 4

|line-height
|xref:language.adoc#values[Number] +
(default: `$base-line-height`)
|[source]
footer:
  line-height: 1.2

|margin
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top(n/a),right,bottom,left\]] +
(default: `[0, inherit]`)
|[source]
footer:
  margin: 0

|<<padding,padding>>
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom,left\]] +
(default: `0`)
|[source]
footer:
  padding: [0, 3, 0, 3]

|<<levels,sectlevels>>
|Integer +
(default: `2`)
|[source]
footer:
  sectlevels: 3

|text-transform
|xref:text.adoc#transform[Text transform] +
(default: `none`)
|[source]
footer:
  text-transform: uppercase

|title-style
|`document` {vbar} `toc` {vbar} `basic` +
(default: `document`)
|[source]
footer:
  title-style: toc

|vertical-align
|`top` {vbar} `middle` {vbar} `bottom` {vbar} [top {vbar} middle {vbar} bottom, xref:measurement-units.adoc[Measurement]] +
(default: `middle`)
|[source]
footer:
  vertical-align: top

|<<columns,<side>-columns>>
|Column specs triple +
(default: _not set_)
|[source]
footer:
  verso:
    columns: <50% =0% <50%

|<<side,<side>-content-margin>>
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom,left\]] +
(default: _inherit_)
|[source]
footer:
  verso:
    content-margin: [0, inherit, 0, 0]

|<<side,<side>-margin>>
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top (n/a),right,bottom,left\]] +
(default: `[0, inherit]`)
|[source]
footer:
  verso:
    margin: [0, inherit, 0, 0]

|<<side,<side>-padding>>
|xref:measurement-units.adoc[Measurement] {vbar} xref:measurement-units.adoc[Measurement[top,right,bottom,left\]] +
(default: _inherit_)
|[source]
footer:
  verso:
    padding: [0, 3, 0, 3]

|<<position,<side>-<position>-content>>
|xref:quoted-string.adoc[Quoted string] +
(default: `'\{page-number}'`)
|[source]
footer:
  verso:
    center:
      content: '{page-number}'
|===

[#background-color]
== background-color

To make the background color, background image, and border span the width of the page, set the margin to `0` and adjust the `content-margin` accordingly (typically `[0, inherit]`, which is the default).

[#columns]
== columns

The `columns` key can also be defined one level up (on `header` or `footer`), in which case the setting will be inherited.
Where the page sides fall in relation to the physical or printed page number is controlled using the `pdf-folio-placement` attribute (except when `media=prepress`, which implies `physical`).
The column rules between columns are only added if the `columns` key is specified.

[#height]
== height

If the height is not set on a periphery, the running content for that periphery is disabled.

[#padding]
== padding

Do not use negative margins.
Instead, adjust the values of the `margin` and `content-margin` keys.

[#levels]
== sectlevels

The maximum section level considered when assigning the implicit `section-title` attribute (and related) available to the running content.

[#side]
== <side>

The `<side>` in the `<side>-columns`, `<side>-margin`, `<side>-content-margin`, `<side>-padding`, and `<side>-<position>-content` keys is specified as `recto` (right-hand, odd-numbered pages) or `verso` (left-hand, even-numbered pages).

Although not listed in the tables above, you can override the font settings (`font-family`, `font-size`, `font-color`, `font-style`, `text-transform`) for each page side for a running content periphery (e.g., `header-<side>-font-color`).
For example, you can set the font color used for the footer on recto pages as follows:

[,yaml]
----
footer:
  recto:
    font-color: #AA0000
----

[#position]
== <position>

The `<position>` in the `<side>-<position>-content` key is specified as `left`, `center` or `right`.

Although not listed in the tables above, you can override individual font settings (`font-family`, `font-size`, `font-color`, `font-style`, `text-transform`) for each column position of a page side for a running content periphery (e.g., `header-<side>-<position>-font-color`).
For example, you can set the font color used for the right-hand column of the header on recto pages as follows:

[,yaml]
----
header:
  recto:
    right:
      font-color: #6CC644
      content: content with font color
----

[#running-content]
== running-content

The key in the `running-content` category controls on what page the running content starts.

[cols="3,4,6a"]
|===
|Key |Value Type |Example

|start-at
|xref:add-running-content.adoc#start-at[Start page] {vbar} xref:add-running-content.adoc#page[Integer] +
(default: `body`)
|[source]
running-content:
  start-at: toc
|===

See xref:add-running-content.adoc#start-at[Start page] for more information about the `start-at` key, its values, and their requirements.