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.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/sisu/v3/epub.rb b/lib/sisu/v3/epub.rb
index 12ec1ce0..c1dcacec 100644
--- a/lib/sisu/v3/epub.rb
+++ b/lib/sisu/v3/epub.rb
@@ -338,7 +338,7 @@ module SiSU_EPUB
title=if dob.obj !~/Document Information/; linkname
else
link='metadata'
- %{<b><a href="#{link}#{@md.lang_code_insert}#{Sfx[:epub_xhtml]}">#{linkname}</a></b>}
+ %{<b><a href="#{link}#{Sfx[:epub_xhtml]}">#{linkname}</a></b>}
end
toc={}
txt_obj={ txt: title }
@@ -423,13 +423,13 @@ module SiSU_EPUB
linkname,ocn=dob.obj.strip,dob.ocn
p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) if ocn
if dob.ln==4
- seg_link=%{ <a href="#{dob.name}#{@md.lang_code_insert}#{Sfx[:epub_xhtml]}">
+ seg_link=%{ <a href="#{dob.name}#{Sfx[:epub_xhtml]}">
#{dob.obj}
</a> }
@@seg_url=dob.name
elsif dob.obj =~/\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+/
seg_link=dob.obj.gsub(/^(\d+.\d+.\d+.\d+|\d+.\d+.\d+|\d+.\d+|\d+)(.*)/,
- %{<a href="\\1#{@md.lang_code_insert}#{Sfx[:epub_xhtml]}">} +
+ %{<a href="\\1#{Sfx[:epub_xhtml]}">} +
%{\\1 \\2</a> })
end
p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn) if ocn
@@ -451,7 +451,7 @@ module SiSU_EPUB
if ocn \
and ocn !~/#/
p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn)
- lnk_n_txt=%{ <a href="#{@@seg_url}#{@md.lang_code_insert}#{Sfx[:epub_xhtml]}#o#{ocn}">
+ lnk_n_txt=%{ <a href="#{@@seg_url}#{Sfx[:epub_xhtml]}#o#{ocn}">
#{linkname}
</a>}
txt_obj={ txt: lnk_n_txt }
@@ -472,7 +472,7 @@ module SiSU_EPUB
if ocn \
and ocn !~/#/
p_num=SiSU_EPUB_Format::Paragraph_number.new(@md,ocn)
- lnk_n_txt=%{ <a href="#{@@seg_url}#{@md.lang_code_insert}#{Sfx[:epub_xhtml]}#o#{ocn}">
+ lnk_n_txt=%{ <a href="#{@@seg_url}#{Sfx[:epub_xhtml]}#o#{ocn}">
#{linkname}
</a>}
txt_obj={ txt: lnk_n_txt }
@@ -660,7 +660,10 @@ module SiSU_EPUB
img_pth=@md.env.path.image_source_include
@md.ec[:image].each do |x|
if FileTest.directory?("#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image") \
- and FileTest.file?("#{img_pth}/#{x}")
+ && FileTest.file?("#{@md.file.output_path.epub.rel_image}/#{x}")
+ cp("#{@md.file.output_path.epub.rel_image}/#{x}","#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image")
+ elsif FileTest.directory?("#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image") \
+ && FileTest.file?("#{img_pth}/#{x}")
cp("#{img_pth}/#{x}","#{@md.env.processing_path.epub}/#{Ep[:d_oebps]}/image")
end
end