asciidoctor-pdf 1.5.0.alpha.8 → 1.5.0.alpha.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +9 -1
  3. data/Rakefile +1 -0
  4. data/data/fonts/{LICENSE-noto-fonts-2014-11-17 → LICENSE-noto-2015-06-05} +0 -0
  5. data/data/fonts/{mplus1mn-bolditalic-ascii.ttf → mplus1mn-bold_italic-ascii.ttf} +0 -0
  6. data/data/fonts/{mplus1p-regular-multilingual.ttf → mplus1p-regular-fallback.ttf} +0 -0
  7. data/data/fonts/notoserif-bold-subset.ttf +0 -0
  8. data/data/fonts/notoserif-bold_italic-subset.ttf +0 -0
  9. data/data/fonts/notoserif-italic-subset.ttf +0 -0
  10. data/data/fonts/notoserif-regular-subset.ttf +0 -0
  11. data/data/themes/base-theme.yml +90 -0
  12. data/data/themes/default-theme.yml +97 -92
  13. data/docs/theming-guide.adoc +93 -21
  14. data/lib/asciidoctor-pdf/converter.rb +419 -216
  15. data/lib/asciidoctor-pdf/core_ext/quantifiable_stdout.rb +20 -0
  16. data/lib/asciidoctor-pdf/formatted_text/formatter.rb +6 -5
  17. data/lib/asciidoctor-pdf/formatted_text/inline_image_arranger.rb +3 -3
  18. data/lib/asciidoctor-pdf/formatted_text/transform.rb +36 -26
  19. data/lib/asciidoctor-pdf/pdf_core_ext.rb +1 -1
  20. data/lib/asciidoctor-pdf/pdf_core_ext/page.rb +22 -0
  21. data/lib/asciidoctor-pdf/prawn_ext.rb +1 -0
  22. data/lib/asciidoctor-pdf/prawn_ext/coderay_encoder.rb +24 -4
  23. data/lib/asciidoctor-pdf/prawn_ext/extensions.rb +73 -6
  24. data/lib/asciidoctor-pdf/prawn_ext/font/afm.rb +19 -0
  25. data/lib/asciidoctor-pdf/prawn_ext/formatted_text/fragment.rb +1 -1
  26. data/lib/asciidoctor-pdf/prawn_ext/images.rb +16 -0
  27. data/lib/asciidoctor-pdf/rouge_ext.rb +4 -0
  28. data/lib/asciidoctor-pdf/rouge_ext/css_theme.rb +14 -0
  29. data/lib/asciidoctor-pdf/rouge_ext/formatters/prawn.rb +121 -0
  30. data/lib/asciidoctor-pdf/rouge_ext/themes/pastie.rb +61 -0
  31. data/lib/asciidoctor-pdf/theme_loader.rb +32 -14
  32. data/lib/asciidoctor-pdf/version.rb +1 -1
  33. metadata +23 -15
  34. data/data/fonts/notoserif-bold-latin.ttf +0 -0
  35. data/data/fonts/notoserif-bolditalic-latin.ttf +0 -0
  36. data/data/fonts/notoserif-italic-latin.ttf +0 -0
  37. data/data/fonts/notoserif-regular-latin.ttf +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b2c65350b1794de68fc1396284903bb5e15efde
4
- data.tar.gz: 29a3cfea5ef7f61d77e241518d1b26440c1f58cc
3
+ metadata.gz: 22493470e3006991e099beb8ddeb65c08eb033c0
4
+ data.tar.gz: c90d7a56f0140153feda21773e7875758b86e020
5
5
  SHA512:
