From 02718313824caa0e87eb0f1448684ff8d2dbe4d1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 5 Oct 2021 12:39:53 -0400 Subject: primarily org related --- src/doc_reform/io_out/odt.d | 372 ++++++++++++++++++++++---------------------- 1 file changed, 186 insertions(+), 186 deletions(-) (limited to 'src/doc_reform/io_out/odt.d') diff --git a/src/doc_reform/io_out/odt.d b/src/doc_reform/io_out/odt.d index e23e409..5183342 100644 --- a/src/doc_reform/io_out/odt.d +++ b/src/doc_reform/io_out/odt.d @@ -40,7 +40,7 @@ - docReform object numbering - standard SiSU object citation numbering & system - - Hompages: + - Homepages: [https://www.doc_reform.org] [https://www.sisudoc.org] @@ -658,78 +658,78 @@ template outputODT() { // mixin outputXmlODT; @safe string odt_head(I)(I doc_matters) { string _has_tables = format(q"┃ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ┃",); string _odt_head = format(q"┃ @@ -773,123 +773,123 @@ template outputODT() { string delimit = ""; string doc_odt = ""; string _txt = ""; - foreach (part; doc_matters.has.keys_seq.scroll) { - foreach (obj; doc_abstraction[part]) { - switch (obj.metainfo.is_of_part) { - case "frontmatter": assert(part == "head" || "toc"); - switch (obj.metainfo.is_of_type) { - case "para": - switch (obj.metainfo.is_a) { - case "heading": - _txt = delimit ~ odt_format.heading(obj, doc_matters); - goto default; - case "toc": - _txt = odt_format.para(obj, doc_matters); - goto default; - default: - doc_odt ~= _txt; - _txt = ""; - break; - } - break; - default: break; - } - break; - case "body": assert(part == "body" || "head"); // surprise - switch (obj.metainfo.is_of_type) { - case "para": - switch (obj.metainfo.is_a) { - case "heading": - _txt = delimit ~ odt_format.heading(obj, doc_matters); - goto default; - case "para": - _txt = odt_format.para(obj, doc_matters); - goto default; - default: - doc_odt ~= _txt; - _txt = ""; - break; - } - break; - case "block": - switch (obj.metainfo.is_a) { - case "quote": - _txt = odt_format.quote(obj, doc_matters); - goto default; - case "group": - _txt = odt_format.group(obj, doc_matters); - goto default; - case "block": - _txt = odt_format.block(obj, doc_matters); - goto default; - case "verse": - _txt = odt_format.verse(obj, doc_matters); - goto default; - case "code": - _txt = odt_format.code(obj, doc_matters); - goto default; - case "table": - _txt = odt_format.table(obj, doc_matters); - goto default; - default: - doc_odt ~= _txt; - _txt = ""; - break; - } - break; - default: break; - } - break; - case "backmatter": - assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); - switch (obj.metainfo.is_of_type) { - case "para": - switch (obj.metainfo.is_a) { - case "heading": - _txt = delimit ~ odt_format.heading(obj, doc_matters); - goto default; - case "endnote": assert(part == "endnotes"); - _txt = odt_format.para(obj, doc_matters); - goto default; - case "glossary": assert(part == "glossary"); - _txt = odt_format.para(obj, doc_matters); - goto default; - case "bibliography": assert(part == "bibliography"); - _txt = odt_format.para(obj, doc_matters); - goto default; - case "bookindex": assert(part == "bookindex"); - _txt = odt_format.para(obj, doc_matters); - goto default; - case "blurb": assert(part == "blurb"); - _txt = odt_format.para(obj, doc_matters); - goto default; - default: - doc_odt ~= _txt; - _txt = ""; - break; - } - break; - default: break; - } - break; - case "comment": - break; - default: - { /+ debug +/ - if (doc_matters.opt.action.debug_do - && doc_matters.opt.action.verbose) { - writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); - writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); - writeln(__FILE__, ":", __LINE__, ": ", obj.text); - } - } - break; + foreach (part; doc_matters.has.keys_seq.scroll) { + foreach (obj; doc_abstraction[part]) { + switch (obj.metainfo.is_of_part) { + case "frontmatter": assert(part == "head" || "toc"); + switch (obj.metainfo.is_of_type) { + case "para": + switch (obj.metainfo.is_a) { + case "heading": + _txt = delimit ~ odt_format.heading(obj, doc_matters); + goto default; + case "toc": + _txt = odt_format.para(obj, doc_matters); + goto default; + default: + doc_odt ~= _txt; + _txt = ""; + break; + } + break; + default: break; + } + break; + case "body": assert(part == "body" || "head"); // surprise + switch (obj.metainfo.is_of_type) { + case "para": + switch (obj.metainfo.is_a) { + case "heading": + _txt = delimit ~ odt_format.heading(obj, doc_matters); + goto default; + case "para": + _txt = odt_format.para(obj, doc_matters); + goto default; + default: + doc_odt ~= _txt; + _txt = ""; + break; + } + break; + case "block": + switch (obj.metainfo.is_a) { + case "quote": + _txt = odt_format.quote(obj, doc_matters); + goto default; + case "group": + _txt = odt_format.group(obj, doc_matters); + goto default; + case "block": + _txt = odt_format.block(obj, doc_matters); + goto default; + case "verse": + _txt = odt_format.verse(obj, doc_matters); + goto default; + case "code": + _txt = odt_format.code(obj, doc_matters); + goto default; + case "table": + _txt = odt_format.table(obj, doc_matters); + goto default; + default: + doc_odt ~= _txt; + _txt = ""; + break; + } + break; + default: break; + } + break; + case "backmatter": + assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); + switch (obj.metainfo.is_of_type) { + case "para": + switch (obj.metainfo.is_a) { + case "heading": + _txt = delimit ~ odt_format.heading(obj, doc_matters); + goto default; + case "endnote": assert(part == "endnotes"); + _txt = odt_format.para(obj, doc_matters); + goto default; + case "glossary": assert(part == "glossary"); + _txt = odt_format.para(obj, doc_matters); + goto default; + case "bibliography": assert(part == "bibliography"); + _txt = odt_format.para(obj, doc_matters); + goto default; + case "bookindex": assert(part == "bookindex"); + _txt = odt_format.para(obj, doc_matters); + goto default; + case "blurb": assert(part == "blurb"); + _txt = odt_format.para(obj, doc_matters); + goto default; + default: + doc_odt ~= _txt; + _txt = ""; + break; + } + break; + default: break; + } + break; + case "comment": + break; + default: + { /+ debug +/ + if (doc_matters.opt.action.debug_do + && doc_matters.opt.action.verbose) { + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.text); + } + } + break; } } } return doc_odt; } - + @safe string odt_tail() { string _odt_tail = format(q"┃spine: <www.doc_reform.org> and <www.sisudoc.org> ┃",); @@ -2090,7 +2090,7 @@ template outputODT() { pth_odt.manifest_rdf("fs"); /+ (manifest.rdf) +/ pth_odt.settings_xml("fs"); /+ (settings.xml) +/ pth_odt.styles_xml("fs"); /+ (styles_xml) +/ - + pth_odt.content_xml("fs"); pth_odt.manifest_xml("fs"); pth_odt.meta_xml("fs"); -- cgit v1.2.3