Skip to content

Commit

Permalink
resolves #577 display title for open block (PR #581)
Browse files Browse the repository at this point in the history
* resolves #577 display title of open block
* slighly reduce font size of block title (aka caption) in default theme
  • Loading branch information
mojavelinux authored Sep 25, 2016
1 parent 5e8c596 commit f502de6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions data/themes/default-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ block:
margin_bottom: $vertical_rhythm
caption:
align: left
font_size: $base_font_size * 0.95
font_style: italic
# FIXME perhaps set line_height instead of / in addition to margins?
margin_inside: $vertical_rhythm / 3
Expand Down
15 changes: 6 additions & 9 deletions lib/asciidoctor-pdf/converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -523,18 +523,15 @@ def convert_example node
end

def convert_open node
case node.style
when 'abstract'
if node.style == 'abstract'
convert_abstract node
when 'partintro'
if node.blocks.size == 1 && node.blocks.first.style == 'abstract'
convert_abstract node.blocks.first
else
add_dest_for_block node if node.id
convert_content_for_block node
end
elsif node.style == 'partintro' && node.blocks.size == 1 && node.blocks.first.style == 'abstract'
# TODO process block title and id
# TODO process abstract child even when partintro has multiple blocks
convert_abstract node.blocks.first
else
add_dest_for_block node if node.id
layout_caption node.title if node.title?
convert_content_for_block node
end
end
Expand Down

0 comments on commit f502de6

Please sign in to comment.