6
- metadata.gz: a6e7506596f8d5446e9275a00f916648f336c69543d372680a4d11d77065676de4dd7721b429d49e585386639ff3d9c7eaaca776040a0afc4f1e107e1d6e98eb
7
- data.tar.gz: 173008d8b6d048722150da22616202c118f2d46929cc67f1b4ea097e0dd8b02b8fe7f13f0a6d1a933709844ad736af1eabbc1dc49c28f1315e1fea3e4e9e137c
6
+ metadata.gz: c7d1c228af54e9c88d796a5b9b75631e850b30cc2cafead887ee5309338bfe9cf488c211f3058aa98b6dd1153f996c409939df0b80510287971174390bcd25ef
7
+ data.tar.gz: 96010a61d4c6d16502e4d0418923a96cb917e5d0bbcd714826c567c060f997749f8349254df5c1c696ae4a2a453b9cff37488490e5769ba58f837ad4a389a42e
data/README.adoc CHANGED
@@ -120,10 +120,18 @@ You can install the published gem using the following command:
120
120
 
121
121
  $ gem install --pre asciidoctor-pdf
122
122
 
123
- If you want to syntax highlight source listings, you'll also want to install CodeRay (or Pygments).
123
+ If you want to syntax highlight source listings, you'll also want to install CodeRay, Rouge or Pygments.
124
+ Choose one (or more) of the following:
124
125
 
126
+ .CodeRay
125
127
  $ gem install coderay
126
128
 
129
+ .Rouge
130
+ $ gem install rouge
131
+
132
+ .Pygments
133
+ $ gem install pygments.rb
134
+
127
135
  Assuming all the required gems install properly, verify you can run the `asciidoctor-pdf` script:
128
136
 
129
137
  $ asciidoctor-pdf -v
data/Rakefile CHANGED
@@ -12,6 +12,7 @@ begin
12
12
  #Rake::Task[:release].enhance [:commit_release]
13
13
 
14
14
  # NOTE you don't need to push after updating version and committing locally
15
+ # WARNING no longer works; it's now necessary to get master in a state ready for tagging
15
16
  task :commit_release do
16
17
  Bundler::GemHelper.new.send :guard_clean
17
18
  sh %(git commit --allow-empty -a -m 'Release #{Asciidoctor::Pdf::VERSION}')
@@ -0,0 +1,90 @@
1
+ # NOTE file is read "as is"; variables are not parsed; key layout must be flat
2
+ # QUESTION should vertical_spacing be block_spacing instead?
3
+ vertical_spacing: 12
4
+ page_background_color: 'FFFFFF'
5
+ page_layout: portrait
6
+ # 36 is equivalent to 0.5in
7
+ page_margin: 36
8
+ page_size: LETTER
9
+ base_align: left
10
+ #base_font_color: '333333'
11
+ base_font_color: '000000'
12
+ #base_font_family: Times-Roman
13
+ base_font_family: Helvetica
14
+ base_font_size: 12
15
+ # QUESTION should we rename to min_font_size?
16
+ base_font_size_min: 9
17
+ base_font_style: normal
18
+ base_line_height: 1.15
19
+ base_line_height_length: 13.8
20
+ base_border_color: 'EEEEEE'
21
+ base_border_width: 0.5
22
+ link_font_color: '0000EE'
23
+ literal_font_family: Courier
24
+ heading_font_style: bold
25
+ heading_h1_font_size: 24
26
+ heading_h2_font_size: 18
27
+ heading_h3_font_size: 16
28
+ heading_h4_font_size: 14
29
+ heading_h5_font_size: 12
30
+ heading_h6_font_size: 10
31
+ heading_line_height: 1.15
32
+ heading_margin_top: 4
33
+ heading_margin_bottom: 12
34
+ title_page_align: center
35
+ title_page_line_height: 1.15
36
+ title_page_logo_top: 10%
37
+ title_page_title_top: 40%
38
+ title_page_title_font_size: 18
39
+ title_page_subtitle_font_size: 14
40
+ title_page_authors_margin_top: 12
41
+ outline_list_indent: 30
42
+ outline_list_item_spacing: 6
43
+ description_list_description_indent: 30
44
+ description_list_term_font_style: normal
45
+ description_list_term_spacing: 4
46
+ block_margin_top: 0
47
+ block_margin_bottom: 12
48
+ caption_align: left
49
+ caption_font_style: italic
50
+ caption_margin_inside: 4
51
+ caption_margin_outside: 0
52
+ abstract_font_size: 13.5
53
+ abstract_line_height: 1.4
54
+ abstract_padding: 0
55
+ admonition_border_color: 'EEEEEE'
56
+ admonition_border_width: 0.5
57
+ admonition_padding: [0, 12, 0, 12]
58
+ blockquote_border_color: 'EEEEEE'
59
+ blockquote_border_width: 4
60
+ blockquote_padding: [6, 12, -6, 14]
61
+ code_font_family: Courier
62
+ code_font_size: 10.5
63
+ code_line_height: 1.2
64
+ code_padding: 9
65
+ code_border_color: 'EEEEEE'
66
+ code_border_width: 0.5
67
+ conum_line_height: 1.15
68
+ example_border_color: 'EEEEEE'
69
+ example_border_width: 0.5
70
+ # FIXME reenable margin bottom once margin collapsing is implemented
71
+ example_padding: [12, 12, 0, 12]
72
+ image_align: left
73
+ lead_font_size: 13.5
74
+ lead_line_height: 1.4
75
+ prose_margin_top: 0
76
+ prose_margin_bottom: 12
77
+ sidebar_background_color: 'EEEEEE'
78
+ # FIXME reenable margin bottom once margin collapsing is implemented
79
+ sidebar_padding: [12, 12, 0, 12]
80
+ sidebar_title_align: center
81
+ sidebar_title_font_style: bold
82
+ table_border_color: '000000'
83
+ table_border_width: 0.5
84
+ table_cell_padding: 2
85
+ table_head_font_style: bold
86
+ thematic_break_border_color: 'EEEEEE'
87
+ thematic_break_border_style: solid
88
+ thematic_break_border_width: 0.5
89
+ toc_indent: 15
90
+ toc_line_height: 1.4
@@ -1,33 +1,33 @@
1
1
  font:
