diff options
Diffstat (limited to 'lib/sisu/v5/xhtml_epub2_format.rb')
-rw-r--r-- | lib/sisu/v5/xhtml_epub2_format.rb | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/sisu/v5/xhtml_epub2_format.rb b/lib/sisu/v5/xhtml_epub2_format.rb index e53c3bfe..8dd8a88e 100644 --- a/lib/sisu/v5/xhtml_epub2_format.rb +++ b/lib/sisu/v5/xhtml_epub2_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: @@ -1225,7 +1226,7 @@ module SiSU_XHTML_EPUB2_Format x=x.gsub(/ /,' ') if Ep[:alt]==:on x.gsub(/&/,'&'). gsub(/</,"<").gsub(/>/,">"). - gsub(/#{Dx[:url_o]}/,Dx[:url_o_xml]).gsub(/#{Dx[:url_c]}/,Dx[:url_o_xml]). + gsub(/#{Dx[:url_o]}/,Dx[:url_o_xml]).gsub(/#{Dx[:url_c]}/,Dx[:url_c_xml]). #gsub(/</,'<').gsub(/>/,'>'). gsub(/\\\\/,'<br />'). gsub(/<br(?: \/)?>/,'<br />') @@ -1305,6 +1306,7 @@ application/epub+zip dir_epub_cont=@md.env.processing_path.epub + '/' + Ep[:d_oebps] segfilename=dir_epub_cont + '/' + name output_epub_cont_seg=File.new(segfilename,'w') + txt=dob.obj.gsub(/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/,'') output_epub_cont_seg << %{#{doc_type} <head> <title> @@ -1319,7 +1321,7 @@ application/epub+zip <div class="substance"> <label class="ocn"><a href="#o#{dob.ocn}" class="lnkocn">#{dob.ocn}</a></label> <h1 class="norm" id="o#{dob.ocn}"> - #{dob.obj} + #{txt} </h1> </div> </div> @@ -1412,15 +1414,16 @@ output_epub_cont_seg.close WOK end def navpoint(dob,no,fn_base,hashtag=nil) - fn=fn_base + Sfx[:epub_xhtml] - name=hashtag ? fn + hashtag : fn + fn=fn_base + Sfx[:epub_xhtml] + name=hashtag ? fn + hashtag : fn id_u=DISABLE[:epub][:ncx_navpoint_unique_id] \ ? '' : "-#{no}" + txt=dob.obj.gsub(/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/,'') <<-WOK <navPoint class="chapter" id="navpoint#{id_u}" playOrder="#{no}"> <navLabel> - <text>#{dob.obj}</text> + <text>#{txt}</text> </navLabel> <content src="#{name}" /> WOK @@ -1988,6 +1991,11 @@ output_epub_cont_seg.close </div> } end + def title_heading0 + DISABLE[:epub][:per_section_title] \ + ? '' + : title_heading('h1','tiny') + end def title_heading1 DISABLE[:epub][:per_section_title] \ ? '' |