aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v3/epub.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v3/epub.rb')
-rw-r--r--lib/sisu/v3/epub.rb24
1 files changed, 8 insertions, 16 deletions
diff --git a/lib/sisu/v3/epub.rb b/lib/sisu/v3/epub.rb
index 06021574..a4dce6ab 100644
--- a/lib/sisu/v3/epub.rb
+++ b/lib/sisu/v3/epub.rb
@@ -142,7 +142,6 @@ module SiSU_EPUB
def tuned_file_instructions
@tell=SiSU_Screen::Ansi.new(@md.opt.cmd)
@md.opt.cmd=@md.opt.cmd.gsub(/H/,'h')
- @md.file_type='html' if @md.opt.cmd =~/[hon]/
directories
dal_array=@particulars.dal_array # dal file drawn here
@tuned_file_array=SiSU_EPUB_Tune::Tune.new(dal_array,@md).songsheet
@@ -336,7 +335,8 @@ module SiSU_EPUB
and link !~/#/ #% keep eye on link
p_num=SiSU_EPUB_Format::ParagraphNumber.new(@md,link)
end
- title=if dob.obj !~/Document Information/; linkname
+ title=if dob.obj !~/Document Information/
+ linkname
else
link='metadata'
%{<b><a href="#{link}#{Sfx[:epub_xhtml]}">#{linkname}</a></b>}
@@ -357,9 +357,9 @@ module SiSU_EPUB
end
else
@@toc[:scr] << '<br />'
- link=if dob.ln; dob.ln
- else ''
- end
+ link=(dob.ln) \
+ ? dob.ln
+ : ''
%{<b><a href="##{link}">#{linkname}</a></b>}
end
txt_obj={ txt: title }
@@ -489,10 +489,6 @@ module SiSU_EPUB
dochead=dochead.gsub(/toc\.(html)/,'doc.\1') #kludge
toc_shared << dochead #<< ads.div.major
segtoc << format_head_toc.head #<< ads.div.major
- if SiSU_EPUB_Format::HeadToc.method_defined? :toc_head_escript
- toc_shared << format_head_toc.toc_head_escript
- segtoc << format_head_toc.toc_head_escript
- end
if defined? @md.rights.all \
and @md.rights.all
rights=format_head_toc.rights.all
@@ -503,8 +499,6 @@ module SiSU_EPUB
prefix_b=format_head_toc.prefix_b
prefix_b=SiSU_EPUB_Tune::CleanXHTML.new(prefix_b).clean
end
- seg_toc_band=format_head_toc.seg_head_navigation_band
- seg_toc_band_bottom=format_head_toc.seg_head_navigation_band_bottom
tmp_head=nil
doc_title_endnote=@md.title.full.gsub(/(\*+)/,'<sup><a href="#endnotes">\1</a></sup>')
tmp_head=doc_title_endnote + "\n"
@@ -521,7 +515,6 @@ module SiSU_EPUB
toc_shared << format_txt_obj.center_bold
segtoc << format_txt_obj.center_bold
end
- segtoc << seg_toc_band
tmp_head=nil
if defined? @md.prefix_a \
and @md.prefix_a
@@ -552,7 +545,6 @@ module SiSU_EPUB
segtoc << prefix_b
end
#Segtoc tail added here
- segtoc << seg_toc_band_bottom
segtoc << format_head_toc.xhtml_close
segtoc=segtoc.flatten.compact #watch
SiSU_EPUB::Source::Output.new(@md,segtoc).segtoc
@@ -666,14 +658,14 @@ module SiSU_EPUB
def segtoc
begin
if @make.build.toc?
- filename_html_index=@make_file.epub.xhtml_index
+ filename_xhtml=@make_file.epub.xhtml_index
@output.each do |para|
para=para.strip
unless para =~/\A\s*\Z/
- filename_html_index.puts para,"\n"
+ filename_xhtml.puts para,"\n"
end
end
- filename_html_index.close
+ filename_xhtml.close
end
rescue
SiSU_Errors::InfoError.new($!,$@,@md.opt.cmd,@md.fns).error do