2
2
  catalog:
3
+ # Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols
3
4
  Noto Serif:
4
- normal: notoserif-regular-latin.ttf
5
- bold: notoserif-bold-latin.ttf
6
- italic: notoserif-italic-latin.ttf
7
- bold_italic: notoserif-bolditalic-latin.ttf
5
+ normal: notoserif-regular-subset.ttf
6
+ bold: notoserif-bold-subset.ttf
7
+ italic: notoserif-italic-subset.ttf
8
+ bold_italic: notoserif-bold_italic-subset.ttf
9
+ # M+ 1mn supports ASCII and the circled numbers used for conums
8
10
  M+ 1mn:
9
11
  normal: mplus1mn-regular-ascii-conums.ttf
10
12
  bold: mplus1mn-bold-ascii.ttf
11
13
  italic: mplus1mn-italic-ascii.ttf
12
- bold_italic: mplus1mn-bolditalic-ascii.ttf
14
+ bold_italic: mplus1mn-bold_italic-ascii.ttf
15
+ # M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols
16
+ # It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font
13
17
  M+ 1p Fallback:
14
- normal: mplus1p-regular-multilingual.ttf
15
- bold: mplus1p-regular-multilingual.ttf
16
- italic: mplus1p-regular-multilingual.ttf
17
- bold_italic: mplus1p-regular-multilingual.ttf
18
+ normal: mplus1p-regular-fallback.ttf
19
+ bold: mplus1p-regular-fallback.ttf
20
+ italic: mplus1p-regular-fallback.ttf
21
+ bold_italic: mplus1p-regular-fallback.ttf
18
22
  fallbacks:
19
- # NOTE M+ 1p doesn't support all CJK characters, but it at least has some coverage
20
- # NOTE M+ 1p provides the arrows for ->, <-, => and <=
21
23
  - M+ 1p Fallback
22
24
  page:
23
25
  background_color: ffffff
24
26
  layout: portrait
25
- # NOTE multiply inches by 72 to get pt values
26
- #margin: [0.5 * 72, 0.67 * 72, 0.67 * 72, 0.67 * 72]
27
27
  margin: [0.5in, 0.67in, 0.67in, 0.67in]
