diff options
Diffstat (limited to 'org')
-rw-r--r-- | org/out_xmls.org | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/org/out_xmls.org b/org/out_xmls.org index 6d0e624..4a2626b 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -130,13 +130,13 @@ import #+NAME: xhtml_format_objects_div_delimit #+BEGIN_SRC d @safe string div_delimit( - string part, - return ref string previous_part + string section, + return ref string previous_section ) { string delimit = ""; string delimit_ = ""; - if (part != previous_part) { - switch (part) { + if (section != previous_section) { + switch (section) { case "head": delimit_ ~= "\n<div class=\"doc_title\">\n" ; break; @@ -147,13 +147,13 @@ import delimit_ ~= "\n<div class=\"doc_bookindex\">\n" ; break; default: - delimit_ ~= "\n<div class=\"doc_" ~ part ~ "\">\n" ; + delimit_ ~= "\n<div class=\"doc_" ~ section ~ "\">\n" ; break; } - if (previous_part.length > 0) { + if (previous_section.length > 0) { delimit ~= "\n</div>"; } - previous_part = part; + previous_section = section; delimit ~= delimit_; } // you also need to close the last div, introduce a footer? @@ -1801,7 +1801,7 @@ template outputHTML() { string[] doc_html; string[] doc; string suffix = ".html"; - string previous_part = ""; + string previous_section = ""; string delimit = ""; #+END_SRC @@ -1809,9 +1809,9 @@ template outputHTML() { #+NAME: output_html_scroll_loop_parts #+BEGIN_SRC d -foreach (part; doc_matters.has.keys_seq.scroll) { - foreach (obj; doc_abstraction[part]) { - delimit = xhtml_format.div_delimit(part, previous_part); +foreach (section; doc_matters.has.keys_seq.scroll) { + foreach (obj; doc_abstraction[section]) { + delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); switch (obj.metainfo.is_of_part) { #+END_SRC @@ -1820,7 +1820,7 @@ foreach (part; doc_matters.has.keys_seq.scroll) { #+NAME: output_html_scroll_is_frontmatter #+BEGIN_SRC d -case "frontmatter": assert(part == "head" || "toc"); +case "frontmatter": assert(section == "head" || "toc"); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { @@ -1854,7 +1854,7 @@ case "frontmatter": assert(part == "head" || "toc"); #+NAME: output_html_scroll_is_body #+BEGIN_SRC d -case "body": assert(part == "body" || "head"); +case "body": assert(section == "body" || "head"); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { @@ -1920,29 +1920,29 @@ case "body": assert(part == "body" || "head"); #+NAME: output_html_scroll_is_backmatter #+BEGIN_SRC d case "backmatter": - assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); + assert(section == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { case "heading": doc_html ~= delimit ~ xhtml_format.heading_scroll(_txt, obj, doc_matters, suffix); break; - case "endnote": assert(part == "endnotes"); + case "endnote": assert(section == "endnotes"); doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); break; - case "glossary": assert(part == "glossary"); + case "glossary": assert(section == "glossary"); doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); break; - case "bibliography": assert(part == "bibliography"); + case "bibliography": assert(section == "bibliography"); doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); break; - case "bookindex": assert(part == "bookindex"); + case "bookindex": assert(section == "bookindex"); doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); break; - case "blurb": assert(part == "blurb"); + case "blurb": assert(section == "blurb"); doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); break; - case "tail": assert(part == "tail"); + case "tail": assert(section == "tail"); doc_html ~= xhtml_format.para_scroll(_txt, obj, doc_matters, suffix); break; default: @@ -2041,7 +2041,7 @@ default: string[] top_level_headings = ["","","",""]; string previous_seg_filename = ""; string suffix = ".html"; - string previous_part = ""; + string previous_section = ""; string delimit = ""; #+END_SRC @@ -2049,9 +2049,9 @@ default: #+NAME: output_html_seg_loop_parts #+BEGIN_SRC d -foreach (part; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[part]) { - delimit = xhtml_format.div_delimit(part, previous_part); +foreach (section; doc_matters.has.keys_seq.seg) { + foreach (obj; doc_abstraction[section]) { + delimit = xhtml_format.div_delimit(section, previous_section); string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); #+END_SRC @@ -2060,7 +2060,7 @@ foreach (part; doc_matters.has.keys_seq.seg) { #+NAME: output_html_seg_is_heading #+BEGIN_SRC d if (obj.metainfo.is_a == "heading") { - assert(part == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); + assert(section == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); switch (obj.metainfo.heading_lev_markup) { case 0: .. case 3: /+ fill buffer, and replace with new levels from 1 to 3 +/ @@ -2131,7 +2131,7 @@ if (obj.metainfo.is_a == "heading") { #+NAME: output_html_seg_is_not_heading_switch #+BEGIN_SRC d } else { - assert(part == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); + assert(section == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); Tuple!(string, string[]) t; switch (obj.metainfo.is_of_part) { #+END_SRC @@ -2140,7 +2140,7 @@ if (obj.metainfo.is_a == "heading") { #+NAME: output_html_seg_is_frontmatter #+BEGIN_SRC d -case "frontmatter": assert(part == "head" || "toc"); +case "frontmatter": assert(section == "head" || "toc"); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { @@ -2172,7 +2172,7 @@ case "frontmatter": assert(part == "head" || "toc"); #+NAME: output_html_seg_is_body #+BEGIN_SRC d -case "body": assert(part == "body"); +case "body": assert(section == "body"); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { @@ -2245,35 +2245,35 @@ case "body": assert(part == "body"); #+NAME: output_html_seg_is_backmatter #+BEGIN_SRC d case "backmatter": - assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); + assert(section == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { - case "endnote": assert(part == "endnotes"); + case "endnote": assert(section == "endnotes"); t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; break; - case "glossary": assert(part == "glossary"); + case "glossary": assert(section == "glossary"); t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; - case "bibliography": assert(part == "bibliography"); + case "bibliography": assert(section == "bibliography"); t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; - case "bookindex": assert(part == "bookindex"); + case "bookindex": assert(section == "bookindex"); t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; - case "blurb": assert(part == "blurb"); + case "blurb": assert(section == "blurb"); t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; - case "tail": assert(part == "tail"); + case "tail": assert(section == "tail"); t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; @@ -2578,8 +2578,8 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> content ~= " " ~ "</guide>" ~ "\n "; content ~= "" ~ "</package>"; debug(epubmanifest) { - foreach (part; doc_matters.has.keys_seq.seg) { // TODO - foreach (obj; doc_abstraction[part]) { + foreach (section; doc_matters.has.keys_seq.seg) { // TODO + foreach (obj; doc_abstraction[section]) { if (obj.metainfo.is_a == "heading") { if (obj.metainfo.heading_lev_markup == 4) { writefln( @@ -2763,8 +2763,8 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> #+NAME: output_epub3_xhtml_seg_output_loop #+BEGIN_SRC d -foreach (part; doc_matters.has.keys_seq.seg) { - foreach (obj; doc_abstraction[part]) { +foreach (section; doc_matters.has.keys_seq.seg) { + foreach (obj; doc_abstraction[section]) { string _txt = xhtml_format.special_characters_breaks_indents_bullets(obj); #+END_SRC @@ -2773,7 +2773,7 @@ foreach (part; doc_matters.has.keys_seq.seg) { #+NAME: output_epub3_xhtml_seg_object_is_heading #+BEGIN_SRC d if (obj.metainfo.is_a == "heading") { - assert(part == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); + assert(section == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); switch (obj.metainfo.heading_lev_markup) { case 0: .. case 3: /+ fill buffer, and replace with new levels from 1 to 3 +/ @@ -2840,7 +2840,7 @@ if (obj.metainfo.is_a == "heading") { #+NAME: output_epub3_xhtml_seg_object_is_not_heading #+BEGIN_SRC d } else { - assert(part == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); + assert(section == "head" || "toc" || "body" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); Tuple!(string, string[]) t; switch (obj.metainfo.is_of_part) { #+END_SRC @@ -2849,7 +2849,7 @@ if (obj.metainfo.is_a == "heading") { #+NAME: output_epub3_xhtml_seg_object_is_frontmatter #+BEGIN_SRC d -case "frontmatter": assert(part == "head" || "toc"); +case "frontmatter": assert(section == "head" || "toc"); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { @@ -2882,7 +2882,7 @@ case "frontmatter": assert(part == "head" || "toc"); #+NAME: output_epub3_xhtml_seg_object_is_body #+BEGIN_SRC d -case "body": assert(part == "body"); +case "body": assert(section == "body"); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { @@ -2956,35 +2956,35 @@ case "body": assert(part == "body"); #+NAME: output_epub3_xhtml_seg_object_is_backmatter #+BEGIN_SRC d case "backmatter": - assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); + assert(section == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); switch (obj.metainfo.is_of_type) { case "para": switch (obj.metainfo.is_a) { - case "endnote": assert(part == "endnotes"); + case "endnote": assert(section == "endnotes"); t = xhtml_format.para_seg(_txt, obj, doc_matters, suffix, "epub"); epubWrite.doc_epub3[segment_filename] ~= t[0]; break; - case "glossary": assert(part == "glossary"); + case "glossary": assert(section == "glossary"); 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"); + case "bibliography": assert(section == "bibliography"); 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"); + case "bookindex": assert(section == "bookindex"); 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"); + case "blurb": assert(section == "blurb"); 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 "tail": assert(part == "tail"); + case "tail": assert(section == "tail"); 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]; |