• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Modified asciidoctor-pdf default-theme.yml adding chapter names to the page footer
2
3font:
4  catalog:
5    # Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols
6    Noto Serif:
7      normal: notoserif-regular-subset.ttf
8      bold: notoserif-bold-subset.ttf
9      italic: notoserif-italic-subset.ttf
10      bold_italic: notoserif-bold_italic-subset.ttf
11    # M+ 1mn supports ASCII and the circled numbers used for conums
12    M+ 1mn:
13      normal: mplus1mn-regular-ascii-conums.ttf
14      bold: mplus1mn-bold-ascii.ttf
15      italic: mplus1mn-italic-ascii.ttf
16      bold_italic: mplus1mn-bold_italic-ascii.ttf
17    # M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols
18    # It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font
19    M+ 1p Fallback:
20      normal: mplus1p-regular-fallback.ttf
21      bold: mplus1p-regular-fallback.ttf
22      italic: mplus1p-regular-fallback.ttf
23      bold_italic: mplus1p-regular-fallback.ttf
24  fallbacks:
25    - M+ 1p Fallback
26page:
27  background_color: ffffff
28  layout: portrait
29  margin: [0.5in, 0.67in, 0.67in, 0.67in]
30  # margin_inner and margin_outer keys are used for recto/verso print margins when media=prepress
31  margin_inner: 0.75in
32  margin_outer: 0.59in
33  size: A4
34base:
35  align: justify
36  # color as hex string (leading # is optional)
37  font_color: 333333
38  # color as RGB array
39  #font_color: [51, 51, 51]
40  # color as CMYK array (approximated)
41  #font_color: [0, 0, 0, 0.92]
42  #font_color: [0, 0, 0, 92%]
43  font_family: Noto Serif
44  # choose one of these font_size/line_height_length combinations
45  #font_size: 14
46  #line_height_length: 20
47  #font_size: 11.25
48  #line_height_length: 18
49  #font_size: 11.2
50  #line_height_length: 16
51  font_size: 10.5
52  #line_height_length: 15
53  # correct line height for Noto Serif metrics
54  line_height_length: 12
55  #font_size: 11.25
56  #line_height_length: 18
57  line_height: $base_line_height_length / $base_font_size
58  font_size_large: round($base_font_size * 1.25)
59  font_size_small: round($base_font_size * 0.85)
60  font_size_min: $base_font_size * 0.75
61  font_style: normal
62  border_color: eeeeee
63  border_radius: 4
64  border_width: 0.5
65# FIXME vertical_rhythm is weird; we should think in terms of ems
66#vertical_rhythm: $base_line_height_length * 2 / 3
67# correct line height for Noto Serif metrics (comes with built-in line height)
68vertical_rhythm: $base_line_height_length
69horizontal_rhythm: $base_line_height_length
70# QUESTION should vertical_spacing be block_spacing instead?
71vertical_spacing: $vertical_rhythm
72link:
73  font_color: 428bca
74# literal is currently used for inline monospaced in prose and table cells
75literal:
76  font_color: b12146
77  font_family: M+ 1mn
78menu_caret_content: " <font size=\"1.15em\"><color rgb=\"b12146\">\u203a</color></font> "
79heading:
80  align: left
81  #font_color: 181818
82  font_color: $base_font_color
83  font_family: $base_font_family
84  font_style: bold
85  # h1 is used for part titles (book doctype only)
86  h1_font_size: floor($base_font_size * 2.6)
87  # h2 is used for chapter titles (book doctype only)
88  h2_font_size: floor($base_font_size * 2.15)
89  h3_font_size: round($base_font_size * 1.7)
90  h4_font_size: $base_font_size_large
91  h5_font_size: $base_font_size
92  h6_font_size: $base_font_size_small
93  #line_height: 1.4
94  # correct line height for Noto Serif metrics (comes with built-in line height)
95  line_height: 1
96  margin_top: $vertical_rhythm * 0.4
97  margin_bottom: $vertical_rhythm * 0.9
98title_page:
99  align: right
100  logo:
101    top: 10%
102  title:
103    top: 55%
104    font_size: $heading_h1_font_size
105    font_color: 999999
106    line_height: 0.9
107  subtitle:
108    font_size: $heading_h3_font_size
109    font_style: bold_italic
110    line_height: 1
111  authors:
112    margin_top: $base_font_size * 1.25
113    font_size: $base_font_size_large
114    font_color: 181818
115  revision:
116    margin_top: $base_font_size * 1.25
117block:
118  margin_top: 0
119  margin_bottom: $vertical_rhythm
120caption:
121  align: left
122  font_size: $base_font_size * 0.95
123  font_style: italic
124  # FIXME perhaps set line_height instead of / in addition to margins?
125  margin_inside: $vertical_rhythm / 3
126  #margin_inside: $vertical_rhythm / 4
127  margin_outside: 0
128lead:
129  font_size: $base_font_size_large
130  line_height: 1.4
131abstract:
132  font_color: 5c6266
133  font_size: $lead_font_size
134  line_height: $lead_line_height
135  font_style: italic
136  first_line_font_style: bold
137  title:
138    align: center
139    font_color: $heading_font_color
140    font_family: $heading_font_family
141    font_size: $heading_h4_font_size
142    font_style: $heading_font_style
143admonition:
144  column_rule_color: $base_border_color
145  column_rule_width: $base_border_width
146  padding: [0, $horizontal_rhythm, 0, $horizontal_rhythm]
147  #icon:
148  #  tip:
149  #    name: fa-lightbulb-o
150  #    stroke_color: 111111
151  #    size: 24
152  label:
153    text_transform: uppercase
154    font_style: bold
155blockquote:
156  font_color: $base_font_color
157  font_size: $base_font_size_large
158  border_color: $base_border_color
159  border_width: 5
160  # FIXME disable negative padding bottom once margin collapsing is implemented
161  padding: [0, $horizontal_rhythm, $block_margin_bottom * -0.75, $horizontal_rhythm + $blockquote_border_width / 2]
162  cite_font_size: $base_font_size_small
163  cite_font_color: 999999
164# code is used for source blocks (perhaps change to source or listing?)
165code:
166  font_color: $base_font_color
167  font_family: $literal_font_family
168  font_size: ceil($base_font_size)
169  padding: $code_font_size
170  line_height: 1.25
171  # line_gap is an experimental property to control how a background color is applied to an inline block element
172  line_gap: 3.8
173  background_color: f5f5f5
174  border_color: cccccc
175  border_radius: $base_border_radius
176  border_width: 0.75
177conum:
178  font_family: M+ 1mn
179  font_color: $literal_font_color
180  font_size: $base_font_size
181  line_height: 4 / 3
182example:
183  border_color: $base_border_color
184  border_radius: $base_border_radius
185  border_width: 0.75
186  background_color: ffffff
187  # FIXME reenable padding bottom once margin collapsing is implemented
188  padding: [$vertical_rhythm, $horizontal_rhythm, 0, $horizontal_rhythm]
189image:
190  align: left
191prose:
192  margin_top: $block_margin_top
193  margin_bottom: $block_margin_bottom
194sidebar:
195  background_color: eeeeee
196  border_color: e1e1e1
197  border_radius: $base_border_radius
198  border_width: $base_border_width
199  # FIXME reenable padding bottom once margin collapsing is implemented
200  padding: [$vertical_rhythm, $vertical_rhythm * 1.25, 0, $vertical_rhythm * 1.25]
201  title:
202    align: center
203    font_color: $heading_font_color
204    font_family: $heading_font_family
205    font_size: $heading_h4_font_size
206    font_style: $heading_font_style
207thematic_break:
208  border_color: $base_border_color
209  border_style: solid
210  border_width: $base_border_width
211  margin_top: $vertical_rhythm * 0.5
212  margin_bottom: $vertical_rhythm * 1.5
213description_list:
214  term_font_style: bold
215  term_spacing: $vertical_rhythm / 4
216  description_indent: $horizontal_rhythm * 1.25
217outline_list:
218  indent: $horizontal_rhythm * 1.5
219  #marker_font_color: 404040
220  # NOTE outline_list_item_spacing applies to list items that do not have complex content
221  item_spacing: $vertical_rhythm / 2
222table:
223  background_color: $page_background_color
224  #head_background_color: <hex value>
225  #head_font_color: $base_font_color
226  head_font_style: bold
227  #body_background_color: <hex value>
228  body_stripe_background_color: f9f9f9
229  foot_background_color: f0f0f0
230  border_color: dddddd
231  border_width: $base_border_width
232  cell_padding: 3
233toc:
234  indent: $horizontal_rhythm
235  line_height: 1.4
236  dot_leader:
237    #content: ". "
238    font_color: a9a9a9
239    #levels: 2 3
240# NOTE in addition to footer, header is also supported
241footer:
242  font_size: $base_font_size_small
243  # NOTE if background_color is set, background and border will span width of page
244  border_color: dddddd
245  border_width: 0.25
246  height: $base_line_height_length * 2.5
247  line_height: 1
248  padding: [$base_line_height_length / 2, 1, 0, 1]
249  vertical_align: top
250  #image_vertical_align: <alignment> or <number>
251  # additional attributes for content:
252  # * {page-count}
253  # * {page-number}
254  # * {document-title}
255  # * {document-subtitle}
256  # * {chapter-title}
257  # * {section-title}
258  # * {section-or-chapter-title}
259  recto:
260    #columns: "<50% =0% >50%"
261    right:
262      #content: '{page-number}'
263      content: '{chapter-title} | {page-number}'
264      #content: '{section-or-chapter-title} | {page-number}'
265      #content: '{document-title} | {page-number}'
266    #center:
267    #  content: '{page-number}'
268  verso:
269    #columns: $footer_recto_columns
270    left:
271      #content: $footer_recto_right_content
272      content: '{page-number} | {chapter-title}'
273      #content: '{page-number} | {section-or-chapter-title}'
274    #center:
275    #  content: '{page-number}'
276