28
- # size can be a named size (e.g., A4) or custom dimensions (e.g., [8.25in, 11.69in])
29
- size: Letter
28
+ size: LETTER
30
29
  base:
30
+ align: justify
31
31
  # color as hex string (leading # is optional)
32
32
  font_color: 333333
33
33
  # color as RGB array
@@ -54,15 +54,16 @@ base:
54
54
  font_size_small: round($base_font_size * 0.85)
55
55
  font_size_min: $base_font_size * 0.75
56
56
  font_style: normal
57
- align: justify
57
+ border_color: eeeeee
58
58
  border_radius: 4
59
59
  border_width: 0.5
60
- border_color: eeeeee
61
60
  # FIXME vertical_rhythm is weird; we should think in terms of ems
62
61
  #vertical_rhythm: $base_line_height_length * 2 / 3
63
- # correct line height for Noto Serif metrics
62
+ # correct line height for Noto Serif metrics (comes with built-in line height)
64
63
  vertical_rhythm: $base_line_height_length
65
64
  horizontal_rhythm: $base_line_height_length
65
+ # QUESTION should vertical_spacing be block_spacing instead?
66
+ vertical_spacing: $vertical_rhythm
66
67
  link:
67
68
  font_color: 428bca
68
69
  # literal is currently used for inline monospaced in prose and table cells
@@ -73,6 +74,7 @@ heading:
73
74
  #font_color: 181818
74
75
  font_color: $base_font_color
75
76
  font_family: $base_font_family
77
+ font_style: bold
76
78
  # h1 is used for part titles
77
79
  h1_font_size: floor($base_font_size * 2.6)
78
80
  # h2 is used for chapter titles
@@ -81,109 +83,110 @@ heading:
81
83
  h4_font_size: $base_font_size_large
82
84
  h5_font_size: $base_font_size
83
85
  h6_font_size: $base_font_size_small
84
- font_style: bold
85
86
  #line_height: 1.4
86
- # correct line height for Noto Serif metrics
87
+ # correct line height for Noto Serif metrics (comes with built-in line height)
87
88
  line_height: 1.2
88
89
  margin_top: $vertical_rhythm * 0.2
89
90
  margin_bottom: $vertical_rhythm * 0.8
90
91
  title_page:
91
92
  align: right
92
- title_top: 55%
93
- title_font_size: $heading_h1_font_size
94
- title_font_color: 999999
95
- title_line_height: 0.9
96
- subtitle_font_size: $heading_h3_font_size
97
- subtitle_font_style: bold_italic
98
- subtitle_line_height: 1
99
- authors_margin_top: $base_font_size * 1.25
100
- authors_font_size: $base_font_size_large
101
- authors_font_color: 181818
102
- revision_margin_top: $base_font_size * 1.25
103
- #prose:
104
- # margin_top: 0
105
- # margin_bottom: $vertical_rhythm
93
+ logo:
94
+ top: 10%
95
+ title:
96
+ top: 55%
97
+ font_size: $heading_h1_font_size
98
+ font_color: 999999
99
+ line_height: 0.9
100
+ subtitle:
101
+ font_size: $heading_h3_font_size
102
+ font_style: bold_italic
103
+ line_height: 1
104
+ authors:
105
+ margin_top: $base_font_size * 1.25
106
+ font_size: $base_font_size_large
107
+ font_color: 181818
108
+ revision:
109
+ margin_top: $base_font_size * 1.25
106
110
  block:
107
- #margin_top: 0
108
- #margin_bottom: $vertical_rhythm
109
- padding: [$vertical_rhythm, $vertical_rhythm * 1.25, $vertical_rhythm, $vertical_rhythm * 1.25]
110
- # code is used for source blocks (perhaps change to source or listing?)
111
+ margin_top: 0
112
+ margin_bottom: $vertical_rhythm
111
113
  caption:
112
- font_style: italic
113
114
  align: left
115
+ font_style: italic
114
116
  # FIXME perhaps set line_height instead of / in addition to margins?
