aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/xhtml_epub2_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/xhtml_epub2_format.rb')
-rw-r--r--lib/sisu/v5/xhtml_epub2_format.rb15
1 files changed, 11 insertions, 4 deletions
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}
<head>
<title>
@@ -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] \
? ''