Code Block Category Keys

code

The keys in the code category control the arrangement and style of literal, listing, and source blocks as well as literal table cells.

Key Value Type Example

background-color

Color
(default: not set)

code:
  background-color: #F5F5F5

border-color

Color
(default: 'EEEEEE')

code:
  border-color: #CCCCCC

border-radius

Measurement
(default: not set)

code:
  border-radius: 4

border-style

Border style
(default: solid)

code:
  border-style: dashed

border-width

Measurement | Measurement[]
(default: 0.5)

code:
  border-width: [0.75, 0]

font-color

Color
(default: inherit)

code:
  font-color: #333333

font-family

Font family name
(default: Courier)

code:
  font-family: M+ 1mn

font-size

Font size
(default: 10.8)

code:
  font-size: 11

font-style

Font style
(default: inherit)

code:
  font-style: italic

line-gap

Number
(default: 0)

code:
  line-gap: 3.8

line-height

Number
(default: 1.2)

code:
  line-height: 1.25

padding

Measurement | Measurement[]
(default: 9)

code:
  padding: 12mm

line-gap

The line-gap key is used to tune the height of the background color applied to a span of block text highlighted using Rouge.

code-highlight

The key in the code-highlight category only applies when you use Rouge as the source highlighter. Otherwise, the background color is controlled by the source highlighter theme.

Key Value Type Example

background-color

Color
(default: #FFFFCC)

code:
  highlight-background-color: #FFFF00

code-linenum

The key in the code-linenum category only applies when you use Pygments as the source highlighter. Otherwise, the font color of line numbers is controlled by the source highlighter theme.

Key Value Type Example

font-color

Color
(default: #999999)

code:
  linenum-font-color: #CCCCCC