115
- margin_inside: $vertical_rhythm * 0.25
117
+ margin_inside: $vertical_rhythm / 3
118
+ #margin_inside: $vertical_rhythm / 4
116
119
  margin_outside: 0
120
+ lead:
121
+ font_size: $base_font_size_large
122
+ line_height: 1.4
123
+ abstract:
124
+ font_color: 5c6266
125
+ font_size: $lead_font_size
126
+ line_height: $lead_line_height
127
+ font_style: italic
128
+ admonition:
129
+ border_color: $base_border_color
130
+ border_width: $base_border_width
131
+ padding: [0, $horizontal_rhythm, 0, $horizontal_rhythm]
132
+ blockquote:
133
+ font_color: $base_font_color
134
+ font_size: $base_font_size_large
135
+ border_color: $base_border_color
136
+ border_width: 5
137
+ padding: [$vertical_rhythm / 2, $horizontal_rhythm, $vertical_rhythm / -2, $horizontal_rhythm + $blockquote_border_width / 2]
138
+ cite_font_size: $base_font_size_small
139
+ cite_font_color: 999999
140
+ # code is used for source blocks (perhaps change to source or listing?)
117
141
  code:
118
142
  font_color: $base_font_color
119
- #font_family: Liberation Mono
120
- #font_size: floor($base_font_size * 0.9)
121
- #font_size: 10
122
- #padding: [9.5, 9.5, 9.5, 9.5]
123
- # LiberationMono carries extra gap below line
124
- #padding: [10, 10, 7.5, 10]
125
- #line_height: 1.45
126
143
  font_family: $literal_font_family
127
144
  font_size: ceil($base_font_size)
128
- #padding: [$base_font_size, $code_font_size, $base_font_size, $code_font_size]
129
145
  padding: $code_font_size
130
146
  line_height: 1.25
131
147
  background_color: f5f5f5
132
148
  border_color: cccccc
133
149
  border_radius: $base_border_radius
134
150
  border_width: 0.75
135
- blockquote:
136
- font_color: $base_font_color
137
- font_size: $base_font_size_large
138
- border_width: 5
139
- border_color: $base_border_color
140
- cite_font_size: $base_font_size_small
141
- cite_font_color: 999999
142
- sidebar:
143
- border_color: $page_background_color
144
- border_radius: $base_border_radius
145
- border_width: $base_border_width
146
- background_color: eeeeee
147
- title_font_color: $heading_font_color
148
- title_font_family: $heading_font_family
149
- title_font_size: $heading_h4_font_size
150
- title_font_style: $heading_font_style
151
- title_align: center
152
- example:
153
- border_color: $base_border_color
154
- border_radius: $base_border_radius
155
- border_width: 0.75
156
- background_color: transparent
157
- admonition:
158
- border_color: $base_border_color
159
- border_width: $base_border_width
160
151
  conum:
161
152
  font_family: M+ 1mn
162
153
  font_color: $literal_font_color
163
154
  font_size: $base_font_size
164
155
  line_height: 4 / 3
156
+ example:
157
+ border_color: $base_border_color
158
+ border_radius: $base_border_radius
159
+ border_width: 0.75
160
+ background_color: transparent
161
+ # FIXME reenable margin bottom once margin collapsing is implemented
162
+ padding: [$vertical_rhythm, $horizontal_rhythm, 0, $horizontal_rhythm]
165
163
  image:
166
- align_default: left
167
- scaled_width_default: 0.5
168
- lead:
169
- # QUESTION what about $base_font_size_large?
170
- #font_size: floor($base_line_height_length * 0.8)
171
- #font_size: floor($base_font_size * 1.15)
172
- #line_height: 1.3
173
- font_size: $base_font_size_large
174
- line_height: 1.4
175
- abstract:
176
- #font_color: 404040
177
- font_color: 5c6266
178
- font_size: $lead_font_size
179
- line_height: $lead_line_height
180
- font_style: italic
164
+ align: left
165
+ prose:
166
+ margin_top: 0
167
+ margin_bottom: $vertical_rhythm
168
+ sidebar:
169
+ border_color: $page_background_color
170
+ border_radius: $base_border_radius
171
+ border_width: $base_border_width
172
+ background_color: eeeeee
173
+ # FIXME reenable margin bottom once margin collapsing is implemented
174
+ padding: [$vertical_rhythm, $vertical_rhythm * 1.25, 0, $vertical_rhythm * 1.25]
175
+ title:
176
+ align: center
177
+ font_color: $heading_font_color
178
+ font_family: $heading_font_family
179
+ font_size: $heading_h4_font_size
180
+ font_style: $heading_font_style
181
181
  thematic_break:
