aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/epub_segments.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/epub_segments.rb')
-rw-r--r--lib/sisu/v3/epub_segments.rb24
1 files changed, 2 insertions, 22 deletions
diff --git a/lib/sisu/v3/epub_segments.rb b/lib/sisu/v3/epub_segments.rb
index 6ad278f4..5e08968a 100644
--- a/lib/sisu/v3/epub_segments.rb
+++ b/lib/sisu/v3/epub_segments.rb
@@ -70,8 +70,6 @@ module SiSU_EPUB_seg
filename_seg << @seg[:title] << @seg[:nav]
if @type=='endnotes'
@seg[:headings]=[]
- format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md)
- @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author)
txt_obj={ txt: 'Endnotes', ocn_display: ''}
format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj)
@seg[:headings] << format_seg.title_heading1
@@ -79,8 +77,6 @@ module SiSU_EPUB_seg
elsif @type=='idx'
@seg[:headings]=[]
format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md)
- @seg[:headings] << format_head_seg.title_banner(@md.title.main,@md.title.sub,@author)
- txt_obj={ txt: 'Index', ocn_display: ''}
format_seg=SiSU_EPUB_Format::Format_seg.new(@md,txt_obj)
@seg[:headings] << format_seg.title_heading1
filename_seg << @seg[:heading_idx] << @seg[:headings] << %{\n<div class="content">\n} << @seg[:idx] << '</div>'
@@ -132,10 +128,9 @@ WOK
@@loop_count=@@seg_total=@@tracker=0
@@is4=@@is3=@@is2=@@is1=0
@@heading1=@@heading2=@@heading3=@@heading4=0
- @@seg[:nav],@@seg[:title],@@seg[:headings],@@seg[:main],@@seg[:idx],@@seg[:tail],@@seg_subtoc_array,@@seg_endnotes_array,@@seg[:endnote_all]=Array.new(10){[]}
+ @@seg[:title],@@seg[:headings],@@seg[:main],@@seg[:idx],@@seg[:tail],@@seg_subtoc_array,@@seg_endnotes_array,@@seg[:endnote_all]=Array.new(8){[]}
@@seg[:heading_endnotes]=''
@@tablehead,@@number_of_cols=0,0
- @@segtocband=nil
@@fns_previous=''
attr_reader :seg_name_xhtml,:seg_name_xhtml_tracker
def initialize(md='',data='')
@@ -298,30 +293,16 @@ WOK
end
def heading_art(dob)
format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md)
- if dob.is=='heading' \
- and dob.ln =~/^[1-6]/
- @@seg[:dot_nav]= (@@tracker < @@seg_total-1) \
- ? format_head_seg.dot_control_pre_next
- : format_head_seg.dot_control_pre
- end
@@seg[:title]=format_head_seg.head
end
def head(dob)
clean=/<!.*?!>|<:.*?>$/
- format_head_seg=SiSU_EPUB_Format::Head_seg.new(@md)
- if @@tracker < @@seg_total-1
- @@segtocband=(@@tracker==0) \
- ? format_head_seg.toc_next2
- : format_head_seg.toc_pre_next2
- else @@segtocband=format_head_seg.toc_pre2 #if format_head_seg.toc_pre2
- end
@p_num ||= ''
if @@is1==1
if defined? @md.creator.author \
and @md.creator.author
@author=%{<b>#{@md.creator.author}</b>\n}
end
- @@seg[:nav] << format_head_seg.navigation_band(@@segtocband)
ocn=if @@heading1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#{@dp}:#{@dp}#{Mx[:id_c]}$/]; $1 #fix
else ''
end
@@ -452,8 +433,7 @@ WOK
@@seg[:close] << format_head_seg.xhtml_close
end
def reinitialise
- @@seg[:title],@@seg[:dot_nav],@@seg[:nav],@@seg[:headings],@@seg[:main],@@seg[:tail],@@seg[:credits]=Array.new(8){[]}
- @@segtocband=nil
+ @@seg[:title],@@seg[:headings],@@seg[:main],@@seg[:tail],@@seg[:credits]=Array.new(5){[]}
end
def cleanup
reinitialise