diff --git a/lib/asciidoctor-pdf/converter.rb b/lib/asciidoctor-pdf/converter.rb index 63f7badc1..007022ec0 100644 --- a/lib/asciidoctor-pdf/converter.rb +++ b/lib/asciidoctor-pdf/converter.rb @@ -338,6 +338,12 @@ def build_pdf_info doc end def convert_section sect, opts = {} + if sect.special && sect.sectname == 'abstract' + # HACK cheat a bit to hide this section from TOC; TOC should filter these sections + sect.context = :open + return convert_abstract sect + end + theme_font :heading, level: (hlevel = sect.level + 1) do title = sect.numbered_title formal: true align = (@theme[%(heading_h#{hlevel}_align)] || @theme.heading_align || @base_align).to_sym