182
182
  border_color: $base_border_color
183
+ border_style: solid
184
+ border_width: $base_border_width
183
185
  margin_top: $vertical_rhythm * 0.5
184
186
  margin_bottom: $vertical_rhythm * 1.5
185
187
  description_list:
186
188
  term_font_style: italic
189
+ term_spacing: $vertical_rhythm / 4
187
190
  description_indent: $horizontal_rhythm * 1.25
188
191
  outline_list:
189
192
  indent: $horizontal_rhythm * 1.5
@@ -194,6 +197,7 @@ table:
194
197
  background_color: $page_background_color
195
198
  #head_background_color: <hex value>
196
199
  #head_font_color: $base_font_color
200
+ head_font_style: bold
197
201
  even_row_background_color: f9f9f9
198
202
  #odd_row_background_color: <hex value>
199
203
  foot_background_color: f0f0f0
@@ -202,9 +206,9 @@ table:
202
206
  # HACK accounting for line-height
203
207
  cell_padding: [3, 3, 6, 3]
204
208
  toc:
205
- indent: $horizontal_rhythm
206
209
  dot_leader_color: dddddd
207
- #dot_leader_content: ". "
210
+ #dot_leader_content: '. '
211
+ indent: $horizontal_rhythm
208
212
  line_height: 1.4
209
213
  # NOTE In addition to footer, header is also supported
210
214
  footer:
@@ -214,9 +218,10 @@ footer:
214
218
  border_color: dddddd
215
219
  border_width: 0.25
216
220
  height: $base_line_height_length * 2.5
221
+ line_height: 1
217
222
  padding: [$base_line_height_length / 2, 1, 0, 1]
218
- valign: top
219
- #image_valign: <alignment> or <number>
223
+ vertical_align: top
224
+ #image_vertical_align: <alignment> or <number>
220
225
  # additional attributes for content:
221
226
  # * {page-count}
222
227
  # * {page-number}
@@ -76,7 +76,7 @@ outline_list:
76
76
  indent: $base_font_size * 1.5
77
77
  ----
78
78
 
