From 48ba380760b306077afa7a156a21d3ff98d26775 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 4 May 2018 21:22:39 -0400 Subject: html & epub images in place (dimensions not & other issues) --- src/sdp/output/epub3.d | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/sdp/output/epub3.d') diff --git a/src/sdp/output/epub3.d b/src/sdp/output/epub3.d index 321ef9b..eb55593 100644 --- a/src/sdp/output/epub3.d +++ b/src/sdp/output/epub3.d @@ -375,7 +375,7 @@ template outputEPub3() { case "para": switch (obj.is_a) { case "toc": - auto t = xhtml_format.para_seg(obj, _txt, suffix); + auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0]; doc_epub3_endnotes[segment_filename] ~= t[1]; break; @@ -398,7 +398,7 @@ template outputEPub3() { case "para": switch (obj.is_a) { case "para": - auto t = xhtml_format.para_seg(obj, _txt, suffix); + auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0]; doc_epub3_endnotes[segment_filename] ~= t[1]; break; @@ -412,24 +412,24 @@ template outputEPub3() { case "block": switch (obj.is_a) { case "quote": - auto t = xhtml_format.quote_seg(obj, _txt, suffix); + auto t = xhtml_format.quote_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0].to!string; doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "group": - auto t = xhtml_format.group_seg(obj, _txt, suffix); + auto t = xhtml_format.group_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0].to!string; doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "block": - auto t = xhtml_format.block_seg(obj, _txt, suffix); + auto t = xhtml_format.block_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0].to!string; doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "poem": break; case "verse": - auto t = xhtml_format.verse_seg(obj, _txt, suffix); + auto t = xhtml_format.verse_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0].to!string; doc_epub3_endnotes[segment_filename] ~= t[1]; break; @@ -460,26 +460,26 @@ template outputEPub3() { case "para": switch (obj.is_a) { case "endnote": assert(part == "endnotes"); - auto t = xhtml_format.para_seg(obj, _txt, suffix); + auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0]; break; case "glossary": assert(part == "glossary"); - auto t = xhtml_format.para_seg(obj, _txt, suffix); + auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0]; doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(part == "bibliography"); - auto t = xhtml_format.para_seg(obj, _txt, suffix); + auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0]; doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(part == "bookindex_seg"); - auto t = xhtml_format.para_seg(obj, _txt, suffix); + auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0]; doc_epub3_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(part == "blurb"); - auto t = xhtml_format.para_seg(obj, _txt, suffix); + auto t = xhtml_format.para_seg(obj, _txt, suffix, "epub"); doc_epub3[segment_filename] ~= t[0]; doc_epub3_endnotes[segment_filename] ~= t[1]; break; @@ -723,13 +723,13 @@ template outputEPub3() { debug(epub_output) { debug(epub_images) { writeln( - doc_matters.src_path_info.image_root, image, " -> ", + doc_matters.src_path_info.src_image_root_with_path, "/", image, " -> ", pth_epub3.dbg_doc_oebps_image(doc_matters.src.filename), "/", image ); } } - auto fn_src = doc_matters.src_path_info.image_root ~ image; - auto fn_out = pth_epub3.doc_oebps_image(doc_matters.src.filename).to!string ~ "/" ~ image; + auto fn_src = doc_matters.src_path_info.src_image_root_with_path ~ "/" ~ image; + auto fn_out = pth_epub3.doc_oebps_image(doc_matters.src.filename.to!string) ~ "/" ~ image; if (exists(fn_src)) { { auto zip_arc_member_file = new ArchiveMember(); -- cgit v1.2.3