From 5fb49b575a548313b827fd66fd7ecce514fe0e45 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 6 Jan 2014 23:02:50 -0500 Subject: v5: heading recalibration, code (downstream) changes * here no doubt remains breakage (test, fix & test again) --- lib/sisu/v5/html_format.rb | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'lib/sisu/v5/html_format.rb') diff --git a/lib/sisu/v5/html_format.rb b/lib/sisu/v5/html_format.rb index 5617193f..3b15502f 100644 --- a/lib/sisu/v5/html_format.rb +++ b/lib/sisu/v5/html_format.rb @@ -1030,7 +1030,7 @@ WOK para_form_css(tag,attrib) end def heading_normal(tag,attrib) - section_break=(tag=~/h[1-4]/) \ + section_break=(tag=~/h[1-5]/) \ ? '


' : '' %{#{section_break} @@ -1045,6 +1045,9 @@ WOK def heading_body heading_normal('p','norm') end + def heading_body0 + heading_normal('h1','norm') + end def heading_body1 heading_normal('h1','norm') end @@ -1075,6 +1078,9 @@ WOK } end + def title_heading0 + title_heading('h1','tiny') + end def title_heading1 title_heading('h1','tiny') end @@ -1332,6 +1338,9 @@ WOK else '' end end + def lev0 #docinfo + lev('h1','toc') + end def lev1 lev('h1','toc') end @@ -1350,13 +1359,14 @@ WOK def lev6 lev('h6','toc') end - def lev0 #docinfo - lev('h0','toc') - end def strip_endnotes(txt) txt=txt.gsub(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ') txt end + def mini_lev0 + @txt=strip_endnotes(@txt) + lev('h1','minitoc') + end def mini_lev1 @txt=strip_endnotes(@txt) lev('h1','minitoc') @@ -1382,7 +1392,7 @@ WOK lev('h6','minitoc') end def mini_lev0 #docinfo - lev('h0','minitoc') + lev('h1','minitoc') end def mini_tail %{ -- cgit v1.2.3