From 6bc3b814011e829db684ec96bb3abd1e4abb29c3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 8 Aug 2014 00:34:25 -0400 Subject: v5 v6: extend document structure, headings A - D, 1 - 4 * sql db table structure changed (needs to be rebuilt) --- lib/sisu/v6/xhtml_epub2_format.rb | 48 +++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 7 deletions(-) (limited to 'lib/sisu/v6/xhtml_epub2_format.rb') diff --git a/lib/sisu/v6/xhtml_epub2_format.rb b/lib/sisu/v6/xhtml_epub2_format.rb index 626eb79f..aba5b761 100644 --- a/lib/sisu/v6/xhtml_epub2_format.rb +++ b/lib/sisu/v6/xhtml_epub2_format.rb @@ -162,7 +162,7 @@ module SiSU_XHTML_EPUB2_Format padding-left: 0em; text-indent: 0mm; } - p, h0, h1, h2, h3, h4, h5, h6 { + p, h0, h1, h2, h3, h4, h5, h6, h7 { display: block; font-family: verdana, arial, georgia, tahoma, sans-serif, helvetica, times, roman; font-size: 100%; @@ -992,18 +992,18 @@ module SiSU_XHTML_EPUB2_Format font-weight: bold; } - h0, h1, h2, h3, h4, h5, h6 { + h0, h1, h2, h3, h4, h5, h6, h7 { font-weight: bold; line-height: 120%; text-align: left; margin-top: 20px; margin-bottom: 10px; } - h4.norm, h5.norm, h6.norm { + h4.norm, h5.norm, h6.norm, h7.norm { margin-top: 10px; margin-bottom: 0px; } - h1.center, h2.center, h3.center, h4.center, h5.center, h6.center { + h1.center, h2.center, h3.center, h4.center, h5.center, h6.center, h7.center { text-align: center; } h1 { font-size: 120%; } @@ -1012,6 +1012,7 @@ module SiSU_XHTML_EPUB2_Format h4 { font-size: 105%; } h5 { font-size: 100%; } h6 { font-size: 100%; } + h7 { font-size: 100%; } h0 { font-size: 80%; } h1.i {margin-left: 2em;} @@ -1059,6 +1060,11 @@ module SiSU_XHTML_EPUB2_Format font-size: 90%; line-height: 110%; } + h7.toc { + margin-left: 7em; + font-size: 90%; + line-height: 105%; + } .microtoc { margin-top: 2px; @@ -1092,6 +1098,11 @@ module SiSU_XHTML_EPUB2_Format font-weight: normal; font-size: 90%; } + h7.microtoc { + margin-left: 30mm; + font-weight: normal; + font-size: 85%; + } .subtoc { margin-right: 34%; @@ -1109,6 +1120,12 @@ module SiSU_XHTML_EPUB2_Format margin-top: 0px; margin-bottom: 0px; } + h7.subtoc { + margin-left: 4em; + font-size: 70%; + margin-top: 0px; + margin-bottom: 0px; + } div.substance { width: 100%; @@ -1196,10 +1213,10 @@ module SiSU_XHTML_EPUB2_Format background-color: #f9f9aa; } - h1.c, h2.c, h3.c, h4.c, h5.c, h6.c, p.c { + h1.c, h2.c, h3.c, h4.c, h5.c, h6.c, h7.c, p.c { text-align: center } - h1.red, h2.red, h3.red, h4.red, h5.red, h6.red { + h1.red, h2.red, h3.red, h4.red, h5.red, h6.red, h7.red { text-align: center; color: #ff0000; margin-left: 5mm; @@ -1208,7 +1225,7 @@ module SiSU_XHTML_EPUB2_Format margin-bottom: 20px; margin-right: 15mm; } - h1.ruby, h2.ruby, h3.ruby, h4.ruby, h5.ruby, h6.ruby { + h1.ruby, h2.ruby, h3.ruby, h4.ruby, h5.ruby, h6.ruby, h7.ruby { text-align: center; color: #990000; margin-left: 5mm; @@ -2043,6 +2060,9 @@ output_epub_cont_seg.close def seg_heading6 seg_heading_sub('p','bold',@txt) end + def seg_heading7 + seg_heading_sub('p','bold',@txt) + end def dl #check :trailer "
#{@txt} #{@trailer}
" end @@ -2149,6 +2169,9 @@ output_epub_cont_seg.close def subtoc_lev6 subtoc_lev('h6','subtoc') if @txt end + def subtoc_lev7 + subtoc_lev('h7','subtoc') if @txt + end def heading_sub(tag,attrib,txt) txt=txt.gsub(/(?:#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})\s*/m,' ') %{ @@ -2177,6 +2200,9 @@ output_epub_cont_seg.close def heading6 heading_sub('p','bold',@txt) end + def heading7 + heading_sub('h7','bold',@txt) + end def navigation_heading4 %{
@@ -2193,6 +2219,11 @@ output_epub_cont_seg.close def navigation_heading6 %{

#{@txt} +

} + end + def navigation_heading7 + %{

+ #{@txt}

} end def navigation_center @@ -2238,6 +2269,9 @@ output_epub_cont_seg.close def lev6 lev('h6','toc') end + def lev7 + lev('h7','toc') + end def lev0 #docinfo lev('h0','toc') end -- cgit v1.2.3