diff options
Diffstat (limited to 'lib/sisu/v5/html_format.rb')
-rw-r--r-- | lib/sisu/v5/html_format.rb | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/sisu/v5/html_format.rb b/lib/sisu/v5/html_format.rb index db9fb449..3b15502f 100644 --- a/lib/sisu/v5/html_format.rb +++ b/lib/sisu/v5/html_format.rb @@ -8,7 +8,8 @@ * Author: Ralph Amissah * Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010, 2011, 2012, 2013 Ralph Amissah, All Rights Reserved. + 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah, + All Rights Reserved. * License: GPL 3 or later: @@ -1029,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]/) \ ? '<br /><hr width=90% /><br />' : '' %{#{section_break} @@ -1044,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 @@ -1074,6 +1078,9 @@ WOK </div> } end + def title_heading0 + title_heading('h1','tiny') + end def title_heading1 title_heading('h1','tiny') end @@ -1331,6 +1338,9 @@ WOK else '' end end + def lev0 #docinfo + lev('h1','toc') + end def lev1 lev('h1','toc') end @@ -1349,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') @@ -1381,7 +1392,7 @@ WOK lev('h6','minitoc') end def mini_lev0 #docinfo - lev('h0','minitoc') + lev('h1','minitoc') end def mini_tail %{ |