79
- When creating a new theme, you only have to define the keys you want to override from the base theme (PENDING, see https://github.com/asciidoctor/asciidoctor-pdf/issues/132[#132]).
79
+ When creating a new theme, you only have to define the keys you want to override from the base theme, which is loaded prior to loading your custom theme.
80
80
  The converter uses the information from the theme map to help construct the PDF.
81
81
  All the available keys are documented in <<keys>>.
82
82
 
@@ -675,8 +675,8 @@ TBW
675
675
  |background_color: #ffffff
676
676
 
677
677
  |page_background_image
678
- |path (relative to pdf-stylesdir)
679
- |background_image: watermark.jpg
678
+ |path (absolute or relative to pdf-stylesdir)
679
+ |background_image: \image:watermark.png[]
680
680
 
681
681
  |page_layout
682
682
  |portrait, landscape +
@@ -879,13 +879,21 @@ The literal key is used for inline monospaced text in prose and table cells.
879
879
  |left, center, right, justify
880
880
  |align: right
881
881
 
882
+ |title_page_background_color
883
+ |<<colors,color>>
884
+ |background_color: #eaeaea
885
+
886
+ |title_page_background_image
887
+ |path (absolute or relative to pdf-stylesdir)
888
+ |background_image: \image:title.png[]
889
+
882
890
  |title_page_logo_align
883
891
  |left, center, right
884
892
  |logo_align: right
885
893
 
886
894
  |title_page_logo_image
887
895
  |inline image macro
888
- |+logo_image: image:logo.png[scaledwidth=25%]+
896
+ |logo_image: \image:logo.png[scaledwidth=25%]
889
897
 
890
898
  |title_page_logo_top
891
899
  |percentage
@@ -936,6 +944,8 @@ The literal key is used for inline monospaced text in prose and table cells.
936
944
  |revision_margin_top: 13.125
937
945
  |===
938
946
 
947
+ TIP: The title page can be disabled from the document by setting the `notitle` attribute in the document header.
948
+
939
949
  === Block
940
950
 
941
951
  [cols="3,3,5m"]
@@ -1190,9 +1200,9 @@ Block styles are applied to the following block types:
1190
1200
  |===
1191
1201
  |Key |Value Type |Example
1192
1202
 
1193
- |image_align_default
1194
- |left, center, right, justify
1195
- |align_default: left
1203
+ |image_align
1204
+ |left, center, right
1205
+ |align: left
1196
1206
  |===
1197
1207
 
1198
1208
  === Lead
@@ -1302,6 +1312,10 @@ Block styles are applied to the following block types:
1302
1312
  |<<colors,color>>
1303
1313
  |background_color: #ffffff
1304
1314
 
1315
+ |table_head_background_color
1316
+ |<<colors,color>>
1317
+ |background_color: #f0f0f0
1318
+
1305
1319
  |table_even_row_background_color
1306
1320
  |<<colors,color>>
1307
1321
  |even_row_background_color: #f9f9f9
@@ -1310,6 +1324,30 @@ Block styles are applied to the following block types:
1310
1324
  |<<colors,color>>
1311
1325
  |foot_background_color: #f0f0f0
1312
1326
 
1327
+ |table_header_cell_align
1328
+ |left, center, right
1329
+ |align: center
1330
+
1331
+ |table_header_cell_background_color
1332
+ |<<colors,color>>
1333
+ |background_color: #f0f0f0
1334
+
1335
+ |table_header_cell_font_color
1336
+ |<<colors,color>>
1337
+ |font_color: #1a1a1a
1338
+
1339
+ |table_header_cell_font_family
1340
+ |<<fonts,font family name>>
1341
+ |font_family: Noto Sans
1342
+
1343
+ |table_header_cell_font_size
1344
+ |<<values,number>>
1345
+ |font_size: 12
1346
+
1347
+ |table_header_cell_font_style
1348
+ |normal, italic, bold, bold_italic
1349
+ |font_style: italic
1350
+
1313
1351
  |table_border_color
1314
1352
  |<<colors,color>>
1315
1353
  |border_color: #dddddd
@@ -1414,17 +1452,22 @@ Block styles are applied to the following block types:
1414
1452
  |<<measurement-units,measurement>>
1415
1453
  |height: 0.75in
1416
1454
 
1455
+ |header_line_height
1456
+ |<<values,number>> +
1457
+ (default: $base_line_height)
1458
+ |height: 1.2
1459
+
1417
1460
  |header_padding
1418
1461
  |<<measurement-units,measurement>>, <<measurement-units,measurement array [4]>>
1419
1462
  |padding: [0, 3, 0, 3]
1420
1463
 
1421
- |header_image_valign
1422
- |top, center, bottom, <<measurement-units,measurement>>
1423
- |image_valign: 4
1464
+ |header_image_vertical_align
1465
+ |top, middle, bottom, <<measurement-units,measurement>>
1466
+ |image_vertical_align: 4
1424
1467
 
1425
- |header_valign
1426
- |top, center, bottom
1427
- |valign: center
1468
+ |header_vertical_align
1469
+ |top, middle, bottom
1470
+ |vertical_align: center
1428
1471
 
1429
1472
  |header_<side>_content_<align>^[1]^
1430
1473
  |quoted string
@@ -1467,17 +1510,22 @@ Block styles are applied to the following block types:
1467
1510
  |<<measurement-units,measurement>>
1468
1511
  |height: 0.75in
1469
1512
 
1513
+ |footer_line_height
1514
+ |<<values,number>> +
1515
+ (default: $base_line_height)
1516
+ |height: 1.2
1517
+
1470
1518
  |footer_padding
1471
1519
  |<<measurement-units,measurement>>, <<measurement-units,measurement array [4]>>
1472
1520
  |padding: [0, 3, 0, 3]
1473
1521
 
1474
- |footer_image_valign
1475
- |top, center, bottom, <<measurement-units,measurement>>
1476
- |image_valign: 4
1522
+ |footer_image_vertical_align
1523
+ |top, middle, bottom, <<measurement-units,measurement>>
1524
+ |image_vertical_align: 4
1477
1525
 
1478
- |footer_valign
1479
- |top, center, bottom
1480
- |valign: top
1526
+ |footer_vertical_align
1527
+ |top, middle, bottom
1528
+ |vertical_align: top
1481
1529
 
1482
1530
  |footer_<side>_content_<align>^[1]^
1483
1531
  |quoted string
@@ -1489,6 +1537,10 @@ Block styles are applied to the following block types:
1489
1537
 
1490
1538
  IMPORTANT: You must define a height for the running header or footer, respectively, or it will not be shown.
1491
1539
 
1540
+ TIP: The running header and footer can be disabled from the document by setting the `noheader` and the `nofooter` attributes, respectively, in the document header.
1541
+
1542
+ NOTE: If content is not specified for the running footer, the page number (i.e., `+{page-number}+`) will be shown on the left side on verso pages and the right side on recto pages.
1543
+
1492
1544
  NOTE: The background color spans the width of the page.
1493
1545
  When a background color is specified, the border also spans the width of the page.
1494
1546
 
@@ -1510,12 +1562,32 @@ Here's an example that shows how these attributes can be used in the running foo
1510
1562
  ----
1511
1563
  footer:
1512
1564
  height: 0.75in
1565
+ line_height: 1
1513
1566
  recto_content:
1514
1567
  right: '{section-or-chapter-title} | *{page-number}*'
1515
1568
  verso_content:
1516
1569
  left: '*{page-number}* | {chapter-title}'
1517
1570
  ----
1518
1571
 
1572
+ You can split the content value across multiple lines using YAML's multiline string syntax.
1573
+ In this case, the single quotes around the string are not necessary.
1574
+ To force a hard line break in the output, add [x-]+{space}{plus}+ to the end of the line in normal AsciiDoc fashion.
1575
+
1576
+ [source,yaml]
1577
+ ----
1578
+ footer:
1579
+ height: 0.75in
1580
+ line_height: 1.2
1581
+ recto_content:
1582
+ right: |
1583
+ Section Title - Page Number +
1584
+ {section-or-chapter-title} - {page-number}
1585
+ verso_content:
1586
+ left: |
1587
+ Page Number - Chapter Title +
1588
+ {page-number} - {chapter-title}
1589
+ ----
1590
+
1519
1591
  TIP: You can use most AsciiDoc inline formatting in the values of these keys.
1520
1592
  For instance, to make the text bold, surround it in asterisks (as shown above).
1521
1593
  One exception to this rule are inline images, which are described in the next section.
@@ -1532,13 +1604,13 @@ Here's an example of how to use an image in the running header (which also appli
1532
1604
  ----
1533
1605
  header:
1534
1606
  height: 0.75in
1535
- image_valign: 2 # <1>
1607
+ image_vertical_align: 2 # <1>
1536
1608
  recto_content:
1537
1609
  center: image:footer-logo.png[width=80]
1538
1610
  verso_content:
1539
1611
  center: $header_recto_content_center
1540
1612
  ----
1541
- <1> You can use the `footer_valign` attribute to slighly nudge the image up or down.
1613
+ <1> You can use the `footer_vertical_align` attribute to slighly nudge the image up or down.
1542
1614
 
1543
1615
  CAUTION: The image must fit in the allotted space for the running header or footer.
1544
1616
  Otherwise, you will run into layout issues.