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
|
= Heading Category Keys
:description: Reference list of the available heading category keys and their value types.
:navtitle: Heading
:source-language: yaml
[#heading]
== heading
The keys in the `heading` category control the style of most headings, including part titles, chapter titles, sections titles, the table of contents title, and discrete headings.
[cols="3,4,5a"]
|===
|Key |Value Type |Example
|font-color
|xref:color.adoc[Color] +
(default: _inherit_)
|[source]
heading:
font-color: #222222
|font-family
|xref:font-support.adoc[Font family name] +
(default: _inherit_)
|[source]
heading:
font-family: Noto Serif
|font-kerning
|`none` {vbar} `normal` +
(default: _inherit_)
|[source]
heading:
font-kerning: none
|font-style
|xref:text.adoc#font-style[Font style] +
(default: `bold`)
|[source]
heading:
font-style: italic
|line-height
|xref:language.adoc#values[Number] +
(default: `1.15`)
|[source]
heading:
line-height: 1.2
|margin-bottom
|xref:measurement-units.adoc[Measurement] +
(default: `12`)
|[source]
heading:
margin-bottom: 6
|margin-page-top
|xref:measurement-units.adoc[Measurement] +
(default: `0`)
|[source]
heading:
margin-page-top: 12
|margin-top
|xref:measurement-units.adoc[Measurement] +
(default: `4`)
|[source]
heading:
margin-top: 6
|<<min-height-after>>
|xref:measurement-units.adoc[Measurement] {vbar} auto +
(default: `20`)
|[source]
heading:
min-height-after: 0.5in
|text-align
|xref:text.adoc#text-align[Text alignment] +
(default: `$base-text-align`)
|[source]
heading:
text-align: center
|text-decoration
|xref:text.adoc#decoration[Text decoration] +
(default: `none`)
|[source]
heading:
text-decoration: underline
|text-decoration-color
|xref:color.adoc[Color] +
(default: `$heading-font-color`)
|[source]
heading:
text-decoration-color: #CCCCCC
|text-decoration-width
|xref:language.adoc#values[Number] +
(default: `$base-text-decoration-width`)
|[source]
heading:
text-decoration-width: 0.5
|text-transform
|xref:text.adoc#transform[Text transform] +
(default: _inherit_)
|[source]
heading:
text-transform: capitalize
|===
[#level]
== heading-h<n>
The keys in the `heading-h<n>` category control the style of a heading level.
`<n>` is a number ranging from 1 to 6, representing each of the six heading levels.
The `heading-h1` key controls the font properties of the document title (`doctitle`) when the doctype is `article` and the title page isn't enabled (i.e., the `title-page` document attribute isn't set).
When the doctype is `book`, the `heading-h1` key controls the properties for part titles and the `heading-h2` key controls
the properties of chapter titles.
[cols="3,4,5a"]
|===
|Key |Value Type |Example
|border-color
|xref:blocks.adoc#border-color[Color] +
(default: _not set_)
|[source]
heading:
h2-border-color: #AA0000
|border-style
|xref:blocks.adoc#border-style[Border style] +
(default: `solid`)
|[source]
heading:
h2-border-style: dashed
|border-width
|xref:blocks.adoc#border-width[Measurement] {vbar} xref:blocks.adoc#border-width[Measurement[\]] +
(default: _not set_)
|[source]
heading:
h2-border-width: [0, 0, 1, 0]
|font-color
|xref:color.adoc[Color] +
(default: `$heading-font-color`)
|[source]
heading:
h2-font-color: [0, 99%, 100%, 0]
|font-family
|xref:font-support.adoc[Font family name] +
(default: `$heading-font-family`)
|[source]
heading:
h4-font-family: Roboto
|font-kerning
|`none` {vbar} `normal` +
(default: `$heading-font-kerning`)
|[source]
heading:
h3-font-kerning: none
|<<font-size,font-size>>
|xref:text.adoc#font-size[Font size] +
(default: h1=`24`; h2=`18`; h3=`16`; h4=`14`; <h5=`12`; h6=`10`)
|[source]
heading:
h6-font-size: $base-font-size * 1.7
|font-style
|xref:text.adoc#font-style[Font style] +
(default: `$heading-font-style`)
|[source]
heading:
h3-font-style: bold_italic
|margin-bottom
|xref:measurement-units.adoc[Measurement] +
(default: `$heading-margin-bottom`)
|[source]
heading:
h2-margin-bottom: 10
|margin-page-top
|xref:measurement-units.adoc[Measurement] +
(default: `$heading-margin-page-top`)
|[source]
heading:
h2-margin-page-top: 12
|margin-top
|xref:measurement-units.adoc[Measurement] +
(default: `$heading-margin-top`)
|[source]
heading:
h2-margin-top: 6
|<<padding,padding>>
|xref:blocks.adoc#padding[Measurement] {vbar} xref:blocks.adoc#padding[Measurement[\]] +
(default: _not set_)
|[source]
heading:
h2-padding: [0, 2, 0, 6]
|text-align
|xref:text.adoc#text-align[Text alignment] +
(default: `$heading-text-align`)
|[source]
heading:
h2-text-align: center
|text-decoration
|xref:text.adoc#decoration[Text decoration] +
(default: `$heading-text-decoration`)
|[source]
heading:
h4-text-decoration: underline
|text-decoration-color
|xref:color.adoc[Color] +
(default: `$heading-text-decoration-color`)
|[source]
heading:
h4-text-decoration-color: #4C516D
|text-decoration-width
|xref:language.adoc#values[Number] +
(default: `$heading-text-decoration-width`)
|[source]
heading:
h4-text-decoration-width: 0.2
|text-transform
|xref:text.adoc#transform[Text transform] +
(default: `$heading-text-transform`)
|[source]
heading:
h3-text-transform: smallcaps
|===
[#min-height-after]
=== min-height-after
The `min-height-after` key specifies how much space to reserve below a section title or discrete heading (starting from where the bottom margin ends) for content to fit below it.
If the available space on the page is less than this value, then the heading will automatically be advanced to the next page.
[,yaml]
----
heading:
min-height-after: 0.25in
----
Rather than specifying a fixed value, you can configure the converter to ensure at least one line of content is rendered below the heading by setting the value to `auto`.
[,yaml]
----
heading:
min-height-after: auto
----
The `min-height-after` value is ignored if the section is empty or the discrete heading is the last child of its parent.
A section title and discrete heading that wraps is always advanced to the next page if it avoids it being split across pages.
[#padding]
=== padding
The `padding` key is only intended to be used to offset the border by a fixed amount.
If you want to put spacing around the top and bottom edges of the heading container, you should use the `margin-*` keys instead.
[#font-size]
=== h<n>-font-size
A font size is assigned to each heading level by the base theme.
If you want the font size of a specific level to be inherited, you must assign the value `null` (or `~` for short) to the `h<n>-font-size`.
[#chapter]
== heading-chapter
The key in the `heading-chapter` category controls the page break behavior before a chapter title.
The doctype must be `book` for the `heading-chapter` key to take effect.
[cols="3,4,5a"]
|===
|Key |Value Type |Example
|break-before
|`always` {vbar} `auto` +
(default: `always`)
|[source]
heading:
chapter:
break-before: auto
|===
[#part]
== heading-part
The keys in the `heading-part` category control the page break behavior before and after a part title.
The doctype must be `book` for the `heading-part` keys to take effect.
[cols="3,4,5a"]
|===
|Key |Value Type |Example
|break-after
|`always` {vbar} `avoid` {vbar} `auto` +
(default: `auto`)
|[source]
heading:
part:
break-after: always
|break-before
|`always` {vbar} `auto` +
(default: `always`)
|[source]
heading:
part:
break-before: auto
|===
|