aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/output/epub3.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-01-25 12:34:03 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2019-05-17 16:59:38 -0400
commit3f393a3c2955c5af64cab3f22b776b96aebebd66 (patch)
tree6fa03285ac8d60b4acd88a906c1a8701a72b47c6 /src/doc_reform/output/epub3.d
parentoutput_xmls epub use struct (diff)
rearrange some code
Diffstat (limited to 'src/doc_reform/output/epub3.d')
-rw-r--r--src/doc_reform/output/epub3.d38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/doc_reform/output/epub3.d b/src/doc_reform/output/epub3.d
index c94c240..f57229b 100644
--- a/src/doc_reform/output/epub3.d
+++ b/src/doc_reform/output/epub3.d
@@ -349,7 +349,7 @@ template outputEPub3() {
default:
epubWrite.doc_parts ~= obj.tags.segment_anchor_tag_epub;
epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= xhtml_format.epub3_seg_head(doc_matters);
- auto t = xhtml_format.heading_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[obj.tags.segment_anchor_tag_epub] ~= t[0];
epubWrite.doc_epub3_endnotes[obj.tags.segment_anchor_tag_epub] ~= t[1];
break;
@@ -358,12 +358,12 @@ template outputEPub3() {
case 4:
segment_filename = obj.tags.segment_anchor_tag_epub;
epubWrite.doc_epub3[segment_filename] ~= xhtml_format.epub3_seg_head(doc_matters);
- auto t = xhtml_format.heading_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case 5: .. case 7:
- auto t = xhtml_format.heading_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.heading_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
@@ -393,7 +393,7 @@ template outputEPub3() {
case "para":
switch (obj.metainfo.is_a) {
case "toc":
- auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
@@ -422,7 +422,7 @@ template outputEPub3() {
case "para":
switch (obj.metainfo.is_a) {
case "para":
- auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
@@ -439,32 +439,32 @@ template outputEPub3() {
case "block":
switch (obj.metainfo.is_a) {
case "quote":
- auto t = xhtml_format.quote_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.quote_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0].to!string;
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "group":
- auto t = xhtml_format.group_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.group_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0].to!string;
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "block":
- auto t = xhtml_format.block_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.block_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0].to!string;
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "poem":
break;
case "verse":
- auto t = xhtml_format.verse_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.verse_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0].to!string;
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "code":
- epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(obj, _txt);
+ epubWrite.doc_epub3[segment_filename] ~= xhtml_format.code(_txt, obj);
break;
case "table":
- epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(obj, _txt);
+ epubWrite.doc_epub3[segment_filename] ~= xhtml_format.table(_txt, obj);
epubWrite.doc_epub3_endnotes[segment_filename] ~= "";
break;
default:
@@ -493,26 +493,26 @@ template outputEPub3() {
case "para":
switch (obj.metainfo.is_a) {
case "endnote": assert(part == "endnotes");
- auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
break;
case "glossary": assert(part == "glossary");
- auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "bibliography": assert(part == "bibliography");
- auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "bookindex": assert(part == "bookindex");
- auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
case "blurb": assert(part == "blurb");
- auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "epub");
+ auto t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub");
epubWrite.doc_epub3[segment_filename] ~= t[0];
epubWrite.doc_epub3_endnotes[segment_filename] ~= t[1];
break;
@@ -598,9 +598,9 @@ template outputEPub3() {
/+ epub specific documents +/
epubWrite.mimetypes = epub3_mimetypes;
epubWrite.meta_inf_container_xml = epub3_container_xml;
- epubWrite.oebps_toc_ncx = epub2_oebps_toc_ncx(doc_abstraction, doc_matters);
- epubWrite.oebps_toc_nav_xhtml = epub3_oebps_toc_nav_xhtml(doc_abstraction, doc_matters);
- epubWrite.oebps_content_opf = epub3_oebps_content(doc_abstraction, doc_matters, oepbs_content_parts);
+ epubWrite.oebps_toc_ncx = doc_abstraction.epub2_oebps_toc_ncx(doc_matters);
+ epubWrite.oebps_toc_nav_xhtml = doc_abstraction.epub3_oebps_toc_nav_xhtml(doc_matters);
+ epubWrite.oebps_content_opf = doc_abstraction.epub3_oebps_content(doc_matters, oepbs_content_parts);
epubWrite.epub3_write_output_files(doc_matters);
}
void epub3_write_output_files(W,I)(