From 5fb49b575a548313b827fd66fd7ecce514fe0e45 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 6 Jan 2014 23:02:50 -0500 Subject: v5: heading recalibration, code (downstream) changes * here no doubt remains breakage (test, fix & test again) --- lib/sisu/v5/xhtml_epub2_format.rb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'lib/sisu/v5/xhtml_epub2_format.rb') diff --git a/lib/sisu/v5/xhtml_epub2_format.rb b/lib/sisu/v5/xhtml_epub2_format.rb index b7b5f9a0..8dd8a88e 100644 --- a/lib/sisu/v5/xhtml_epub2_format.rb +++ b/lib/sisu/v5/xhtml_epub2_format.rb @@ -1306,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} @@ -1320,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> @@ -1413,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 @@ -1989,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] \ ? '' -- cgit v1.2.3