Heading Category Keys
heading
The keys in the heading
category control the style of most headings, including part titles, chapter titles, sections titles, the title of the table of contents, 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 |
|
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 |
|
|