Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unify the pdf theme that all specs use #20

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 61 additions & 48 deletions themes/riscv-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ font:
catalog:
merge: true
sans-serif: GEM_FONTS_DIR/mplus1p-regular-fallback.ttf
#Petrona
#Petrona
body:
normal: Petrona-Light.ttf
bold: Petrona-Medium.ttf
italic: Petrona-LightItalic.ttf
bold_italic: Petrona-MediumItalic.ttf
header_thin: Petrona-Thin.ttf
#Montserrat
#Montserrat
headings:
normal: Montserrat-Regular.ttf
italic: Montserrat-Italic.ttf
Expand Down Expand Up @@ -63,32 +63,41 @@ base:
font_size_min: $base_font_size * 0.75
border_radius: 3
border_width: 0.25
border_color: EEEEEE
vertical_rhythm: $base_line_height_length
horizontal_rhythm: $base_line_height_length
# QUESTION should vertical_spacing be block_spacing instead?
# QUESTION should vertical_spacing be block_spacing instead?
vertical_spacing: $vertical_rhythm
link:
font_color: 428bca
# codespan is currently used for inline monospaced in prose and table cells
# codespan is currently used for inline monospaced in prose and table cells
codespan:
font-color: 000000
#font_family: code
#font_family: Droid Fallback
font_family: M+ 1mn
font_style: normal
font-size: 11.5
menu_caret_content: ' <font size="1.15em"><color rgb="b12146">›</color></font> '
# font-size: 11.5
menu_caret_content: ' <font size="1.15em"><color rgb="000000">›</color></font> '
heading:
align: left
font_color: 3e058e
margin_bottom: $block_margin_bottom
#margin_top: 0.25in
margin_top: $block_margin_bottom
min_height_after: auto
font_color: 000000
font_family: headings
font_style: light
font_style: bold
h1_font_size: floor($base_font_size * 2.8)
# h2 is used for chapter titles (book doctype only)
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
# h2 is used for chapter titles (book doctype only)
#h2_font_size: floor($base_font_size * 2.0)
h2-font-size: 11.5
#h3_font_size: round($base_font_size * 1.7)
h3-font-size: 11.5
#h4_font_size: $base_font_size_large
h4-font-size: 11.5
#h5_font_size: $base_font_size
h5-font-size: 11.5
h6_font_size: $base_font_size_small
title_page:
align: center
Expand All @@ -104,6 +113,7 @@ title_page:
font_family: headings
font_style: light
font_size: floor($base_font_size * 1.2)
margin-top: 25
authors:
font_family: headings
font_color: 3e058e
Expand Down Expand Up @@ -151,19 +161,22 @@ sidebar-title:
align: left
admonition:
font-style: italic
#column_rule_color: $base_border_color
column_rule_color: $base_border_color
column_rule_width: $base_border_width
padding: [0, $horizontal_rhythm, 0, $horizontal_rhythm]
icon:
note:
# name: pencil-square-o
name: far-edit
stroke_color: 6489b3
tip:
name: comments-o
#name: comments-o
name: far-comments
stroke_color: 646b74
size: 24
important:
name: info
#name: info
name: fas-info-circle
stroke_color: 5f8c8b
warning:
stroke_color: 9c4d4b
Expand All @@ -177,43 +190,49 @@ admonition:
# font_size: $base_font_size_large
# border_color: $base_border_color
# border_width: 2
# FIXME disable negative padding bottom once margin collapsing is implemented
# FIXME disable negative padding bottom once margin collapsing is implemented
# padding: [0, $horizontal_rhythm, $block_margin_bottom * -0.75, $horizontal_rhythm + $blockquote_border_width / 2]
# cite_font_size: $base_font_size_small
# cite_font_color: 51278d
# code is used for source blocks (perhaps change to source or listing?)
code:
# font_color: $base_font_color
#font_color: $base_font_color
font-color: 000000
font_family: $codespan_font_family
#font_size: ceil($base_font_size)
font-size: 9
font-size: 11
padding: $code_font_size
line_height: 1.15
# line_gap is an experimental property to control how a background color is applied to an inline block element
line_gap: 3.8
background_color: f4f4fb
border_color: cccccc
border_radius: $base_border_radius
border_width: 0.2
#background_color: f4f4fb
background_color: ffffff
#border_color: cccccc
#border_radius: $base_border_radius
#border_width: 0.2
caption:
end: bottom
conum:
font_family: M+ 1mn
font_color: $codespan_font_color
font_size: $base_font_size
line_height: 4 / 3
example:
# border_color: $base_border_color
border_color: $base_border_color
border_radius: $base_border_radius
border_width: 0.2
background_color: ffffff
# FIXME reenable padding bottom once margin collapsing is implemented
# FIXME re-enable padding bottom once margin collapsing is implemented
padding: [$vertical_rhythm, $horizontal_rhythm, 0, $horizontal_rhythm]
image:
align: left
caption:
align: center
prose:
margin_top: $block_margin_top
margin_bottom: $block_margin_bottom
thematic_break:
# border_color: $base_border_color
border_color: $base_border_color
border_style: solid
border_width: $base_border_width
margin_top: $vertical_rhythm * 0.5
Expand All @@ -227,12 +246,16 @@ list:
#marker_font_color: 404040
# NOTE outline_list_item_spacing applies to list items that do not have complex content
item_spacing: $vertical_rhythm / 2
figure:
caption:
end: bottom
align: center
table:
background_color: $page_background_color
#head_background_color: <hex value>
font-size: 9
#head_background_color: #2596be
#head_font_color: $base_font_color
head_font_style: bold
font-size: 11.5
#body_background_color: <hex value>
body_stripe_background_color: d7d7d7
foot_background_color: f0f0f0
Expand All @@ -247,52 +270,42 @@ table:
toc:
indent: $horizontal_rhythm
line_height: 1.4
dot_leader:
#content: ". "
dot-leader:
content: ' '
font_color: a9a9a9
#levels: 2 3
font-style: bold
#levels: 2
h2-font-style: bold
# NOTE in addition to footer, header is also supported
header:
font_size: $base_font_size_small
# NOTE if background_color is set, background and border will span width of page
border_color: dddddd
border_width: 0.35
height: $base_line_height_length * 2.6
line_height: 1
padding: [$base_line_height_length / 1.3, 1, 0, 1]
padding: [$base_line_height_length / 1, 1, .5, 1]
vertical_align: margin_inside
#image_vertical_align: <alignment> or <number>
# additional attributes for content:
# * {page-count}
# * {page-number}
# * {document-title}
# * {document-subtitle}
# * {chapter-title}
# * {section-title}
# * {section-or-chapter-title}
recto:
right:
content: '{section-or-chapter-title} | Page {page-number}'
verso:
left:
content: '{section-or-chapter-title} | Page {page-number}'
# left: 'Page {page-number} | {section-or-chapter-title}'
footer:
font_size: $base_font_size_small
# NOTE if background_color is set, background and border will span width of page
border_color: dddddd
border_width: 0.25
height: $base_line_height_length * 2.5
border_width: 0.35
height: $base_line_height_length * 2.6
line_height: 1
padding: [$base_line_height_length / 2, 1, 0, 1]
padding: [$base_line_height_length / 1, 1, .5, 1]
vertical_align: top
#image_vertical_align: <alignment> or <number>
# additional attributes for content:
# content: '{company}'
# * {page-count}
# * {page-number}
#center:
#content: '{document-title}'
#content: '{document-title}'
# * {document-subtitle}
# * {chapter-title}
# * {section-title}
Expand Down
Loading
Loading