Table of Contents Category Keys

toc

The keys in the toc category control the arrangement and style of the table of contents.

Key Value Type Example

break-after

auto
(default: not set)

toc:
  break-after: auto

font-color

Color
(default: inherit)

toc:
  font-color: #333333

font-family

Font family name
(default: inherit)

toc:
  font-family: Noto Serif

font-kerning

none | normal
(default: inherit)

toc:
  font-kerning: none

font-size

Font size
(default: inherit)

toc:
  font-size: 9

font-style

Font style
(default: normal)

toc:
  font-style: bold

hanging-indent

Measurement
(default: not set)

toc:
  hanging-indent: 0.5in

indent

Measurement
(default: 15)

toc:
  indent: 20

line-height

Number
(default: 1.4)

toc:
  line-height: 1.5

margin-top

Measurement
(default: 0)

toc:
  margin-top: 0

text-decoration

Text decoration
(default: none)

toc:
  text-decoration: underline

text-decoration-color

Color
(default: $toc-font-color)

toc:
  text-decoration-color: #CCCCCC

text-decoration-width

Number
(default: $base-text-decoration-width)

toc:
  text-decoration-width: 0.5

text-transform

Text transform
(default: inherit)

toc:
  text-transform: uppercase

toc-h<n>

The keys in the toc-h<n> category control the arrangement and style of each heading level displayed in the table of contents. <n> is a number ranging from 1 to 6, representing each of the six heading levels.

Key Value Type Example

font-color

Color
(default: inherit)

toc:
  h3-font-color: #999999

font-family

Font family name
(default: inherit)

toc:
  h2-font-family: Noto Serif

font-kerning

none | normal
(default: inherit)

toc:
  h3-font-kerning: none

font-size

Font size
(default: inherit)

toc:
  h3-font-size: 9

font-style

Font style
(default: inherit)

toc:
  h2-font-style: italic

text-transform

Text transform
(default: inherit)

toc:
  h3-text-transform: none

toc-title

The keys in the toc-title category control the arrangement and style of the title of the table of contents.

Key Value Type Example

font-color

Color
(default: $heading-h2-font-color)

toc:
  title:
    font-color: #AA0000

font-family

Font family name
(default: $heading-h2-font-family)

toc:
  title:
    font-family: Noto Serif

font-kerning

none | normal
(default: inherit)

toc:
  title:
    font-kerning: none

font-size

Font size
(default: $heading-h2-font-size)

toc:
  title:
    font-size: 18

font-style

Font style
(default: $heading-h2-font-style)

toc:
  title:
    font-style: bold_italic

text-align

Text alignment
(default: $heading-h2-text-align)

toc:
  title:
    text-align: right

text-transform

Text transform
(default: $heading-h2-text-transform)

toc:
  title:
    text-transform: uppercase

toc-dot-leader

The keys in the toc-dot-leader category control the arrangement and style of the dot leader in the table of contents.

Key Value Type Example

content

Quoted string
(default: '. ')

toc:
  dot-leader:
    content: ". "

font-color

Color
(default: inherit)

toc:
  dot-leader:
    font-color: #999999

font-size

Font size
(default: inherit)

toc:
  dot-leader:
    font-size: 10

font-style

Font style
(default: normal)

toc:
  dot-leader:
    font-style: bold

levels

all | none | Integers (space-separated)
(default: all)

toc:
  dot-leader:
    levels: 2 3

font-*

The dot leader inherits all font properties except font-style from the parent toc category.

The purpose of the font-size key is to slightly increase the size of the dot leader symbol. If the value is too large, it can impact the line height and thus throw off the alignment of the title and the page number.

levels

The integers assigned to the levels key are based on the AsciiDoc section levels. That is part = 0, chapter = 1, etc. Dot leaders are only shown for the specified levels. If a value isn’t specified, dot leaders are shown for all levels.