Skip to content

Instantly share code, notes, and snippets.

@kongou-ae
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kongou-ae/46291f86c53d959271a7 to your computer and use it in GitHub Desktop.
Save kongou-ae/46291f86c53d959271a7 to your computer and use it in GitHub Desktop.
font:
catalog:
NotoSerif:
normal: notoserif-regular-latin.ttf
bold: notoserif-bold-latin.ttf
italic: notoserif-italic-latin.ttf
bold_italic: notoserif-bolditalic-latin.ttf
Mplus1mn:
normal: mplus1mn-regular-ascii-conums.ttf
bold: mplus1mn-bold-ascii.ttf
italic: mplus1mn-italic-ascii.ttf
bold_italic: mplus1mn-bolditalic-ascii.ttf
Mplus1pMultilingual:
normal: mplus1p-regular-multilingual.ttf
bold: mplus1p-regular-multilingual.ttf
italic: mplus1p-regular-multilingual.ttf
bold_italic: mplus1p-regular-multilingual.ttf
migmix:
normal: migmix-1p/migmix-1p-regular.ttf
bold: migmix-1p/migmix-1p-bold.ttf
italic: migmix-1p/migmix-1p-regular.ttf
bold_italic: migmix-1p/migmix-1p-bold.ttf
fallbacks:
# NOTE M+ 1p doesn't support all CJK characters, but it at least has some coverage
# NOTE M+ 1p provides the arrows for ->, <-, => and <=
- migmix
page:
background_color: ffffff
layout: portrait
# NOTE multiply inches by 72 to get pt values
#margin: [0.5 * 72, 0.67 * 72, 0.67 * 72, 0.67 * 72]
margin: [30mm, 30mm, 30mm, 30mm]
# size can be a named size (e.g., A4) or custom dimensions (e.g., [8.25in, 11.69in])
size: A4
base:
# color as hex string (leading # is optional)
font_color: 000000
# color as RGB array
#font_color: [51, 51, 51]
# color as CMYK array (approximated)
#font_color: [0, 0, 0, 0.92]
#font_color: [0, 0, 0, 92%]
font_family: migmix
# choose one of these font_size/line_height_length combinations
#font_size: 14
#line_height_length: 20
#font_size: 11.25
#line_height_length: 18
#font_size: 11.2
#line_height_length: 16
font_size: 10.5
#line_height_length: 15
# correct line height for NotoSerif metrics
line_height_length: 12
#font_size: 11.25
#line_height_length: 18
line_height: $base_line_height_length / $base_font_size
font_size_large: round($base_font_size * 1.25)
font_size_small: round($base_font_size * 0.85)
font_style: normal
align: justify
border_radius: 4
border_width: 0.5
border_color: dddddd
# FIXME vertical_rhythm is weird; we should think in terms of ems
#vertical_rhythm: $base_line_height_length * 2 / 3
# correct line height for NotoSerif metrics
vertical_rhythm: $base_line_height_length
horizontal_rhythm: $base_line_height_length
link:
font_color: 428bca
# literal is currently used for inline monospaced in prose and table cells
literal:
font_color: b12146
font_family: $base_font_family
heading:
#font_color: 181818
font_color: $base_font_color
font_family: $base_font_family
# h1 is used for part titles
h1_font_size: floor($base_font_size * 2.6)
# h2 is used for chapter titles
h2_font_size: floor($base_font_size * 2.15)
h3_font_size: round($base_font_size * 1.7)
h4_font_size: $base_font_size_large
h5_font_size: $base_font_size
h6_font_size: $base_font_size_small
font_style: bold
#line_height: 1.4
# correct line height for NotoSerif metrics
line_height: 1.2
margin_top: $vertical_rhythm * 0.2
margin_bottom: $vertical_rhythm * 0.8
title_page:
align: center
title_top: 40%
title_font_size: $heading_h1_font_size
title_font_color: 000000
title_line_height: 0.9
subtitle_font_size: $heading_h3_font_size
subtitle_font_style: bold_italic
subtitle_line_height: 1
authors_margin_top: $base_font_size * 3
authors_font_size: $base_font_size_large
authors_font_color: 181818
revision_margin_top: $base_font_size * 3
#prose:
# margin_top: 0
# margin_bottom: $vertical_rhythm
block:
#margin_top: 0
#margin_bottom: $vertical_rhythm
padding: [$vertical_rhythm, $vertical_rhythm * 1.25, $vertical_rhythm, $vertical_rhythm * 1.25]
# code is used for source blocks (perhaps change to source or listing?)
caption:
font_family: $base_font_family
font_style: bold
align: center
# FIXME perhaps set line_height instead of / in addition to margins?
margin_inside: $vertical_rhythm * 0.25
margin_outside: 0
code:
font_color: $base_font_color
#font_family: LiberationMono
#font_size: floor($base_font_size * 0.9)
#font_size: 10
#padding: [9.5, 9.5, 9.5, 9.5]
# LiberationMono carries extra gap below line
#padding: [10, 10, 7.5, 10]
#line_height: 1.45
font_family: $literal_font_family
font_size: ceil($base_font_size)
#padding: [$base_font_size, $code_font_size, $base_font_size, $code_font_size]
padding: $code_font_size
line_height: 1.25
background_color: f5f5f5
border_color: cccccc
border_radius: $base_border_radius
border_width: 0.75
blockquote:
font_color: $base_font_color
font_size: $base_font_size_large
border_width: 5
border_color: $base_border_color
cite_font_size: $base_font_size_small
cite_font_color: 999999
sidebar:
border_color: ffffff
border_radius: $base_border_radius
border_width: $base_border_width
background_color: eeeeee
title_font_color: $heading_font_color
title_font_family: $heading_font_family
title_font_size: $heading_h4_font_size
title_font_style: $heading_font_style
title_align: center
example:
border_color: $base_border_color
border_radius: $base_border_radius
border_width: 0.75
background_color: transparent
admonition:
border_color: $base_border_color
border_width: $base_border_width
conum:
font_family: $base_font_family
font_color: $literal_font_color
font_size: $base_font_size
line_height: 4 / 3
image:
align_default: left
scaled_width_default: 0.5
lead:
# QUESTION what about $base_font_size_large?
#font_size: floor($base_line_height_length * 0.8)
#font_size: floor($base_font_size * 1.15)
#line_height: 1.3
font_size: $base_font_size_large
line_height: 1.4
abstract:
#font_color: 404040
font_color: 5c6266
font_size: $lead_font_size
line_height: $lead_line_height
font_style: italic
thematic_break:
border_color: $base_border_color
margin_top: $vertical_rhythm * 0.5
margin_bottom: $vertical_rhythm * 1.5
description_list:
term_font_style: italic
description_indent: $horizontal_rhythm * 1.25
outline_list:
indent: $horizontal_rhythm * 1.5
# NOTE item_spacing applies to list items that do not have complex content
item_spacing: $vertical_rhythm / 2
table:
background_color: ffffff
head_background_color: 000055
head_font_color: ffffff
even_row_background_color: f9f9f9
#odd_row_background_color: <hex value>
foot_background_color: f0f0f0
border_color: dddddd
border_width: $base_border_width
# HACK accounting for line-height
cell_padding: [3, 3, 6, 3]
toc:
indent: $horizontal_rhythm
dot_leader_color: dddddd
#dot_leader_content: ". "
line_height: 1.4
# NOTE In addition to footer, header is also supported
#
footer:
font_size: $base_font_size_small
font_color: $base_font_color
# NOTE if background_color is set, background and border will span width of page
border_color: dddddd
border_width: 0.25
height: 25mm
padding: [3mm,0,0,0]
valign: top
#image_valign: <alignment> or <number>
# additional attributes for content:
# * {page-count}
# * {page-number}
# * {document-title}
# * {document-subtitle}
# * {chapter-title}
# * {section-title}
# * {section-or-chapter-title}
recto_content:
center: '{page-number} / {page-count}'
verso_content:
center: '{page-number} / {page-count}'
header:
font_size: $base_font_size_small
font_color: $base_font_color
# NOTE if background_color is set, background and border will span width of page
border_color: dddddd
border_width: 0.25
height: 25mm
padding: [0,0,3mm,0]
valign: bottom
image_valign: 50
# additional attributes for content:
# * {page-count}
# * {page-number}
# * {document-title}
# * {document-subtitle}
# * {chapter-title}
# * {section-title}
# * {section-or-chapter-title}
recto_content:
left: '{document-title}'
right: image:header-img-10mm.png[width="75"]
verso_content:
left: '{document-title}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment