Heading Category Keys
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.
Key | Value Type | Example |
---|---|---|
font-color |
Color |
|
font-family |
Font family name |
|
font-kerning |
|
|
font-style |
Font style |
|
line-height |
Number |
|
margin-bottom |
Measurement |
|
margin-page-top |
Measurement |
|
margin-top |
Measurement |
|
Measurement | auto |
|
|
text-align |
Text alignment |
|
text-decoration |
Text decoration |
|
text-decoration-color |
Color |
|
text-decoration-width |
Number |
|
text-transform |
Text transform |
|
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.
Key | Value Type | Example |
---|---|---|
border-color |
Color |
|
border-style |
Border style |
|
border-width |
Measurement | Measurement[] |
|
font-color |
Color |
|
font-family |
Font family name |
|
font-kerning |
|
|
Font size |
|
|
font-style |
Font style |
|
margin-bottom |
Measurement |
|
margin-page-top |
Measurement |
|
margin-top |
Measurement |
|
Measurement | Measurement[] |
|
|
text-align |
Text alignment |
|
text-decoration |
Text decoration |
|
text-decoration-color |
Color |
|
text-decoration-width |
Number |
|
text-transform |
Text transform |
|
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.
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
.
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.
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.
Key | Value Type | Example |
---|---|---|
break-before |
|
|
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.
Key | Value Type | Example |
---|---|---|
break-after |
|
|
break-before |
|
|