From 4101c83a16ce715c84d353572bd0f231059bfbac Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 19 Jun 2018 12:17:37 -0400 Subject: make string object_number a property of int o_n --- org/meta_abstraction.org | 548 ++++++++++++++++++++++++----------------------- org/output_xmls.org | 2 +- org/sdp.org | 6 +- 3 files changed, 281 insertions(+), 275 deletions(-) (limited to 'org') diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index 3d6f6b0..3b21446 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -509,7 +509,6 @@ comp_obj_heading_.typeinfo.is_of = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Table of Contents"; comp_obj_heading_.node.ocn = 0; -comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "toc"; @@ -686,7 +685,6 @@ if there is a glossary section you need to: comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Glossary"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "_part_glossary"; @@ -705,7 +703,6 @@ if there is a glossary section you need to: comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Glossary"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "glossary"; @@ -727,7 +724,6 @@ if there is a glossary section you need to: comp_obj_para.typeinfo.is_a = "glossary"; comp_obj_para.text = line.to!string.strip; comp_obj_para.node.ocn = 0; - comp_obj_para.node.object_number = ""; comp_obj_para.misc.object_number_off = ""; comp_obj_para.misc.object_number_type = 0; comp_obj_para.attrib.indent_hang = indent["hang_position"]; @@ -810,7 +806,6 @@ if there is a blurb section you need to: comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Blurb"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "_part_blurb"; @@ -829,7 +824,6 @@ if there is a blurb section you need to: comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Blurb"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "blurb"; @@ -851,7 +845,6 @@ if there is a blurb section you need to: comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = line.to!string; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "blurb"; @@ -870,7 +863,6 @@ if there is a blurb section you need to: comp_obj_para.typeinfo.is_a = "blurb"; comp_obj_para.text = munge.url_links(line.to!string.strip).replaceFirst(rgx.para_attribs, ""); comp_obj_para.node.ocn = 0; - comp_obj_para.node.object_number = ""; comp_obj_para.misc.object_number_off = ""; comp_obj_para.misc.object_number_type = 0; comp_obj_para.attrib.indent_hang = indent["hang_position"]; @@ -1281,26 +1273,25 @@ if ((obj_type_status["heading"] == State.on) = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; - comp_obj_para = comp_obj_para.init; - comp_obj_para.typeinfo.of_part = "body"; - comp_obj_para.typeinfo.of_section = "body"; - comp_obj_para.typeinfo.is_of = "para"; - comp_obj_para.typeinfo.is_a = "para"; - comp_obj_para.text = an_object["substantive"].to!string.strip; - comp_obj_para.node.ocn = obj_cite_digits.digit; - comp_obj_para.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_para.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_para.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_para.misc.object_number_type = obj_cite_digits.type; - comp_obj_para.attrib.indent_hang = indent["hang_position"]; - comp_obj_para.attrib.indent_base = indent["base_position"]; - comp_obj_para.attrib.bullet = bullet; - comp_obj_para.tags.anchor_tags = anchor_tags; - comp_obj_para.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; - comp_obj_para.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; - comp_obj_para.has.inline_links = substantive_obj_misc_tuple[sObj.links]; - comp_obj_para.has.contains_image_without_dimensions = substantive_obj_misc_tuple[sObj.image_no_dimensions]; - the_document_body_section ~= comp_obj_para; + comp_obj_para = comp_obj_para.init; + comp_obj_para.typeinfo.of_part = "body"; + comp_obj_para.typeinfo.of_section = "body"; + comp_obj_para.typeinfo.is_of = "para"; + comp_obj_para.typeinfo.is_a = "para"; + comp_obj_para.text = an_object["substantive"].to!string.strip; + comp_obj_para.node.ocn = obj_cite_digits.digit; + comp_obj_para.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_para.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_para.misc.object_number_type = obj_cite_digits.type; + comp_obj_para.attrib.indent_hang = indent["hang_position"]; + comp_obj_para.attrib.indent_base = indent["base_position"]; + comp_obj_para.attrib.bullet = bullet; + comp_obj_para.tags.anchor_tags = anchor_tags; + comp_obj_para.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; + comp_obj_para.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; + comp_obj_para.has.inline_links = substantive_obj_misc_tuple[sObj.links]; + comp_obj_para.has.contains_image_without_dimensions = substantive_obj_misc_tuple[sObj.image_no_dimensions]; + the_document_body_section ~= comp_obj_para; _common_reset_(line_occur, an_object, obj_type_status); indent=[ "hang_position" : 0, @@ -1413,7 +1404,6 @@ if (an_object["glossary_nugget"].length == 0) { comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "(skip) there is no Glossary section"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.node.marked_up_level = "B"; @@ -1452,7 +1442,6 @@ if (biblio_ordered.length > 0) { comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Bibliography"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "_part_bibliography"; @@ -1469,7 +1458,6 @@ if (biblio_ordered.length > 0) { comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Bibliography"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "bibliography"; @@ -1488,7 +1476,6 @@ if (biblio_ordered.length > 0) { comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "(skip) there is no Bibliography"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.node.marked_up_level = "B"; @@ -1527,7 +1514,6 @@ foreach (entry; biblio_ordered) { comp_obj_para.typeinfo.is_a = "bibliography"; comp_obj_para.text = out_.to!string.strip; comp_obj_para.node.ocn = 0; - comp_obj_para.node.object_number = ""; comp_obj_para.misc.object_number_off = ""; comp_obj_para.misc.object_number_type = 0; comp_obj_para.attrib.indent_hang = 0; @@ -1613,7 +1599,6 @@ if (an_object["blurb_nugget"].length == 0) { comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "(skip) there is no Blurb section"; comp_obj_heading_.node.ocn = 0; - comp_obj_para.node.object_number = ""; comp_obj_para.misc.object_number_off = ""; comp_obj_para.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = ""; @@ -1645,7 +1630,6 @@ comp_obj_toc.typeinfo.of_section = "toc"; comp_obj_toc.typeinfo.is_of = "para"; comp_obj_toc.typeinfo.is_a = "toc"; comp_obj_toc.node.ocn = 0; -comp_obj_toc.node.object_number = ""; comp_obj_toc.misc.object_number_off = ""; comp_obj_toc.misc.object_number_type = 0; comp_obj_toc.attrib.indent_hang = indent["hang_position"]; @@ -2002,7 +1986,6 @@ foreach (ref obj; the_document_head_section) { "Title OCN should be 1 not: " ~ obj.node.ocn.to!string); // bug introduced 0.18.1 +/ obj.node.ocn = 1; - obj.node.object_number = "1"; obj.misc.object_number_type = OCNtype.ocn; } /+ dom structure (marked up & collapsed) +/ @@ -2021,7 +2004,7 @@ foreach (ref obj; the_document_head_section) { } #+END_SRC -***** ↻ Loop section: toc +***** ↻ Loop section: toc [to] #+name: abs_post #+BEGIN_SRC d @@ -2082,7 +2065,7 @@ if (the_table_of_contents_section["scroll"].length > 1) { } #+END_SRC -***** ↻ Loop section: document body +***** ↻ Loop section: document body [bd] #+name: abs_post #+BEGIN_SRC d @@ -2126,7 +2109,7 @@ if (the_document_body_section.length > 1) { auto images=uniq(_images.sort()); #+END_SRC -***** ↻ Loop section: endnotes +***** ↻ Loop section: endnotes [en] - endnotes have their own number, (also use in node) and they belong to calling object @@ -2145,7 +2128,6 @@ if (the_endnotes_section.length > 1) { } obj_cite_digits = ocn_emit(OCNstatus.on); obj.node.ocn = obj_cite_digits.digit; - obj.node.object_number = obj_cite_digits.on.to!string; if (obj.node.heading_lev_markup <= 4) { segnames_0_4 ~= obj.tags.segment_anchor_tag; if (obj.node.heading_lev_markup == 4) { @@ -2174,7 +2156,7 @@ if (the_endnotes_section.length > 1) { } #+END_SRC -***** ↻ Loop section: glossary +***** ↻ Loop section: glossary [gl] - add glossary numbering, (also use in node) no need to show in text @@ -2189,7 +2171,6 @@ if (the_glossary_section.length > 1) { } obj_cite_digits = ocn_emit(OCNstatus.on); obj.node.ocn = obj_cite_digits.digit; - obj.node.object_number = obj_cite_digits.on.to!string; if (obj.node.heading_lev_markup <= 4) { segnames_0_4 ~= obj.tags.segment_anchor_tag; if (obj.node.heading_lev_markup == 4) { @@ -2216,13 +2197,12 @@ if (the_glossary_section.length > 1) { } else if (obj.typeinfo.is_a == "glossary") { obj_cite_digits = ocn_emit(OCNstatus.on); obj.node.ocn = obj_cite_digits.digit; - obj.node.object_number = obj_cite_digits.on.to!string; } } } #+END_SRC -***** ↻ Loop section: bibliography +***** ↻ Loop section: bibliography [bb] - add bibliography numbering, (also use in node) no need to show in text @@ -2237,7 +2217,6 @@ if (the_bibliography_section.length > 1) { } obj_cite_digits = ocn_emit(OCNstatus.on); obj.node.ocn = obj_cite_digits.digit; - obj.node.object_number = obj_cite_digits.on.to!string; // check if (obj.node.heading_lev_markup <= 4) { segnames_0_4 ~= obj.tags.segment_anchor_tag; if (obj.node.heading_lev_markup == 4) { @@ -2264,13 +2243,12 @@ if (the_bibliography_section.length > 1) { } else if (obj.typeinfo.is_a == "bibliography") { obj_cite_digits = ocn_emit(OCNstatus.on); obj.node.ocn = obj_cite_digits.on; - obj.node.object_number = obj_cite_digits.on.to!string; } } } #+END_SRC -***** ↻ Loop section: book index (scroll, seg) +***** ↻ Loop section: book index (scroll, seg) [bi] - add book index numbering?, (also use in node) no need to show in text @@ -2290,7 +2268,6 @@ if (the_bookindex_section["scroll"].length > 1) { } obj_cite_digits = ocn_emit(OCNstatus.on); obj.node.ocn = obj_cite_digits.on; - obj.node.object_number = obj_cite_digits.on.to!string; if (obj.node.heading_lev_markup <= 4) { segnames_0_4 ~= obj.tags.segment_anchor_tag; if (obj.node.heading_lev_markup == 4) { @@ -2315,10 +2292,10 @@ if (the_bookindex_section["scroll"].length > 1) { } obj = obj_heading_ancestors(obj, lv_ancestors_txt); } else if (obj.typeinfo.is_a == "bookindex") { - obj_cite_digits = ocn_emit(OCNstatus.bkidx); - obj.node.ocn = obj_cite_digits.digit; - obj.misc.object_number_bkidx = obj_cite_digits.bkidx.to!string; - obj.misc.object_number_type = OCNtype.bkidx; + obj_cite_digits = ocn_emit(OCNstatus.bkidx); + obj.node.ocn = obj_cite_digits.digit; + obj.misc.o_n_book_index = obj_cite_digits.bkidx; + obj.misc.object_number_type = OCNtype.bkidx; } } /+ seg +/ @@ -2330,7 +2307,6 @@ if (the_bookindex_section["scroll"].length > 1) { writeln(obj.text); } obj.node.ocn = ++ocn_; - obj.node.object_number = obj.node.ocn.to!string; if (obj.node.heading_lev_markup <= 4) { segnames_0_4 ~= obj.tags.segment_anchor_tag; if (obj.node.heading_lev_markup == 4) { @@ -2356,8 +2332,8 @@ if (the_bookindex_section["scroll"].length > 1) { obj = obj_heading_ancestors(obj, lv_ancestors_txt); } else if (obj.typeinfo.is_a == "bookindex") { ocn_bidx_ = ++ocn_bkidx_; - obj.misc.object_number_bkidx = ocn_bidx_.to!string; // FIX need to distinguish from regular ocn - obj.misc.object_number_type = OCNtype.bkidx; + obj.misc.o_n_book_index = ocn_bidx_; // FIX need to distinguish from regular ocn + obj.misc.object_number_type = OCNtype.bkidx; } } /+ TODO assert failure, reinstate @@ -2367,7 +2343,7 @@ if (the_bookindex_section["scroll"].length > 1) { } #+END_SRC -***** ↻ Loop section: blurb +***** ↻ Loop section: blurb [bl] #+name: abs_post #+BEGIN_SRC d @@ -2380,7 +2356,6 @@ if (the_blurb_section.length > 1) { } obj_cite_digits = ocn_emit(OCNstatus.on); obj.node.ocn = obj_cite_digits.on; - obj.node.object_number = obj_cite_digits.on.to!string; if (obj.node.heading_lev_markup <= 4) { segnames_0_4 ~= obj.tags.segment_anchor_tag; if (obj.node.heading_lev_markup == 4) { @@ -2429,7 +2404,6 @@ comp_obj_heading_.typeinfo.of_section = "empty"; comp_obj_heading_.typeinfo.is_of = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.node.ocn = 0; -comp_obj_para.node.object_number = ""; comp_obj_para.misc.object_number_off = ""; comp_obj_para.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = ""; @@ -3394,21 +3368,20 @@ void _poem_block_(L,O,T,C,N,CMM)( = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; - comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; - comp_obj_block.typeinfo.is_a = "verse"; - comp_obj_block.node.ocn = obj_cite_digits.on; - comp_obj_block.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_block.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_block.misc.object_number_type = obj_cite_digits.type; - comp_obj_block.text = an_object["substantive"]; - comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; - comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; - comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; - the_document_body_section ~= comp_obj_block; + comp_obj_block = comp_obj_block.init; + comp_obj_block.typeinfo.of_part = "body"; + comp_obj_block.typeinfo.of_section = "body"; + comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_a = "verse"; + comp_obj_block.node.ocn = obj_cite_digits.on; + comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_block.misc.object_number_type = obj_cite_digits.type; + comp_obj_block.text = an_object["substantive"]; + comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; + comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; + comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; + the_document_body_section ~= comp_obj_block; } object_reset(an_object); processing.remove("verse"); @@ -3452,21 +3425,20 @@ void _poem_block_(L,O,T,C,N,CMM)( = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; - comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; - comp_obj_block.typeinfo.is_a = "verse"; - comp_obj_block.node.ocn = obj_cite_digits.on; - comp_obj_block.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_block.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_block.misc.object_number_type = obj_cite_digits.type; - comp_obj_block.text = an_object["substantive"]; - comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; - comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; - comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; - the_document_body_section ~= comp_obj_block; + comp_obj_block = comp_obj_block.init; + comp_obj_block.typeinfo.of_part = "body"; + comp_obj_block.typeinfo.of_section = "body"; + comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_a = "verse"; + comp_obj_block.node.ocn = obj_cite_digits.on; + comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_block.misc.object_number_type = obj_cite_digits.type; + comp_obj_block.text = an_object["substantive"]; + comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; + comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; + comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; + the_document_body_section ~= comp_obj_block; object_reset(an_object); processing.remove("verse"); ++cntr; @@ -3495,22 +3467,21 @@ void _poem_block_(L,O,T,C,N,CMM)( = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; - comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; - comp_obj_block.typeinfo.is_a = "verse"; - comp_obj_block.node.ocn = obj_cite_digits.on; - comp_obj_block.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_block.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_block.misc.object_number_type = obj_cite_digits.type; - comp_obj_block.text = an_object["substantive"]; - comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; - comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; - comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; - the_document_body_section ~= comp_obj_block; - object_number_poem["end"] = obj_cite_digits.on.to!string; + comp_obj_block = comp_obj_block.init; + comp_obj_block.typeinfo.of_part = "body"; + comp_obj_block.typeinfo.of_section = "body"; + comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_a = "verse"; + comp_obj_block.node.ocn = obj_cite_digits.on; + comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_block.misc.object_number_type = obj_cite_digits.type; + comp_obj_block.text = an_object["substantive"]; + comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; + comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; + comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; + the_document_body_section ~= comp_obj_block; + object_number_poem["end"] = obj_cite_digits.on.to!string; object_reset(an_object); processing.remove("verse"); ++cntr; @@ -3553,21 +3524,20 @@ void _poem_block_(L,O,T,C,N,CMM)( = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; - comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; - comp_obj_block.typeinfo.is_a = "verse"; - comp_obj_block.node.ocn = obj_cite_digits.on; - comp_obj_block.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_block.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_block.misc.object_number_type = obj_cite_digits.type; - comp_obj_block.text = an_object["substantive"]; - comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; - comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; - comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; - the_document_body_section ~= comp_obj_block; + comp_obj_block = comp_obj_block.init; + comp_obj_block.typeinfo.of_part = "body"; + comp_obj_block.typeinfo.of_section = "body"; + comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_a = "verse"; + comp_obj_block.node.ocn = obj_cite_digits.on; + comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_block.misc.object_number_type = obj_cite_digits.type; + comp_obj_block.text = an_object["substantive"]; + comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; + comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; + comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; + the_document_body_section ~= comp_obj_block; object_reset(an_object); processing.remove("verse"); ++cntr; @@ -3696,15 +3666,14 @@ void _table_closed_make_special_notation_table_(N,CMM)( an_object["is"] = "table"; auto substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta); - an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; - comp_obj_block.node.ocn = obj_cite_digits.on; - comp_obj_block.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_block.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_block.misc.object_number_type = obj_cite_digits.type; - comp_obj_block = table_instructions(comp_obj_block, an_object["table_head"]); - comp_obj_block = table_substantive_munge_special(comp_obj_block, an_object["substantive"]); - the_document_body_section ~= comp_obj_block; + an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; + comp_obj_block.node.ocn = obj_cite_digits.on; + comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_block.misc.object_number_type = obj_cite_digits.type; + comp_obj_block = table_instructions(comp_obj_block, an_object["table_head"]); + comp_obj_block = table_substantive_munge_special(comp_obj_block, an_object["substantive"]); + the_document_body_section ~= comp_obj_block; object_reset(an_object); processing.remove("verse"); ++cntr; @@ -3770,23 +3739,22 @@ void _block_flag_line_empty_(B,N,CMM)( = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; - comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; - comp_obj_block.typeinfo.is_a = "quote"; - comp_obj_block.node.ocn = obj_cite_digits.on; - comp_obj_block.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_block.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_block.misc.object_number_type = obj_cite_digit_type; - comp_obj_block.text = an_object["substantive"]; - comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; - comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; - comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; - the_document_body_section ~= comp_obj_block; - obj_type_status["blocks"] = TriState.off; - obj_type_status["quote"] = TriState.off; + comp_obj_block = comp_obj_block.init; + comp_obj_block.typeinfo.of_part = "body"; + comp_obj_block.typeinfo.of_section = "body"; + comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_a = "quote"; + comp_obj_block.node.ocn = obj_cite_digits.on; + comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_block.misc.object_number_type = obj_cite_digit_type; + comp_obj_block.text = an_object["substantive"]; + comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; + comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; + comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; + the_document_body_section ~= comp_obj_block; + obj_type_status["blocks"] = TriState.off; + obj_type_status["quote"] = TriState.off; object_reset(an_object); processing.remove("verse"); ++cntr; @@ -3820,23 +3788,22 @@ void _block_flag_line_empty_(B,N,CMM)( = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; - comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; - comp_obj_block.typeinfo.is_a = "group"; - comp_obj_block.node.ocn = obj_cite_digits.on; - comp_obj_block.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_block.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_block.misc.object_number_type = obj_cite_digits.type; - comp_obj_block.text = an_object["substantive"]; - comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; - comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; - comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; - the_document_body_section ~= comp_obj_block; - obj_type_status["blocks"] = TriState.off; - obj_type_status["group"] = TriState.off; + comp_obj_block = comp_obj_block.init; + comp_obj_block.typeinfo.of_part = "body"; + comp_obj_block.typeinfo.of_section = "body"; + comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_a = "group"; + comp_obj_block.node.ocn = obj_cite_digits.on; + comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_block.misc.object_number_type = obj_cite_digits.type; + comp_obj_block.text = an_object["substantive"]; + comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; + comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; + comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; + the_document_body_section ~= comp_obj_block; + obj_type_status["blocks"] = TriState.off; + obj_type_status["group"] = TriState.off; object_reset(an_object); processing.remove("verse"); ++cntr; @@ -3868,24 +3835,23 @@ void _block_flag_line_empty_(B,N,CMM)( ); auto substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); - an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; - comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; - comp_obj_block.typeinfo.is_a = "block"; - comp_obj_block.node.ocn = obj_cite_digits.on; - comp_obj_block.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_block.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_block.misc.object_number_type = obj_cite_digit_type; - comp_obj_block.text = an_object["substantive"]; - comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; - comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; - comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; - the_document_body_section ~= comp_obj_block; - obj_type_status["blocks"] = TriState.off; - obj_type_status["block"] = TriState.off; + an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; + comp_obj_block = comp_obj_block.init; + comp_obj_block.typeinfo.of_part = "body"; + comp_obj_block.typeinfo.of_section = "body"; + comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_a = "block"; + comp_obj_block.node.ocn = obj_cite_digits.on; + comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_block.misc.object_number_type = obj_cite_digit_type; + comp_obj_block.text = an_object["substantive"]; + comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; + comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; + comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links]; + the_document_body_section ~= comp_obj_block; + obj_type_status["blocks"] = TriState.off; + obj_type_status["block"] = TriState.off; object_reset(an_object); processing.remove("verse"); ++cntr; @@ -3914,20 +3880,19 @@ void _block_flag_line_empty_(B,N,CMM)( heading_ptr-1, an_object["is"] ); - comp_obj_poem_ocn = comp_obj_poem_ocn.init; - comp_obj_poem_ocn.typeinfo.of_part = "body"; - comp_obj_poem_ocn.typeinfo.of_section = "body"; - comp_obj_poem_ocn.typeinfo.is_of = "block"; - comp_obj_poem_ocn.typeinfo.is_a = "poem"; - comp_obj_poem_ocn.node.ocn = obj_cite_digits.on; - comp_obj_poem_ocn.node.object_number = (object_number_poem["start"] ~ "..." ~ object_number_poem["end"]); - comp_obj_poem_ocn.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; // - comp_obj_poem_ocn.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; // - comp_obj_poem_ocn.misc.object_number_type = obj_cite_digits.type; - comp_obj_poem_ocn.text = ""; - the_document_body_section ~= comp_obj_poem_ocn; - obj_type_status["blocks"] = TriState.off; - obj_type_status["poem"] = TriState.off; + comp_obj_poem_ocn = comp_obj_poem_ocn.init; + comp_obj_poem_ocn.typeinfo.of_part = "body"; + comp_obj_poem_ocn.typeinfo.of_section = "body"; + comp_obj_poem_ocn.typeinfo.is_of = "block"; + comp_obj_poem_ocn.typeinfo.is_a = "poem"; + comp_obj_poem_ocn.node.ocn = obj_cite_digits.on; + comp_obj_poem_ocn.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; // + comp_obj_poem_ocn.misc.o_n_book_index = obj_cite_digits.bkidx; // + comp_obj_poem_ocn.misc.object_number_type = obj_cite_digits.type; + comp_obj_poem_ocn.text = ""; + the_document_body_section ~= comp_obj_poem_ocn; + obj_type_status["blocks"] = TriState.off; + obj_type_status["poem"] = TriState.off; object_reset(an_object); processing.remove("verse"); #+END_SRC @@ -3960,23 +3925,22 @@ void _block_flag_line_empty_(B,N,CMM)( = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; - comp_obj_code = comp_obj_code.init; - comp_obj_code.typeinfo.of_part = "body"; - comp_obj_code.typeinfo.of_section = "body"; - comp_obj_code.typeinfo.is_of = "block"; - comp_obj_code.typeinfo.is_a = "code"; - comp_obj_code.node.ocn = obj_cite_digits.on; - comp_obj_code.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_block.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_block.misc.object_number_type = obj_cite_digits.type; - comp_obj_code.text = an_object["substantive"]; - comp_obj_code.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; - comp_obj_code.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; - comp_obj_code.has.inline_links = substantive_obj_misc_tuple[sObj.links]; - the_document_body_section ~= comp_obj_code; - obj_type_status["blocks"] = TriState.off; - obj_type_status["code"] = TriState.off; + comp_obj_code = comp_obj_code.init; + comp_obj_code.typeinfo.of_part = "body"; + comp_obj_code.typeinfo.of_section = "body"; + comp_obj_code.typeinfo.is_of = "block"; + comp_obj_code.typeinfo.is_a = "code"; + comp_obj_code.node.ocn = obj_cite_digits.on; + comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_block.misc.object_number_type = obj_cite_digits.type; + comp_obj_code.text = an_object["substantive"]; + comp_obj_code.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; + comp_obj_code.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; + comp_obj_code.has.inline_links = substantive_obj_misc_tuple[sObj.links]; + the_document_body_section ~= comp_obj_code; + obj_type_status["blocks"] = TriState.off; + obj_type_status["code"] = TriState.off; object_reset(an_object); processing.remove("verse"); ++cntr; @@ -4009,18 +3973,17 @@ void _block_flag_line_empty_(B,N,CMM)( ); auto substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); - an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; - comp_obj_block = comp_obj_block.init; - comp_obj_block.node.ocn = obj_cite_digits.on; - comp_obj_block.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - comp_obj_block.misc.object_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; - comp_obj_block.misc.object_number_type = obj_cite_digits.type; - comp_obj_block = table_instructions(comp_obj_block, an_object["table_head"]); - comp_obj_block = table_substantive_munge(comp_obj_block, an_object["substantive"]); - the_document_body_section ~= comp_obj_block; - obj_type_status["blocks"] = TriState.off; - obj_type_status["table"] = TriState.off; + an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; + comp_obj_block = comp_obj_block.init; + comp_obj_block.node.ocn = obj_cite_digits.on; + comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.misc.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_block.misc.object_number_type = obj_cite_digits.type; + comp_obj_block = table_instructions(comp_obj_block, an_object["table_head"]); + comp_obj_block = table_substantive_munge(comp_obj_block, an_object["substantive"]); + the_document_body_section ~= comp_obj_block; + obj_type_status["blocks"] = TriState.off; + obj_type_status["table"] = TriState.off; object_reset(an_object); processing.remove("verse"); ++cntr; @@ -5446,7 +5409,6 @@ static struct ObjInlineMarkup { comp_obj_toc.typeinfo.is_of = "para"; comp_obj_toc.typeinfo.is_a = "toc"; comp_obj_toc.node.ocn = 0; - comp_obj_toc.node.object_number = ""; comp_obj_toc.misc.object_number_off = ""; comp_obj_toc.misc.object_number_type = 0; comp_obj_toc.attrib.indent_hang = indent["hang_position"]; @@ -5466,7 +5428,6 @@ static struct ObjInlineMarkup { comp_obj_toc.typeinfo.is_of = "para"; comp_obj_toc.typeinfo.is_a = "toc"; comp_obj_toc.node.ocn = 0; - comp_obj_toc.node.object_number = ""; comp_obj_toc.misc.object_number_off = ""; comp_obj_toc.misc.object_number_type = 0; comp_obj_toc.attrib.indent_hang = indent["hang_position"]; @@ -5482,7 +5443,6 @@ static struct ObjInlineMarkup { comp_obj_toc.typeinfo.is_of = "para"; comp_obj_toc.typeinfo.is_a = "toc"; comp_obj_toc.node.ocn = 0; - comp_obj_toc.node.object_number = ""; comp_obj_toc.misc.object_number_off = ""; comp_obj_toc.misc.object_number_type = 0; comp_obj_toc.attrib.bullet = false; @@ -6337,7 +6297,6 @@ struct BookIndexReportSection { comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Book Index"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "_part_book_index"; @@ -6357,7 +6316,6 @@ struct BookIndexReportSection { comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Index"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "bookindex"; @@ -6435,7 +6393,6 @@ struct BookIndexReportSection { comp_obj_para.typeinfo.is_a = "bookindex"; comp_obj_para.text = bi_tmp_scroll.to!string.strip; comp_obj_para.node.ocn = 0; - comp_obj_para.node.object_number = ""; comp_obj_para.misc.object_number_off = ""; comp_obj_para.misc.object_number_type = 0; comp_obj_para.tags.anchor_tags = bi_tmp_tags; @@ -6452,7 +6409,6 @@ struct BookIndexReportSection { comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.text = "(skip) there is no Book Index"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.node.marked_up_level = "B"; @@ -6596,7 +6552,6 @@ struct NotesSection { comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Endnotes"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "_part_endnotes"; @@ -6614,7 +6569,6 @@ struct NotesSection { comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Endnotes"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.tags.segment_anchor_tag = "endnotes"; @@ -6634,7 +6588,6 @@ struct NotesSection { comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "(skip) there are no Endnotes"; comp_obj_heading_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_heading_.node.marked_up_level = "B"; @@ -6652,7 +6605,6 @@ struct NotesSection { comp_obj_endnote_.typeinfo.is_of = "para"; comp_obj_endnote_.typeinfo.is_a = "endnote"; comp_obj_endnote_.node.ocn = 0; - comp_obj_heading_.node.object_number = ""; comp_obj_heading_.misc.object_number_off = ""; comp_obj_heading_.misc.object_number_type = 0; comp_obj_endnote_.attrib.indent_hang = 0; @@ -7026,29 +6978,28 @@ struct NodeStructureMetadata { break; } ObjGenericComposite _comp_obj_heading_; - _comp_obj_heading_ = _comp_obj_heading_.init; - _comp_obj_heading_.typeinfo.of_part = "body"; - _comp_obj_heading_.typeinfo.of_section = "body"; - _comp_obj_heading_.typeinfo.is_of = "para"; - _comp_obj_heading_.typeinfo.is_a = "heading"; - _comp_obj_heading_.text = _text.to!string.strip; - _comp_obj_heading_.node.ocn = obj_cite_digits.on; - _comp_obj_heading_.node.object_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string; - _comp_obj_heading_.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - _comp_obj_heading_.misc.object_number_type = obj_cite_digits.type; - _comp_obj_heading_.tags.segment_anchor_tag = segment_anchor_tag.to!string; - _comp_obj_heading_.node.marked_up_level = lev; - _comp_obj_heading_.node.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0); - _comp_obj_heading_.node.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0); - _comp_obj_heading_.node.parent_ocn = p_["object_number"]; - _comp_obj_heading_.node.parent_lev_markup = p_["lev_markup_number"]; - _comp_obj_heading_.tags.heading_ancestors_text = lv_ancestors_txt; - _comp_obj_heading_.ptr.doc_object = cntr_; - _comp_obj_heading_.ptr.html_segnames = ((lev_markup_number == "4") ? html_segnames_ptr : 0); - _comp_obj_heading_.ptr.heading = ptr_; - _comp_obj_heading_.has.inline_notes_reg = flag_notes_reg; - _comp_obj_heading_.has.inline_notes_star = flag_notes_star; - _comp_obj_heading_.has.inline_links = flag_links; + _comp_obj_heading_ = _comp_obj_heading_.init; + _comp_obj_heading_.typeinfo.of_part = "body"; + _comp_obj_heading_.typeinfo.of_section = "body"; + _comp_obj_heading_.typeinfo.is_of = "para"; + _comp_obj_heading_.typeinfo.is_a = "heading"; + _comp_obj_heading_.text = _text.to!string.strip; + _comp_obj_heading_.node.ocn = obj_cite_digits.on; + _comp_obj_heading_.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + _comp_obj_heading_.misc.object_number_type = obj_cite_digits.type; + _comp_obj_heading_.tags.segment_anchor_tag = segment_anchor_tag.to!string; + _comp_obj_heading_.node.marked_up_level = lev; + _comp_obj_heading_.node.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0); + _comp_obj_heading_.node.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0); + _comp_obj_heading_.node.parent_ocn = p_["object_number"]; + _comp_obj_heading_.node.parent_lev_markup = p_["lev_markup_number"]; + _comp_obj_heading_.tags.heading_ancestors_text = lv_ancestors_txt; + _comp_obj_heading_.ptr.doc_object = cntr_; + _comp_obj_heading_.ptr.html_segnames = ((lev_markup_number == "4") ? html_segnames_ptr : 0); + _comp_obj_heading_.ptr.heading = ptr_; + _comp_obj_heading_.has.inline_notes_reg = flag_notes_reg; + _comp_obj_heading_.has.inline_notes_star = flag_notes_star; + _comp_obj_heading_.has.inline_links = flag_links; debug(node) { if (lev_markup_number.match(rgx.levels_numbered_headings)) { writeln("* ", _node.to!string); @@ -7361,32 +7312,51 @@ template ObjectSetter() { #+END_SRC ** 1. initialize structs :struct: +*** heading attribute + +#+BEGIN_SRC d +struct HeadingAttrib { + string lev = "9"; + int heading_lev_markup = 9; + int heading_lev_collapsed = 9; + int[] closes_lev_collapsed = []; + int[] closes_lev_markup = []; + int array_ptr = 0; + int heading_array_ptr_segments = 0; +} +#+END_SRC + *** [#A] _composite object_ #+name: meta_structs_init #+BEGIN_SRC d -struct DocObj_TypeInfo_ { +struct DocObj_TypeInfo_ { // typeinfo string of_part = ""; // frontmatter, body, backmatter string of_section = ""; // toc, body, glossary, biography, book index, blurb string is_of = ""; // para, block ? string is_a = ""; // heading, para, table, code block, group, ... } -struct DocObj_TxtAttrib_ { +struct DocObj_TxtAttrib_ { // attrib int indent_base = 0; int indent_hang = 0; bool bullet = false; string language = ""; // not implemented, consider } -struct DocObj_Has_ { +struct DocObj_Has_ { // has bool inline_links = false; bool inline_notes_reg = false; bool inline_notes_star = false; bool contains_image_without_dimensions = false; } -struct DocObj_Node_ { +struct DocObj_Node_ { // node string[string][string] node; - int ocn = 0; // duplicated as string with object_number - string object_number = ""; // duplicated as int with ocn may apply additional info for backmatter (glossary, biblio etc.) + int ocn = 0; + string object_number() const @property { + return (ocn==0) + ? "" + : ocn.to!string; + } + string ocn_type = ""; // code duplicated typeinfo is_a string marked_up_level = "9"; int heading_lev_markup = 9; int heading_lev_collapsed = 9; @@ -7397,22 +7367,22 @@ struct DocObj_Node_ { int parent_ocn = 0; int[] ancestors = []; } -struct DocObj_Table_ { +struct DocObj_Table_ { // table int number_of_columns = 0; double[] column_widths = []; string[] column_aligns = []; bool heading = false; bool walls = false; // not implemented } -struct DocObj_CodeBlock_ { +struct DocObj_CodeBlock_ { // code_block string syntax = ""; } -struct DocObj_Pointer_ { +struct DocObj_Pointer_ { // ptr int doc_object = 0; int html_segnames = 0; int heading = 0; } -struct DocObj_Tags_ { +struct DocObj_Tags_ { // tags string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ]; string segment_anchor_tag = ""; string segname_prev = ""; @@ -7420,10 +7390,46 @@ struct DocObj_Tags_ { string[] lev4_subtoc = []; string[] anchor_tags = []; } -struct DocObj_Misc_ { - string object_number_bkidx = ""; - string object_number_off = ""; - int object_number_type = 0; // { ocn, non, bkidx } +struct DocObj_Misc_ { // misc + int o_n_substantive = 0; + int o_n_non_substantive = 0; + int o_n_glossary = 0; + int o_n_bibliography = 0; + int o_n_book_index = 0; + int o_n_blurb = 0; + string object_number_substantive() const @property { + return (o_n_substantive==0) + ? "" + : o_n_substantive.to!string; + } + string object_number_non_substantive() const @property { + return (o_n_non_substantive==0) + ? "" + : o_n_non_substantive.to!string; + } + string object_number_glossary() const @property { + return (o_n_glossary==0) + ? "" + : o_n_glossary.to!string; + } + string object_number_bibliography() const @property { + return (o_n_bibliography==0) + ? "" + : o_n_bibliography.to!string; + } + string object_number_book_index() const @property { + return (o_n_book_index==0) + ? "" + : o_n_book_index.to!string; + } + string object_number_blurb() const @property { + return (o_n_blurb==0) + ? "" + : o_n_blurb.to!string; + } + string object_number_off = ""; + bool visible_object_number = false; + int object_number_type = 0; // { ocn, non, bkidx } } struct ObjGenericComposite { string text = ""; diff --git a/org/output_xmls.org b/org/output_xmls.org index db81b28..58f251a 100644 --- a/org/output_xmls.org +++ b/org/output_xmls.org @@ -1929,7 +1929,7 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> #+name: output_epub3_constructs #+BEGIN_SRC d -string epub3_oebps_content(D,I,P)(D doc_abstraction, I doc_matters, P parts) { +string epub3_oebps_content(D,M,P)(D doc_abstraction, M doc_matters, P parts) { auto xhtml_format = outputXHTMLs(); auto pth_epub3 = SiSUpathsEPUB!()(doc_matters.output_path, doc_matters.src.language); string uuid = "18275d951861c77f78acd05672c9906924c59f18a2e0ba06dad95959693e9bd8"; // TODO sort uuid in doc_matters! diff --git a/org/sdp.org b/org/sdp.org index ac80370..4144630 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -971,7 +971,7 @@ auto markup = InlineMarkup(); string[string] check = [ "last_object_number" : "NA [debug \"checkdoc\" not run]", "last_object_number_body" : "0", - "last_object_number_bkidx" : "0", + "last_object_number_book_index" : "0", ]; foreach (k; doc_matters.xml.keys_seq.seg) { foreach (obj; doc_abstraction[k]) { @@ -986,7 +986,7 @@ foreach (k; doc_matters.xml.keys_seq.seg) { } if (k == "bookindex_seg") { if (obj.misc.object_number_type == 2) { - check["last_object_number_bkidx"] = obj.misc.object_number_bkidx; + check["last_object_number_book_index"] = obj.misc.object_number_book_index; } } } @@ -1036,7 +1036,7 @@ writefln( ? (to!int(doc_abstraction["bookindex_seg"].length)) : 0, " last book idx ocn:", - to!int(check["last_object_number_bkidx"]), + to!int(check["last_object_number_book_index"]), "length blurb:", (doc_abstraction["blurb"].length > 1) ? (to!int(doc_abstraction["blurb"].length)) -- cgit v1.2.3