aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3dv/epub_segments.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3dv/epub_segments.rb')
-rw-r--r--lib/sisu/v3dv/epub_segments.rb20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/sisu/v3dv/epub_segments.rb b/lib/sisu/v3dv/epub_segments.rb
index 96abfdc0..262fde3c 100644
--- a/lib/sisu/v3dv/epub_segments.rb
+++ b/lib/sisu/v3dv/epub_segments.rb
@@ -61,8 +61,8 @@ module SiSU_EPUB_Seg
require_relative 'epub' # epub.rb
require_relative 'shared_metadata' # shared_metadata.rb
class Output
- def initialize(md,outputfile,seg,minitoc,type='')
- @md,@output_epub_cont_seg,@seg,@minitoc,@type=md,outputfile,seg,minitoc,type
+ def initialize(md,outputfile,seg,type='')
+ @md,@output_epub_cont_seg,@seg,@type=md,outputfile,seg,type
end
def output #CONSIDER
if @seg[:title] =~/\S/
@@ -132,10 +132,10 @@ WOK
@vz=SiSU_Env::GetInit.instance.skin
@seg_name_xhtml=@@seg_name_xhtml || nil
@seg_name_xhtml_tracker=@@tracker || nil
+ @make=SiSU_Env::ProcessingSettings.new(@md) if @md
end
def songsheet
begin
- @minitoc=SiSU_EPUB::Source::Toc.new(@md,@data).minitoc
data=get_subtoc_endnotes(@data)
data=articles(data)
SiSU_EPUB_Seg::Seg.new.cleanup # (((( added ))))
@@ -231,15 +231,15 @@ WOK
output_epub_cont_seg=File.new(segfilename,'w') if @@seg_name_xhtml[tracking-1]
if dob.is==:heading \
or @@seg_name_xhtml[tracking-1] !~/endnotes|book_index|metadata/
- SiSU_EPUB_Seg::Output.new(@md,output_epub_cont_seg,@@seg,@minitoc).output
+ SiSU_EPUB_Seg::Output.new(@md,output_epub_cont_seg,@@seg).output
elsif dob.is==:heading_insert
if @@seg_name_xhtml[tracking-1]=='endnotes'
- SiSU_EPUB_Seg::Output.new(@md,output_epub_cont_seg,@@seg,@minitoc,'endnotes').output
+ SiSU_EPUB_Seg::Output.new(@md,output_epub_cont_seg,@@seg,'endnotes').output
elsif @@seg_name_xhtml[tracking-1]=='book_index'
- SiSU_EPUB_Seg::Output.new(@md,output_epub_cont_seg,@@seg,@minitoc,'idx').output
+ SiSU_EPUB_Seg::Output.new(@md,output_epub_cont_seg,@@seg,'idx').output
@@seg[:idx]=[]
elsif @@seg_name_xhtml[tracking-1]=='metadata' # navigation bug FIX
- SiSU_EPUB_Seg::Output.new(@md,output_epub_cont_seg,@@seg,@minitoc,'metadata').output
+ SiSU_EPUB_Seg::Output.new(@md,output_epub_cont_seg,@@seg,'metadata').output
else puts "#{__FILE__}::#{__LINE__}"
end
else puts "#{__FILE__}::#{__LINE__}"
@@ -250,7 +250,7 @@ WOK
if @@seg_name_xhtml[tracking] =='metadata'
segfilename="#{dir_epub_cont}/#{@@seg_name_xhtml[tracking]}#{Sfx[:epub_xhtml]}"
output_epub_cont_seg=File.new(segfilename,'w')
- SiSU_EPUB_Seg::Output.new(@md,output_epub_cont_seg,@@seg,@minitoc,'metadata').output
+ SiSU_EPUB_Seg::Output.new(@md,output_epub_cont_seg,@@seg,'metadata').output
SiSU_EPUB_Seg::Seg.new.reinitialise #BUG navigation bug with items following metadata, and occurring before manifest, this becomes a bug ... work area for book index, FIX
end
#@output_epub_cont_seg.close #%(((( EOF )))) -->
@@ -411,7 +411,9 @@ WOK
and dob.ln==4
@@seg[:main] << %{\n<div class="content">\n}
@@seg[:main] << dob_xhtml
- @@seg[:main] << @@seg_subtoc[@@get_hash_fn] #% insertion of sub-toc
+ if @make.build.segsubtoc?
+ @@seg[:main] << @@seg_subtoc[@@get_hash_fn] #% insertion of sub-toc
+ end
else
@@seg[:main] << dob_xhtml
end