From ace605ee4d96b7ee2891246655478f46862d357f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 3 Aug 2022 18:28:58 -0400 Subject: org noweb adjustments --- src/doc_reform/io_out/odt.d | 366 ++++++++++++++++++++++---------------------- 1 file changed, 183 insertions(+), 183 deletions(-) (limited to 'src/doc_reform/io_out') diff --git a/src/doc_reform/io_out/odt.d b/src/doc_reform/io_out/odt.d index 68be605..c5fb469 100644 --- a/src/doc_reform/io_out/odt.d +++ b/src/doc_reform/io_out/odt.d @@ -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,117 +773,117 @@ 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.vox_gt1) { - 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.vox_gt1) { + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part); + writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a); + writeln(__FILE__, ":", __LINE__, ": ", obj.text); + } + } + break; } } } -- cgit v1.2.3