aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/meta_abstraction.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/meta_abstraction.org')
-rw-r--r--org/meta_abstraction.org1938
1 files changed, 973 insertions, 965 deletions
diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org
index f74c8d6..b1c08ad 100644
--- a/org/meta_abstraction.org
+++ b/org/meta_abstraction.org
@@ -247,7 +247,7 @@ pure auto obj_heading_ancestors(O)(
O obj,
string[] lv_ancestors_txt,
) {
- switch (obj.heading_lev_markup) {
+ switch (obj.node.heading_lev_markup) {
case 0:
lv_ancestors_txt[0] = obj.text.to!string;
foreach(k; 1..8) {
@@ -292,7 +292,7 @@ pure auto obj_heading_ancestors(O)(
lv_ancestors_txt[7] = obj.text.to!string;
goto default;
default:
- obj.heading_ancestors_text = lv_ancestors_txt.dup;
+ obj.tags.heading_ancestors_text = lv_ancestors_txt.dup;
}
return obj;
}
@@ -343,7 +343,7 @@ pure auto obj_dom_structure_set_markup_tags(O)(
debug(dom_magic_numbers) {
writeln("marked up: ", lev, ": ", dom);
}
- obj.dom_markedup = dom.dup;
+ obj.node.dom_markedup = dom.dup;
return obj;
}
#+END_SRC
@@ -393,7 +393,7 @@ pure auto obj_dom_set_collapsed_tags(O)(
debug(dom_magic_numbers) {
writeln("collapsed: ", lev, ": ", dom);
}
- obj.dom_collapsed = dom.dup;
+ obj.node.dom_collapsed = dom.dup;
return obj;
}
#+END_SRC
@@ -500,29 +500,29 @@ auto heading_match_rgx = [
];
string _anchor_tag;
string toc_txt_;
-an_object["glossary_nugget"] = "";
-an_object["blurb_nugget"] = "";
-comp_obj_heading_ = comp_obj_heading_.init;
-comp_obj_heading_.of_part = "frontmatter";
-comp_obj_heading_.of_section = "toc";
-comp_obj_heading_.is_of = "para";
-comp_obj_heading_.is_a = "heading";
-comp_obj_heading_.text = "Table of Contents";
-comp_obj_heading_.ocn = 0;
-comp_obj_heading_.obj_cite_number = "";
-comp_obj_heading_.obj_cite_number_off = "";
-comp_obj_heading_.obj_cite_number_type = 0;
-comp_obj_heading_.segment_anchor_tag = "toc";
-comp_obj_heading_.marked_up_level = "1";
-comp_obj_heading_.heading_lev_markup = 4;
-comp_obj_heading_.heading_lev_collapsed = 1;
-comp_obj_heading_.parent_ocn = 1;
-comp_obj_heading_.parent_lev_markup = 0;
-comp_obj_heading_.ptr_html_segnames = html_segnames_ptr;
-comp_obj_heading_.anchor_tags = ["toc"];
-comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
-comp_obj_heading_.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
-auto toc_head = comp_obj_heading_;
+an_object["glossary_nugget"] = "";
+an_object["blurb_nugget"] = "";
+comp_obj_heading_ = comp_obj_heading_.init;
+comp_obj_heading_.typeinfo.of_part = "frontmatter";
+comp_obj_heading_.typeinfo.of_section = "toc";
+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.obj_cite_number = "";
+comp_obj_heading_.misc.obj_cite_number_off = "";
+comp_obj_heading_.misc.obj_cite_number_type = 0;
+comp_obj_heading_.tags.segment_anchor_tag = "toc";
+comp_obj_heading_.node.marked_up_level = "1";
+comp_obj_heading_.node.heading_lev_markup = 4;
+comp_obj_heading_.node.heading_lev_collapsed = 1;
+comp_obj_heading_.node.parent_ocn = 1;
+comp_obj_heading_.node.parent_lev_markup = 0;
+comp_obj_heading_.ptr.html_segnames = html_segnames_ptr;
+comp_obj_heading_.tags.anchor_tags = ["toc"];
+comp_obj_heading_.node.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
+comp_obj_heading_.node.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
+auto toc_head = comp_obj_heading_;
html_segnames_ptr_cntr++;
the_table_of_contents_section = [
"seg": [toc_head],
@@ -679,60 +679,60 @@ if there is a glossary section you need to:
line_occur["para"] = State.off;
an_object_key="glossary_nugget"; //
if (line.matchFirst(rgx.heading_glossary)) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "glossary";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Glossary";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_glossary";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
- comp_obj_heading_.dom_collapsed = [ 1, 1, 0, 0, 0, 0, 0, 0];
- the_glossary_section ~= comp_obj_heading_;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "glossary";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Glossary";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "glossary";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
- comp_obj_heading_.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
- comp_obj_heading_.anchor_tags = ["glossary"];
- the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "glossary";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Glossary";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "_part_glossary";
+ comp_obj_heading_.node.marked_up_level = "B";
+ comp_obj_heading_.node.heading_lev_markup = 1;
+ comp_obj_heading_.node.heading_lev_collapsed = 1;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ comp_obj_heading_.node.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
+ comp_obj_heading_.node.dom_collapsed = [ 1, 1, 0, 0, 0, 0, 0, 0];
+ the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "glossary";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Glossary";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "glossary";
+ comp_obj_heading_.node.marked_up_level = "1";
+ comp_obj_heading_.node.heading_lev_markup = 4;
+ comp_obj_heading_.node.heading_lev_collapsed = 2;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ comp_obj_heading_.node.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
+ comp_obj_heading_.node.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
+ comp_obj_heading_.tags.anchor_tags = ["glossary"];
+ the_glossary_section ~= comp_obj_heading_;
} else {
_para_match_(line, an_object, an_object_key, indent, bullet, obj_type_status, line_occur);
comp_obj_para = comp_obj_para.init;
- comp_obj_para.of_part = "backmatter";
- comp_obj_para.of_section = "glossary";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "glossary";
+ comp_obj_para.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "glossary";
+ comp_obj_para.typeinfo.is_of = "para";
+ comp_obj_para.typeinfo.is_a = "glossary";
comp_obj_para.text = line.to!string.strip;
- comp_obj_para.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.indent_hang = indent["hang_position"];
- comp_obj_para.indent_base = indent["base_position"];
- comp_obj_para.bullet = bullet;
+ comp_obj_para.node.ocn = 0;
+ comp_obj_para.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_number_type = 0;
+ comp_obj_para.attrib.indent_hang = indent["hang_position"];
+ comp_obj_para.attrib.indent_base = indent["base_position"];
+ comp_obj_para.attrib.bullet = bullet;
the_glossary_section ~= comp_obj_para;
}
obj_type_status["ocn_status"] = OCNstatus.on;
@@ -803,80 +803,80 @@ if there is a blurb section you need to:
line_occur["para"] = State.off;
an_object_key="blurb_nugget";
if (line.matchFirst(rgx.heading_blurb)) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "blurb";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Blurb";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_blurb";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
- comp_obj_heading_.dom_collapsed = [ 1, 1, 0, 0, 0, 0, 0, 0];
- the_blurb_section ~= comp_obj_heading_;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "blurb";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Blurb";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "blurb";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.anchor_tags = ["blurb"];
- comp_obj_heading_.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
- comp_obj_heading_.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
- the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "blurb";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Blurb";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "_part_blurb";
+ comp_obj_heading_.node.marked_up_level = "B";
+ comp_obj_heading_.node.heading_lev_markup = 1;
+ comp_obj_heading_.node.heading_lev_collapsed = 1;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ comp_obj_heading_.node.dom_markedup = [ 1, 1, 0, 0, 0, 0, 0, 0];
+ comp_obj_heading_.node.dom_collapsed = [ 1, 1, 0, 0, 0, 0, 0, 0];
+ the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "blurb";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Blurb";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "blurb";
+ comp_obj_heading_.node.marked_up_level = "1";
+ comp_obj_heading_.node.heading_lev_markup = 4;
+ comp_obj_heading_.node.heading_lev_collapsed = 2;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ comp_obj_heading_.tags.anchor_tags = ["blurb"];
+ comp_obj_heading_.node.dom_markedup = [ 1, 1, 0, 0, 1, 0, 0, 0];
+ comp_obj_heading_.node.dom_collapsed = [ 1, 1, 1, 0, 0, 0, 0, 0];
+ the_blurb_section ~= comp_obj_heading_;
} else if (line.matchFirst(rgx.heading)
&& (opt_action.backmatter && opt_action.section_blurb)) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "blurb";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = line.to!string;
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "blurb";
- comp_obj_heading_.marked_up_level = an_object["lev"].to!string;
- comp_obj_heading_.heading_lev_markup = an_object["lev_markup_number"].to!int; // make int, remove need to conv
- comp_obj_heading_.heading_lev_collapsed = an_object["lev_collapsed_number"].to!int; // make int, remove need to conv
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "blurb";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = line.to!string;
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "blurb";
+ comp_obj_heading_.node.marked_up_level = an_object["lev"].to!string;
+ comp_obj_heading_.node.heading_lev_markup = an_object["lev_markup_number"].to!int; // make int, remove need to conv
+ comp_obj_heading_.node.heading_lev_collapsed = an_object["lev_collapsed_number"].to!int; // make int, remove need to conv
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ the_blurb_section ~= comp_obj_heading_;
} else {
_para_match_(line, an_object, an_object_key, indent, bullet, obj_type_status, line_occur);
comp_obj_para = comp_obj_para.init;
- comp_obj_para.of_part = "backmatter";
- comp_obj_para.of_section = "blurb";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "blurb";
+ comp_obj_para.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "blurb";
+ comp_obj_para.typeinfo.is_of = "para";
+ 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.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.indent_hang = indent["hang_position"];
- comp_obj_para.indent_base = indent["base_position"];
- comp_obj_para.inline_links = true;
- comp_obj_para.bullet = bullet;
+ comp_obj_para.node.ocn = 0;
+ comp_obj_para.node.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_number_type = 0;
+ comp_obj_para.attrib.indent_hang = indent["hang_position"];
+ comp_obj_para.attrib.indent_base = indent["base_position"];
+ comp_obj_para.has.inline_links = true;
+ comp_obj_para.attrib.bullet = bullet;
the_blurb_section ~= comp_obj_para;
}
obj_type_status["ocn_status"] = OCNstatus.on;
@@ -1037,14 +1037,14 @@ if (line.matchFirst(rgx.book_index)
debug(comment) {
writeln(line);
}
- an_object[an_object_key] ~= line ~= "\n";
- comp_obj_comment = comp_obj_comment.init;
- comp_obj_comment.of_part = "comment"; // breaks flow
- comp_obj_comment.of_section = "comment"; // breaks flow
- comp_obj_comment.is_of = "comment";
- comp_obj_comment.is_a = "comment";
- comp_obj_comment.text = an_object[an_object_key].strip;
- the_document_body_section ~= comp_obj_comment;
+ an_object[an_object_key] ~= line ~= "\n";
+ comp_obj_comment = comp_obj_comment.init;
+ comp_obj_comment.typeinfo.of_part = "comment"; // breaks flow
+ comp_obj_comment.typeinfo.of_section = "comment"; // breaks flow
+ comp_obj_comment.typeinfo.is_of = "comment";
+ comp_obj_comment.typeinfo.is_a = "comment";
+ comp_obj_comment.text = an_object[an_object_key].strip;
+ the_document_body_section ~= comp_obj_comment;
_common_reset_(line_occur, an_object, obj_type_status);
processing.remove("verse");
++cntr;
@@ -1281,26 +1281,26 @@ 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.of_part = "body";
- comp_obj_para.of_section = "body";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "para";
- comp_obj_para.text = an_object["substantive"].to!string.strip;
- comp_obj_para.ocn = obj_cite_digits.digit;
- comp_obj_para.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_para.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_para.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_para.obj_cite_number_type = obj_cite_digits.type;
- comp_obj_para.indent_hang = indent["hang_position"];
- comp_obj_para.indent_base = indent["base_position"];
- comp_obj_para.bullet = bullet;
- comp_obj_para.anchor_tags = anchor_tags;
- comp_obj_para.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_para.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_para.inline_links = substantive_obj_misc_tuple[sObj.links];
- comp_obj_para.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.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_para.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_para.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_para.misc.obj_cite_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,
@@ -1320,23 +1320,23 @@ if ((obj_type_status["heading"] == State.on)
#+BEGIN_SRC d
/+ unless (the_document_body_section.length == 0) ? +/
if (the_document_body_section.length > 0) {
- if (((the_document_body_section[$-1].is_a == "para")
- || (the_document_body_section[$-1].is_a == "heading")
- || (the_document_body_section[$-1].is_a == "quote")
- || (the_document_body_section[$-1].is_a == "group")
- || (the_document_body_section[$-1].is_a == "block")
- || (the_document_body_section[$-1].is_a == "verse"))
+ if (((the_document_body_section[$-1].typeinfo.is_a == "para")
+ || (the_document_body_section[$-1].typeinfo.is_a == "heading")
+ || (the_document_body_section[$-1].typeinfo.is_a == "quote")
+ || (the_document_body_section[$-1].typeinfo.is_a == "group")
+ || (the_document_body_section[$-1].typeinfo.is_a == "block")
+ || (the_document_body_section[$-1].typeinfo.is_a == "verse"))
&& (the_document_body_section.length > previous_length)) {
- if ((the_document_body_section[$-1].is_a == "heading")
- && (the_document_body_section[$-1].heading_lev_markup < 5)) {
+ if ((the_document_body_section[$-1].typeinfo.is_a == "heading")
+ && (the_document_body_section[$-1].node.heading_lev_markup < 5)) {
obj_type_status["biblio_section"] = State.off;
obj_type_status["glossary_section"] = State.off;
obj_type_status["blurb_section"] = State.off;
}
- if (the_document_body_section[$-1].is_a == "verse") {
+ if (the_document_body_section[$-1].typeinfo.is_a == "verse") {
/+ scan for endnotes for whole poem (each verse in poem) +/
foreach (i; previous_length .. the_document_body_section.length) {
- if (the_document_body_section[i].is_a == "verse") {
+ if (the_document_body_section[i].typeinfo.is_a == "verse") {
if ((the_document_body_section[i].text).match(
rgx.inline_notes_delimiter_al_regular_number_note
)) {
@@ -1406,22 +1406,22 @@ debug(endnotes) {
#+name: abs_post
#+BEGIN_SRC d
if (an_object["glossary_nugget"].length == 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Glossary section";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_glossary_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ 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.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.node.marked_up_level = "B";
+ comp_obj_heading_.node.heading_lev_markup = 1;
+ comp_obj_heading_.node.heading_lev_collapsed = 1;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ the_glossary_section ~= comp_obj_heading_;
} else {
writeln("gloss");
}
@@ -1445,58 +1445,58 @@ auto biblio_ordered
#+name: abs_post
#+BEGIN_SRC d
if (biblio_ordered.length > 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bibliography";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Bibliography";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_bibliography";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_bibliography_section ~= comp_obj_heading_;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bibliography";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Bibliography";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "bibliography";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.anchor_tags = ["bibliography"];
- the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bibliography";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Bibliography";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "_part_bibliography";
+ comp_obj_heading_.node.marked_up_level = "B";
+ comp_obj_heading_.node.heading_lev_markup = 1;
+ comp_obj_heading_.node.heading_lev_collapsed = 1;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bibliography";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Bibliography";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "bibliography";
+ comp_obj_heading_.node.marked_up_level = "1";
+ comp_obj_heading_.node.heading_lev_markup = 4;
+ comp_obj_heading_.node.heading_lev_collapsed = 2;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ comp_obj_heading_.tags.anchor_tags = ["bibliography"];
+ the_bibliography_section ~= comp_obj_heading_;
} else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Bibliography";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_bibliography_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ 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.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.node.marked_up_level = "B";
+ comp_obj_heading_.node.heading_lev_markup = 1;
+ comp_obj_heading_.node.heading_lev_collapsed = 1;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ the_bibliography_section ~= comp_obj_heading_;
}
#+END_SRC
@@ -1520,21 +1520,21 @@ foreach (entry; biblio_ordered) {
((entry["place"].str.empty) ? "" : ", " ~ entry["place"].str),
((entry["url"].str.empty) ? "" : ", [" ~ entry["url"].str ~ "]"),
);
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.of_part = "backmatter";
- comp_obj_para.of_section = "bibliography";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "bibliography";
- comp_obj_para.text = out_.to!string.strip;
- comp_obj_para.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.indent_hang = 0;
- comp_obj_para.indent_base = 1;
- comp_obj_para.bullet = bullet;
- comp_obj_para.anchor_tags = anchor_tags;
- the_bibliography_section ~= comp_obj_para;
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "bibliography";
+ comp_obj_para.typeinfo.is_of = "para";
+ 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.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_number_type = 0;
+ comp_obj_para.attrib.indent_hang = 0;
+ comp_obj_para.attrib.indent_base = 1;
+ comp_obj_para.attrib.bullet = bullet;
+ comp_obj_para.tags.anchor_tags = anchor_tags;
+ the_bibliography_section ~= comp_obj_para;
}
#+END_SRC
@@ -1606,23 +1606,23 @@ debug(bookindex) {
#+name: abs_post
#+BEGIN_SRC d
if (an_object["blurb_nugget"].length == 0) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there is no Blurb section";
- comp_obj_heading_.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_blurb_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ 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.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "";
+ comp_obj_heading_.node.marked_up_level = "B";
+ comp_obj_heading_.node.heading_lev_markup = 1;
+ comp_obj_heading_.node.heading_lev_collapsed = 1;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ the_blurb_section ~= comp_obj_heading_;
}
debug(blurb) {
foreach (blurb; the_blurb_section) {
@@ -1639,18 +1639,18 @@ indent=[
"hang_position" : 1,
"base_position" : 1,
];
-comp_obj_toc = comp_obj_toc.init;
-comp_obj_toc.of_part = "frontmatter";
-comp_obj_toc.of_section = "toc";
-comp_obj_toc.is_of = "para";
-comp_obj_toc.is_a = "toc";
-comp_obj_toc.ocn = 0;
-comp_obj_toc.obj_cite_number = "";
-comp_obj_toc.obj_cite_number_off = "";
-comp_obj_toc.obj_cite_number_type = 0;
-comp_obj_toc.indent_hang = indent["hang_position"];
-comp_obj_toc.indent_base = indent["base_position"];
-comp_obj_toc.bullet = false;
+comp_obj_toc = comp_obj_toc.init;
+comp_obj_toc.typeinfo.of_part = "frontmatter";
+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.obj_cite_number = "";
+comp_obj_toc.misc.obj_cite_number_off = "";
+comp_obj_toc.misc.obj_cite_number_type = 0;
+comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+comp_obj_toc.attrib.indent_base = indent["base_position"];
+comp_obj_toc.attrib.bullet = false;
if (the_endnotes_section.length > 1) {
toc_txt_ = format(
"{ %s }%s%s%s",
@@ -1661,7 +1661,7 @@ if (the_endnotes_section.length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
}
if (the_glossary_section.length > 1) {
@@ -1674,7 +1674,7 @@ if (the_glossary_section.length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
toc_txt_ = format(
"{ %s }#%s",
@@ -1683,7 +1683,7 @@ if (the_glossary_section.length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
if (the_bibliography_section.length > 1){
@@ -1696,7 +1696,7 @@ if (the_bibliography_section.length > 1){
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
toc_txt_ = format(
@@ -1706,7 +1706,7 @@ if (the_bibliography_section.length > 1){
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
if (the_bookindex_section["seg"].length > 1) {
@@ -1719,7 +1719,7 @@ if (the_bookindex_section["seg"].length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
}
if (the_bookindex_section["scroll"].length > 1) {
@@ -1730,7 +1730,7 @@ if (the_bookindex_section["scroll"].length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
if (the_blurb_section.length > 1) {
@@ -1743,7 +1743,7 @@ if (the_blurb_section.length > 1) {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
toc_txt_ = format(
"{ %s }#%s",
@@ -1751,7 +1751,7 @@ if (the_blurb_section.length > 1) {
"blurb", // _anchor_tag
);
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
comp_obj_toc.text = toc_txt_.to!string.strip;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
@@ -1762,7 +1762,7 @@ debug(toc) {
the_table_of_contents_section["seg"].length
);
foreach (toc_linked_heading; the_table_of_contents_section["seg"]) {
- writeln(mkup.indent_by_spaces_provided(toc_linked_heading.indent_hang), toc_linked_heading.text);
+ writeln(mkup.indent_by_spaces_provided(toc_linked_heading.attrib.indent_hang), toc_linked_heading.text);
}
}
debug(tocscroll) {
@@ -1772,7 +1772,7 @@ debug(tocscroll) {
the_table_of_contents_section["seg"].length
);
foreach (toc_linked_heading; the_table_of_contents_section["scroll"]) {
- writeln(mkup.indent_by_spaces_provided(toc_linked_heading.indent_hang), toc_linked_heading.text);
+ writeln(mkup.indent_by_spaces_provided(toc_linked_heading.attrib.indent_hang), toc_linked_heading.text);
}
}
#+END_SRC
@@ -1808,8 +1808,8 @@ if (the_endnotes_section.length > 1) {
html_segnames ~= "endnotes";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_endnotes_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1825,8 +1825,8 @@ if (the_glossary_section.length > 1) {
html_segnames ~= "glossary";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_glossary_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1842,8 +1842,8 @@ if (the_bibliography_section.length > 1) {
html_segnames ~= "bibliography";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_bibliography_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1859,14 +1859,14 @@ if (the_bookindex_section["scroll"].length > 1) {
html_segnames ~= "bookindex";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_bookindex_section["scroll"]) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
foreach (ref section; the_bookindex_section["seg"]) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1882,8 +1882,8 @@ if (the_blurb_section.length > 1) {
html_segnames ~= "blurb";
html_segnames_ptr = html_segnames_ptr_cntr;
foreach (ref section; the_blurb_section) {
- if (section.heading_lev_markup == 4) {
- section.ptr_html_segnames = html_segnames_ptr;
+ if (section.node.heading_lev_markup == 4) {
+ section.ptr.html_segnames = html_segnames_ptr;
break;
}
}
@@ -1949,7 +1949,7 @@ string[] segnames_0_4;
#+name: abs_post
#+BEGIN_SRC d
auto _image_dimensions(M,O)(M manifest_matter, O obj) {
- if (obj.contains_image_without_dimensions) {
+ if (obj.has.contains_image_without_dimensions) {
import std.math;
import imageformats;
int w, h, chans;
@@ -1989,21 +1989,21 @@ auto _image_dimensions(M,O)(M manifest_matter, O obj) {
#+name: abs_post
#+BEGIN_SRC d
foreach (ref obj; the_document_head_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
}
- if (obj.heading_lev_markup == 0) {
+ if (obj.node.heading_lev_markup == 0) {
/+ TODO second hit (of two) with same assertion failure, check, fix and reinstate
- assert( obj.ocn == 1,
- "Title OCN should be 1 not: " ~ obj.ocn.to!string); // bug introduced 0.18.1
+ assert( obj.node.ocn == 1,
+ "Title OCN should be 1 not: " ~ obj.node.ocn.to!string); // bug introduced 0.18.1
+/
- obj.ocn = 1;
- obj.obj_cite_number = "1";
- obj.obj_cite_number_type = OCNtype.ocn;
+ obj.node.ocn = 1;
+ obj.node.obj_cite_number = "1";
+ obj.misc.obj_cite_number_type = OCNtype.ocn;
}
/+ dom structure (marked up & collapsed) +/
if ((opt_action.html)
@@ -2013,8 +2013,8 @@ foreach (ref obj; the_document_head_section) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -2030,13 +2030,13 @@ if (the_table_of_contents_section["scroll"].length > 1) {
dom_markedup_buffer = dom_markedup.dup;
dom_collapsed_buffer = dom_collapsed.dup;
foreach (ref obj; the_table_of_contents_section["scroll"]) {
- if (obj.is_a == "heading") {
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ if (obj.typeinfo.is_a == "heading") {
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.heading_lev_markup == 4) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2047,8 +2047,8 @@ if (the_table_of_contents_section["scroll"].length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -2057,24 +2057,24 @@ if (the_table_of_contents_section["scroll"].length > 1) {
dom_markedup = dom_markedup_buffer.dup;
dom_collapsed = dom_collapsed_buffer.dup;
foreach (ref obj; the_table_of_contents_section["seg"]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.heading_lev_markup == 4) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
if ((opt_action.html)
|| (opt_action.html_scroll)
|| (opt_action.html_seg)
|| (opt_action.epub)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -2089,20 +2089,20 @@ if (the_table_of_contents_section["scroll"].length > 1) {
/+ multiple 1~ levels, loop through document body +/
if (the_document_body_section.length > 1) {
foreach (ref obj; the_document_body_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.lev4_subtoc = lev4_subtoc[obj.segment_anchor_tag];
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ if (obj.node.heading_lev_markup <= 4) {
+ segnames_0_4 ~= obj.tags.segment_anchor_tag;
+ if (obj.node.heading_lev_markup == 4) {
+ obj.tags.lev4_subtoc = lev4_subtoc[obj.tags.segment_anchor_tag];
+ obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
+ if (html_segnames.length > obj.ptr.html_segnames + 1) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2113,11 +2113,11 @@ if (the_document_body_section.length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "para") {
+ } else if (obj.typeinfo.is_a == "para") {
_images ~= extract_images(obj.text);
obj = _image_dimensions(manifest_matter, obj);
}
@@ -2139,22 +2139,22 @@ if (the_endnotes_section.length > 1) {
dom_markedup = dom_markedup_buffer.dup;
dom_collapsed = dom_collapsed_buffer.dup;
foreach (ref obj; the_endnotes_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_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) {
+ obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
+ if (html_segnames.length > obj.ptr.html_segnames + 1) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2165,8 +2165,8 @@ if (the_endnotes_section.length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
}
@@ -2183,22 +2183,22 @@ if (the_endnotes_section.length > 1) {
/+ optional only one 1~ level +/
if (the_glossary_section.length > 1) {
foreach (ref obj; the_glossary_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_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) {
+ obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
+ if (html_segnames.length > obj.ptr.html_segnames + 1) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2209,14 +2209,14 @@ if (the_glossary_section.length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "glossary") {
+ } else if (obj.typeinfo.is_a == "glossary") {
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
}
}
}
@@ -2231,22 +2231,22 @@ if (the_glossary_section.length > 1) {
/+ optional only one 1~ level +/
if (the_bibliography_section.length > 1) {
foreach (ref obj; the_bibliography_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number = obj_cite_digits.on.to!string; // check
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.node.obj_cite_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) {
+ obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
+ if (html_segnames.length > obj.ptr.html_segnames + 1) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2257,14 +2257,14 @@ if (the_bibliography_section.length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "bibliography") {
+ } else if (obj.typeinfo.is_a == "bibliography") {
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.on;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
+ obj.node.ocn = obj_cite_digits.on;
+ obj.node.obj_cite_number = obj_cite_digits.on.to!string;
}
}
}
@@ -2285,21 +2285,21 @@ if (the_bookindex_section["scroll"].length > 1) {
dom_markedup_buffer = dom_markedup.dup;
dom_collapsed_buffer = dom_collapsed.dup;
foreach (ref obj; the_bookindex_section["scroll"]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.on;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.on;
+ obj.node.obj_cite_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) {
+ obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
+ if (html_segnames.length > obj.ptr.html_segnames + 1) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2310,36 +2310,36 @@ if (the_bookindex_section["scroll"].length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "bookindex") {
+ } else if (obj.typeinfo.is_a == "bookindex") {
obj_cite_digits = ocn_emit(OCNstatus.bkidx);
- obj.ocn = obj_cite_digits.digit;
- obj.obj_cite_number_bkidx = obj_cite_digits.bkidx.to!string;
- obj.obj_cite_number_type = OCNtype.bkidx;
+ obj.node.ocn = obj_cite_digits.digit;
+ obj.misc.obj_cite_number_bkidx = obj_cite_digits.bkidx.to!string;
+ obj.misc.obj_cite_number_type = OCNtype.bkidx;
}
}
/+ seg +/
dom_markedup = dom_markedup_buffer.dup;
dom_collapsed = dom_collapsed_buffer.dup;
foreach (ref obj; the_bookindex_section["seg"]) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
- obj.ocn = ++ocn_;
- obj.obj_cite_number = obj.ocn.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = ++ocn_;
+ obj.node.obj_cite_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) {
+ obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
+ if (html_segnames.length > obj.ptr.html_segnames + 1) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2350,14 +2350,14 @@ if (the_bookindex_section["scroll"].length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "bookindex") {
+ } else if (obj.typeinfo.is_a == "bookindex") {
ocn_bidx_ = ++ocn_bkidx_;
- obj.obj_cite_number_bkidx = ocn_bidx_.to!string; // FIX need to distinguish from regular ocn
- obj.obj_cite_number_type = OCNtype.bkidx;
+ obj.misc.obj_cite_number_bkidx = ocn_bidx_.to!string; // FIX need to distinguish from regular ocn
+ obj.misc.obj_cite_number_type = OCNtype.bkidx;
}
}
/+ TODO assert failure, reinstate
@@ -2374,22 +2374,22 @@ if (the_bookindex_section["scroll"].length > 1) {
/+ optional only one 1~ level +/
if (the_blurb_section.length > 1) {
foreach (ref obj; the_blurb_section) {
- if (obj.is_a == "heading") {
+ if (obj.typeinfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
}
obj_cite_digits = ocn_emit(OCNstatus.on);
- obj.ocn = obj_cite_digits.on;
- obj.obj_cite_number = obj_cite_digits.on.to!string;
- if (obj.heading_lev_markup <= 4) {
- segnames_0_4 ~= obj.segment_anchor_tag;
- if (obj.heading_lev_markup == 4) {
- obj.segname_prev = html_segnames[obj.ptr_html_segnames - 1];
- if (html_segnames.length > obj.ptr_html_segnames + 1) {
- obj.segname_next = html_segnames[obj.ptr_html_segnames + 1];
+ obj.node.ocn = obj_cite_digits.on;
+ obj.node.obj_cite_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) {
+ obj.tags.segname_prev = html_segnames[obj.ptr.html_segnames - 1];
+ if (html_segnames.length > obj.ptr.html_segnames + 1) {
+ obj.tags.segname_next = html_segnames[obj.ptr.html_segnames + 1];
}
- assert(obj.segment_anchor_tag == html_segnames[obj.ptr_html_segnames],
- obj.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr_html_segnames]);
+ assert(obj.tags.segment_anchor_tag == html_segnames[obj.ptr.html_segnames],
+ obj.tags.segment_anchor_tag ~ "!=" ~ html_segnames[obj.ptr.html_segnames]);
}
}
/+ dom structure (marked up & collapsed) +/
@@ -2400,14 +2400,14 @@ if (the_blurb_section.length > 1) {
|| (opt_action.sqlite_discrete)
|| (opt_action.sqlite_update)
|| (opt_action.postgresql)) {
- obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.heading_lev_markup);
- obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.heading_lev_collapsed);
+ obj = obj_dom_structure_set_markup_tags(obj, dom_markedup, obj.node.heading_lev_markup);
+ obj = obj_dom_set_collapsed_tags(obj, dom_collapsed, obj.node.heading_lev_collapsed);
}
obj = obj_heading_ancestors(obj, lv_ancestors_txt);
- } else if (obj.is_a == "blurb") {
+ } else if (obj.typeinfo.is_a == "blurb") {
obj_cite_digits = ocn_emit(OCNstatus.off);
- obj.obj_cite_number_off = obj_cite_digits.off.to!string;
- obj.obj_cite_number_type = OCNtype.non;
+ obj.misc.obj_cite_number_off = obj_cite_digits.off.to!string;
+ obj.misc.obj_cite_number_type = OCNtype.non;
}
}
}
@@ -2420,30 +2420,30 @@ if (the_blurb_section.length > 1) {
/+ TODO
- note create/insert heading object sole purpose eof close all open tags
sort out:
- - obj.dom_markedup = dom_markedup;
- - obj.dom_collapsed = dom_collapsed;
+ - obj.node.dom_markedup = dom_markedup;
+ - obj.node.dom_collapsed = dom_collapsed;
+/
-comp_obj_heading_ = comp_obj_heading_.init;
-comp_obj_heading_.of_part = "empty";
-comp_obj_heading_.of_section = "empty";
-comp_obj_heading_.is_of = "para";
-comp_obj_heading_.is_a = "heading";
-comp_obj_heading_.ocn = 0;
-comp_obj_para.obj_cite_number = "";
-comp_obj_para.obj_cite_number_off = "";
-comp_obj_para.obj_cite_number_type = 0;
-comp_obj_heading_.segment_anchor_tag = "";
-comp_obj_heading_.marked_up_level = "";
-comp_obj_heading_.heading_lev_markup = 9;
-comp_obj_heading_.heading_lev_collapsed = 9;
-comp_obj_heading_.parent_ocn = 0;
-comp_obj_heading_.parent_lev_markup = 0;
-comp_obj_heading_.dom_markedup = dom_markedup.dup;
-comp_obj_heading_.dom_collapsed = dom_collapsed.dup;
+comp_obj_heading_ = comp_obj_heading_.init;
+comp_obj_heading_.typeinfo.of_part = "empty";
+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.obj_cite_number = "";
+comp_obj_para.misc.obj_cite_number_off = "";
+comp_obj_para.misc.obj_cite_number_type = 0;
+comp_obj_heading_.tags.segment_anchor_tag = "";
+comp_obj_heading_.node.marked_up_level = "";
+comp_obj_heading_.node.heading_lev_markup = 9;
+comp_obj_heading_.node.heading_lev_collapsed = 9;
+comp_obj_heading_.node.parent_ocn = 0;
+comp_obj_heading_.node.parent_lev_markup = 0;
+comp_obj_heading_.node.dom_markedup = dom_markedup.dup;
+comp_obj_heading_.node.dom_collapsed = dom_collapsed.dup;
comp_obj_heading_ = obj_dom_structure_set_markup_tags(comp_obj_heading_, dom_markedup, 0);
comp_obj_heading_ = obj_dom_set_collapsed_tags(comp_obj_heading_, dom_collapsed, 0);
comp_obj_heading_ = obj_heading_ancestors(comp_obj_heading_, lv_ancestors_txt);
-// the_dom_tail_section ~= comp_obj_heading_; // remove tail for now, decide on later
+// the_dom_tail_section ~= comp_obj_heading_; // remove tail for now, decide on later
#+END_SRC
** 4. _return document tuple_ :post:
@@ -2536,16 +2536,16 @@ destroy(the_blurb_section);
destroy(html_segnames);
destroy(bookindex_unordered_hashes);
destroy(an_object);
-biblio_arr_json = [];
-obj_cite_digits=ocn_emit(OCNstatus.reset);
-obj_cite_digit_=0;
-html_segnames_ptr=0;
-html_segnames_ptr_cntr=0;
-content_non_header = "8";
-dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
-dom_markedup_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
-dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
-dom_collapsed_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+obj_cite_digits = ocn_emit(OCNstatus.reset);
+biblio_arr_json = [];
+obj_cite_digit_ = 0;
+html_segnames_ptr = 0;
+html_segnames_ptr_cntr = 0;
+content_non_header = "8";
+dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+dom_markedup_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
+dom_collapsed_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
#+END_SRC
*** [#A] _return document tuple_ :return:tuple:
@@ -3395,19 +3395,19 @@ void _poem_block_(L,O,T,C,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ 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.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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);
@@ -3453,19 +3453,19 @@ void _poem_block_(L,O,T,C,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ 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.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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");
@@ -3496,19 +3496,19 @@ void _poem_block_(L,O,T,C,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ 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.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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_cite_number_poem["end"] = obj_cite_digits.on.to!string;
object_reset(an_object);
@@ -3554,19 +3554,19 @@ void _poem_block_(L,O,T,C,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "verse";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ 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.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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");
@@ -3696,15 +3696,15 @@ 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.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_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.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_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;
@@ -3771,19 +3771,19 @@ void _block_flag_line_empty_(B,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "quote";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digit_type;
+ 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.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digit_type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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;
@@ -3821,19 +3821,19 @@ void _block_flag_line_empty_(B,N,CMM)(
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.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "group";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ 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.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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;
@@ -3870,19 +3870,19 @@ 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];
comp_obj_block = comp_obj_block.init;
- comp_obj_block.of_part = "body";
- comp_obj_block.of_section = "body";
- comp_obj_block.is_of = "block";
- comp_obj_block.is_a = "block";
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digit_type;
+ 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.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digit_type;
comp_obj_block.text = an_object["substantive"];
- comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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;
@@ -3914,20 +3914,20 @@ 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.of_part = "body";
- comp_obj_poem_ocn.of_section = "body";
- comp_obj_poem_ocn.is_of = "block";
- comp_obj_poem_ocn.is_a = "poem";
- comp_obj_poem_ocn.ocn = obj_cite_digits.on;
- comp_obj_poem_ocn.obj_cite_number = (obj_cite_number_poem["start"] ~ "..." ~ obj_cite_number_poem["end"]);
- comp_obj_poem_ocn.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; //
- comp_obj_poem_ocn.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; //
- comp_obj_poem_ocn.obj_cite_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.node.obj_cite_number = (obj_cite_number_poem["start"] ~ "..." ~ obj_cite_number_poem["end"]);
+ comp_obj_poem_ocn.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; //
+ comp_obj_poem_ocn.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string; //
+ comp_obj_poem_ocn.misc.obj_cite_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
@@ -3961,19 +3961,19 @@ void _block_flag_line_empty_(B,N,CMM)(
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.of_part = "body";
- comp_obj_code.of_section = "body";
- comp_obj_code.is_of = "block";
- comp_obj_code.is_a = "code";
- comp_obj_code.ocn = obj_cite_digits.on;
- comp_obj_code.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ 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.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_number_type = obj_cite_digits.type;
comp_obj_code.text = an_object["substantive"];
- comp_obj_code.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_code.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_code.inline_links = substantive_obj_misc_tuple[sObj.links];
+ 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;
@@ -4011,11 +4011,11 @@ 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];
comp_obj_block = comp_obj_block.init;
- comp_obj_block.ocn = obj_cite_digits.on;
- comp_obj_block.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- comp_obj_block.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- comp_obj_block.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
- comp_obj_block.obj_cite_number_type = obj_cite_digits.type;
+ comp_obj_block.node.ocn = obj_cite_digits.on;
+ comp_obj_block.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ comp_obj_block.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ comp_obj_block.misc.obj_cite_number_bkidx = (obj_cite_digits.bkidx==0) ? "" : obj_cite_digits.bkidx.to!string;
+ comp_obj_block.misc.obj_cite_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;
@@ -4526,20 +4526,20 @@ auto table_instructions(O,H)(
return ref H table_head,
) {
static auto rgx = Rgx();
- table_object.of_part = "body";
- table_object.of_section = "body";
- table_object.is_of = "block";
- table_object.is_a = "table";
- table_object.inline_notes_reg = false;
- table_object.inline_notes_star = false;
- table_object.inline_links = false;
+ table_object.typeinfo.of_part = "body";
+ table_object.typeinfo.of_section = "body";
+ table_object.typeinfo.is_of = "block";
+ table_object.typeinfo.is_a = "table";
+ table_object.has.inline_notes_reg = false;
+ table_object.has.inline_notes_star = false;
+ table_object.has.inline_links = false;
if (auto m = table_head.matchFirst(rgx.table_head_instructions)) {
- table_object.table_heading = ((m["c_heading"].length > 0) && (m["c_heading"] == "h")) ? true : false;
- table_object.table_number_of_columns = ((m["c_num"].length > 0) && (m["c_num"].to!int > 0)) ? m["c_num"].to!int : 0; // double check, may be obsolete
+ table_object.table.heading = ((m["c_heading"].length > 0) && (m["c_heading"] == "h")) ? true : false;
+ table_object.table.number_of_columns = ((m["c_num"].length > 0) && (m["c_num"].to!int > 0)) ? m["c_num"].to!int : 0; // double check, may be obsolete
foreach (cw; m["c_widths"].matchAll(rgx.table_col_widths)) {
auto x = cw.hit.matchFirst(rgx.table_col_widths_and_alignment);
- table_object.table_column_widths ~= x["width"].to!int;
- table_object.table_column_aligns ~= (x["align"].empty) ? "" : x["align"];
+ table_object.table.column_widths ~= x["width"].to!int;
+ table_object.table.column_aligns ~= (x["align"].empty) ? "" : x["align"];
}
}
return table_object;
@@ -4587,26 +4587,26 @@ auto table_array_munge(O,T)(
}
col_num_ = idx_c;
_table_substantive ~= col ~ mng.tc_s;
- if (idx_r == 0 && comp_obj_block.table_heading) {
+ if (idx_r == 0 && comp_obj_block.table.heading) {
} else if (col.match(rgx.numeric_col) && idx_r == 1) { // conditions reversed to avoid: gdc compiled program run segfault
- if ((comp_obj_block.table_column_aligns.length > idx_c)
- && (comp_obj_block.table_column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
- comp_obj_block.table_column_aligns[idx_c]
- = comp_obj_block.table_column_aligns[idx_c];
- } else if (comp_obj_block.table_column_aligns.length > idx_c) {
- comp_obj_block.table_column_aligns[idx_c] = "r";
+ if ((comp_obj_block.table.column_aligns.length > idx_c)
+ && (comp_obj_block.table.column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
+ comp_obj_block.table.column_aligns[idx_c]
+ = comp_obj_block.table.column_aligns[idx_c];
+ } else if (comp_obj_block.table.column_aligns.length > idx_c) {
+ comp_obj_block.table.column_aligns[idx_c] = "r";
} else {
- comp_obj_block.table_column_aligns ~= "r";
+ comp_obj_block.table.column_aligns ~= "r";
}
} else if (idx_r == 1) {
- if ((comp_obj_block.table_column_aligns.length > idx_c)
- && (comp_obj_block.table_column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
- comp_obj_block.table_column_aligns[idx_c]
- = comp_obj_block.table_column_aligns[idx_c];
- } else if (comp_obj_block.table_column_aligns.length > idx_c) {
- comp_obj_block.table_column_aligns[idx_c] = "l";
+ if ((comp_obj_block.table.column_aligns.length > idx_c)
+ && (comp_obj_block.table.column_aligns[idx_c].matchFirst(rgx.table_col_align_match))) {
+ comp_obj_block.table.column_aligns[idx_c]
+ = comp_obj_block.table.column_aligns[idx_c];
+ } else if (comp_obj_block.table.column_aligns.length > idx_c) {
+ comp_obj_block.table.column_aligns[idx_c] = "l";
} else {
- comp_obj_block.table_column_aligns ~= "l";
+ comp_obj_block.table.column_aligns ~= "l";
}
}
}
@@ -4620,55 +4620,55 @@ auto table_array_munge(O,T)(
}
_table_substantive = _table_substantive.replaceFirst(rgx.table_col_separator_nl, "\n");
}
- if (comp_obj_block.table_number_of_columns != col_num) {
- if (comp_obj_block.table_number_of_columns == 0) {
- comp_obj_block.table_number_of_columns = (col_num).to!int;
+ if (comp_obj_block.table.number_of_columns != col_num) {
+ if (comp_obj_block.table.number_of_columns == 0) {
+ comp_obj_block.table.number_of_columns = (col_num).to!int;
} else {
debug(table_dev) {
- writeln(comp_obj_block.table_number_of_columns, " != ", col_num);
+ writeln(comp_obj_block.table.number_of_columns, " != ", col_num);
}
}
}
- if (table_object.table_number_of_columns == 0
- && table_object.table_column_widths.length > 0) {
+ if (table_object.table.number_of_columns == 0
+ && table_object.table.column_widths.length > 0) {
writeln(__LINE__, " ERROR");
}
- if (table_object.table_number_of_columns > 0
- && table_object.table_column_widths.length == 0) {
- double col_w = (100.00 / table_object.table_number_of_columns);
- foreach (i; 0..table_object.table_number_of_columns) {
- table_object.table_column_widths ~= col_w;
+ if (table_object.table.number_of_columns > 0
+ && table_object.table.column_widths.length == 0) {
+ double col_w = (100.00 / table_object.table.number_of_columns);
+ foreach (i; 0..table_object.table.number_of_columns) {
+ table_object.table.column_widths ~= col_w;
}
- } else if (table_object.table_number_of_columns
- != table_object.table_column_widths.length) {
+ } else if (table_object.table.number_of_columns
+ != table_object.table.column_widths.length) {
debug(table_dev) {
writeln(m.hit); // further logic required
}
- if (table_object.table_number_of_columns > table_object.table_column_widths.length) {
- double col_w = (100.00 - (table_object.table_column_widths).sum)
- / (table_object.table_number_of_columns - table_object.table_column_widths.length);
- foreach (i; 0..table_object.table_column_widths.length) {
- table_object.table_column_widths ~= col_w;
+ if (table_object.table.number_of_columns > table_object.table.column_widths.length) {
+ double col_w = (100.00 - (table_object.table.column_widths).sum)
+ / (table_object.table.number_of_columns - table_object.table.column_widths.length);
+ foreach (i; 0..table_object.table.column_widths.length) {
+ table_object.table.column_widths ~= col_w;
}
- foreach (i; 0..(table_object.table_number_of_columns - table_object.table_column_widths.length)) {
- table_object.table_column_widths ~= col_w;
+ foreach (i; 0..(table_object.table.number_of_columns - table_object.table.column_widths.length)) {
+ table_object.table.column_widths ~= col_w;
}
- } else if (table_object.table_number_of_columns < table_object.table_column_widths.length) {
+ } else if (table_object.table.number_of_columns < table_object.table.column_widths.length) {
writeln(__LINE__, " warning, ERROR");
}
}
- if (table_object.table_column_widths.sum > 101
- || table_object.table_column_widths.sum < 95 ) {
- writeln("sum: ", table_object.table_column_widths.sum,
- ", array: ", table_object.table_column_widths,
- ", cols: ", table_object.table_number_of_columns);
+ if (table_object.table.column_widths.sum > 101
+ || table_object.table.column_widths.sum < 95 ) {
+ writeln("sum: ", table_object.table.column_widths.sum,
+ ", array: ", table_object.table.column_widths,
+ ", cols: ", table_object.table.number_of_columns);
writeln(_table_substantive);
}
debug(table_res) {
- writeln("aligns: ", comp_obj_block.table_column_aligns, "\n",
- "no. of columns: ", comp_obj_block.table_number_of_columns, "\n",
- "col widths: ", comp_obj_block.table_column_widths,
- " sum: ", comp_obj_block.table_column_widths.sum, "\n",
+ writeln("aligns: ", comp_obj_block.table.column_aligns, "\n",
+ "no. of columns: ", comp_obj_block.table.number_of_columns, "\n",
+ "col widths: ", comp_obj_block.table.column_widths,
+ " sum: ", comp_obj_block.table.column_widths.sum, "\n",
_table_substantive);
}
comp_obj_block.text = _table_substantive;
@@ -5441,19 +5441,19 @@ static struct ObjInlineMarkup {
);
toc_txt_= munge.url_links(toc_txt_);
comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.of_part = "frontmatter";
- comp_obj_toc.of_section = "toc";
- comp_obj_toc.is_of = "para";
- comp_obj_toc.is_a = "toc";
- comp_obj_toc.ocn = 0;
- comp_obj_toc.obj_cite_number = "";
- comp_obj_toc.obj_cite_number_off = "";
- comp_obj_toc.obj_cite_number_type = 0;
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
- comp_obj_toc.bullet = false;
+ comp_obj_toc.typeinfo.of_part = "frontmatter";
+ 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.obj_cite_number = "";
+ comp_obj_toc.misc.obj_cite_number_off = "";
+ comp_obj_toc.misc.obj_cite_number_type = 0;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.bullet = false;
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
} else {
indent=[
@@ -5461,32 +5461,32 @@ static struct ObjInlineMarkup {
"base_position" : 0,
];
comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.of_part = "frontmatter";
- comp_obj_toc.of_section = "toc";
- comp_obj_toc.is_of = "para";
- comp_obj_toc.is_a = "toc";
- comp_obj_toc.ocn = 0;
- comp_obj_toc.obj_cite_number = "";
- comp_obj_toc.obj_cite_number_off = "";
- comp_obj_toc.obj_cite_number_type = 0;
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
- comp_obj_toc.bullet = false;
+ comp_obj_toc.typeinfo.of_part = "frontmatter";
+ 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.obj_cite_number = "";
+ comp_obj_toc.misc.obj_cite_number_off = "";
+ comp_obj_toc.misc.obj_cite_number_type = 0;
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.bullet = false;
comp_obj_toc.text = "Table of Contents";
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["scroll"] ~= comp_obj_toc;
}
comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.of_part = "frontmatter";
- comp_obj_toc.of_section = "toc";
- comp_obj_toc.is_of = "para";
- comp_obj_toc.is_a = "toc";
- comp_obj_toc.ocn = 0;
- comp_obj_toc.obj_cite_number = "";
- comp_obj_toc.obj_cite_number_off = "";
- comp_obj_toc.obj_cite_number_type = 0;
- comp_obj_toc.bullet = false;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.typeinfo.of_part = "frontmatter";
+ 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.obj_cite_number = "";
+ comp_obj_toc.misc.obj_cite_number_off = "";
+ comp_obj_toc.misc.obj_cite_number_type = 0;
+ comp_obj_toc.attrib.bullet = false;
+ comp_obj_toc.has.inline_links = true;
switch (obj_["lev_markup_number"].to!int) {
case 0:
indent=[
@@ -5495,10 +5495,10 @@ static struct ObjInlineMarkup {
];
toc_txt_ = "{ Table of Contents }" ~ mkup.mark_internal_site_lnk ~ "toc.fnSuffix";
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 1: .. case 3:
@@ -5511,10 +5511,10 @@ static struct ObjInlineMarkup {
heading_toc_,
);
toc_txt_= munge.url_links(toc_txt_);
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 4:
@@ -5531,10 +5531,10 @@ static struct ObjInlineMarkup {
"hang_position" : obj_["lev_markup_number"].to!int,
"base_position" : obj_["lev_markup_number"].to!int,
];
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
case 5: .. case 7:
@@ -5560,10 +5560,10 @@ static struct ObjInlineMarkup {
"hang_position" : obj_["lev_markup_number"].to!int,
"base_position" : obj_["lev_markup_number"].to!int,
];
- comp_obj_toc.indent_hang = indent["hang_position"];
- comp_obj_toc.indent_base = indent["base_position"];
+ comp_obj_toc.attrib.indent_hang = indent["hang_position"];
+ comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.inline_links = true;
+ comp_obj_toc.has.inline_links = true;
the_table_of_contents_section["seg"] ~= comp_obj_toc;
break;
default:
@@ -6108,16 +6108,16 @@ struct ObjAttributes {
(oa_j.type == JSON_TYPE.OBJECT)
);
if (obj_is_ == "heading") {
- oa_j.object["obj_cite_number"] = _comp_obj_heading.ocn;
- oa_j.object["lev_markup_number"] = _comp_obj_heading.heading_lev_markup;
- oa_j.object["lev_collapsed_number"] = _comp_obj_heading.heading_lev_collapsed;
+ oa_j.object["obj_cite_number"] = _comp_obj_heading.node.ocn;
+ oa_j.object["lev_markup_number"] = _comp_obj_heading.node.heading_lev_markup;
+ oa_j.object["lev_collapsed_number"] = _comp_obj_heading.node.heading_lev_collapsed;
oa_j.object["heading_ptr"]
- = _comp_obj_heading.ptr_heading;
+ = _comp_obj_heading.ptr.heading;
oa_j.object["doc_object_ptr"]
- = _comp_obj_heading.ptr_doc_object;
+ = _comp_obj_heading.ptr.doc_object;
}
- oa_j.object["parent_obj_cite_number"] = _comp_obj_heading.parent_ocn;
- oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.parent_lev_markup;
+ oa_j.object["parent_obj_cite_number"] = _comp_obj_heading.node.parent_ocn;
+ oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.node.parent_lev_markup;
_obj_attrib = oa_j.toString();
return _obj_attrib;
}
@@ -6330,46 +6330,46 @@ struct BookIndexReportSection {
&& opt_action.section_bookindex)) {
string bi_tmp_seg, bi_tmp_scroll;
string[] bi_tmp_tags;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bookindex";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Book Index";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_book_index";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading.inline_links = true;
- bookindex_section["scroll"] ~= comp_obj_heading_;
- bookindex_section["seg"] ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bookindex";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Book Index";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "_part_book_index";
+ comp_obj_heading_.node.marked_up_level = "B";
+ comp_obj_heading_.node.heading_lev_markup = 1;
+ comp_obj_heading_.node.heading_lev_collapsed = 1;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ comp_obj_heading.has.inline_links = true;
+ bookindex_section["scroll"] ~= comp_obj_heading_;
+ bookindex_section["seg"] ~= comp_obj_heading_;
++mkn;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "bookindex";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Index";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "bookindex";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading.inline_links = false;
- comp_obj_heading_.anchor_tags = ["bookindex"];
- bookindex_section["scroll"] ~= comp_obj_heading_;
- bookindex_section["seg"] ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "bookindex";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Index";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "bookindex";
+ comp_obj_heading_.node.marked_up_level = "1";
+ comp_obj_heading_.node.heading_lev_markup = 4;
+ comp_obj_heading_.node.heading_lev_collapsed = 2;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ comp_obj_heading.has.inline_links = false;
+ comp_obj_heading_.tags.anchor_tags = ["bookindex"];
+ bookindex_section["scroll"] ~= comp_obj_heading_;
+ bookindex_section["seg"] ~= comp_obj_heading_;
++mkn;
import std.array : appender;
auto buffer = appender!(char[])();
@@ -6426,42 +6426,42 @@ struct BookIndexReportSection {
bi_tmp_seg ~= " \\\\\n ";
++skn;
}
- bi_tmp_scroll = (bi_tmp_scroll).replaceFirst(rgx.trailing_linebreak, "");
- bi_tmp_seg = (bi_tmp_seg).replaceFirst(rgx.trailing_linebreak, "");
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.of_part = "backmatter";
- comp_obj_para.of_section = "bookindex";
- comp_obj_para.is_of = "para";
- comp_obj_para.is_a = "bookindex";
- comp_obj_para.text = bi_tmp_scroll.to!string.strip;
- comp_obj_para.ocn = 0;
- comp_obj_para.obj_cite_number = "";
- comp_obj_para.obj_cite_number_off = "";
- comp_obj_para.obj_cite_number_type = 0;
- comp_obj_para.anchor_tags = bi_tmp_tags;
- comp_obj_para.indent_hang = 0;
- comp_obj_para.indent_base = 1;
- comp_obj_para.bullet = false;
- comp_obj_para.inline_links = true;
- bookindex_section["scroll"] ~= comp_obj_para;
- comp_obj_para.text = bi_tmp_seg.to!string.strip;
- bookindex_section["seg"] ~= comp_obj_para;
+ bi_tmp_scroll = (bi_tmp_scroll).replaceFirst(rgx.trailing_linebreak, "");
+ bi_tmp_seg = (bi_tmp_seg).replaceFirst(rgx.trailing_linebreak, "");
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.typeinfo.of_part = "backmatter";
+ comp_obj_para.typeinfo.of_section = "bookindex";
+ comp_obj_para.typeinfo.is_of = "para";
+ 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.obj_cite_number = "";
+ comp_obj_para.misc.obj_cite_number_off = "";
+ comp_obj_para.misc.obj_cite_number_type = 0;
+ comp_obj_para.tags.anchor_tags = bi_tmp_tags;
+ comp_obj_para.attrib.indent_hang = 0;
+ comp_obj_para.attrib.indent_base = 1;
+ comp_obj_para.attrib.bullet = false;
+ comp_obj_para.has.inline_links = true;
+ bookindex_section["scroll"] ~= comp_obj_para;
+ comp_obj_para.text = bi_tmp_seg.to!string.strip;
+ bookindex_section["seg"] ~= comp_obj_para;
++mkn;
}
} else { // no book index, (figure out what to do here)
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.text = "(skip) there is no Book Index";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- bookindex_section["scroll"] ~= comp_obj_heading_;
- bookindex_section["seg"] ~= comp_obj_heading_;
+ 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.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.node.marked_up_level = "B";
+ comp_obj_heading_.node.heading_lev_markup = 1;
+ comp_obj_heading_.node.heading_lev_collapsed = 1;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ bookindex_section["scroll"] ~= comp_obj_heading_;
+ bookindex_section["seg"] ~= comp_obj_heading_;
}
auto t = tuple(bookindex_section, obj_cite_digits);
return t;
@@ -6496,12 +6496,12 @@ struct NotesSection {
int cntr,
)
in {
- assert((contents_am[cntr].is_a == "para")
- || (contents_am[cntr].is_a == "heading")
- || (contents_am[cntr].is_a == "quote")
- || (contents_am[cntr].is_a == "group")
- || (contents_am[cntr].is_a == "block")
- || (contents_am[cntr].is_a == "verse"));
+ assert((contents_am[cntr].typeinfo.is_a == "para")
+ || (contents_am[cntr].typeinfo.is_a == "heading")
+ || (contents_am[cntr].typeinfo.is_a == "quote")
+ || (contents_am[cntr].typeinfo.is_a == "group")
+ || (contents_am[cntr].typeinfo.is_a == "block")
+ || (contents_am[cntr].typeinfo.is_a == "verse"));
assert(cntr >= previous_count);
previous_count=cntr;
assert(
@@ -6589,81 +6589,81 @@ struct NotesSection {
ObjGenericComposite comp_obj_heading_;
if ((endnotes_["notes"].length > 0)
&& (opt_action.backmatter && opt_action.section_endnotes)) {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "endnotes";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Endnotes";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "_part_endnotes";
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "endnotes";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Endnotes";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "_part_endnotes";
+ comp_obj_heading_.node.marked_up_level = "B";
+ comp_obj_heading_.node.heading_lev_markup = 1;
+ comp_obj_heading_.node.heading_lev_collapsed = 1;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ the_endnotes_section ~= comp_obj_heading_;
++mkn;
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "backmatter";
- comp_obj_heading_.of_section = "endnotes";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "Endnotes";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.segment_anchor_tag = "endnotes";
- comp_obj_heading_.marked_up_level = "1";
- comp_obj_heading_.heading_lev_markup = 4;
- comp_obj_heading_.heading_lev_collapsed = 2;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- comp_obj_heading_.anchor_tags = ["endnotes"];
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "backmatter";
+ comp_obj_heading_.typeinfo.of_section = "endnotes";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ comp_obj_heading_.typeinfo.is_a = "heading";
+ comp_obj_heading_.text = "Endnotes";
+ comp_obj_heading_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag = "endnotes";
+ comp_obj_heading_.node.marked_up_level = "1";
+ comp_obj_heading_.node.heading_lev_markup = 4;
+ comp_obj_heading_.node.heading_lev_collapsed = 2;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ comp_obj_heading_.tags.anchor_tags = ["endnotes"];
+ the_endnotes_section ~= comp_obj_heading_;
++mkn;
} else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.of_part = "empty";
- comp_obj_heading_.of_section = "empty";
- comp_obj_heading_.is_of = "para";
- comp_obj_heading_.is_a = "heading";
- comp_obj_heading_.text = "(skip) there are no Endnotes";
- comp_obj_heading_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_heading_.marked_up_level = "B";
- comp_obj_heading_.heading_lev_markup = 1;
- comp_obj_heading_.heading_lev_collapsed = 1;
- comp_obj_heading_.parent_ocn = 1;
- comp_obj_heading_.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.typeinfo.of_part = "empty";
+ comp_obj_heading_.typeinfo.of_section = "empty";
+ comp_obj_heading_.typeinfo.is_of = "para";
+ 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.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_heading_.node.marked_up_level = "B";
+ comp_obj_heading_.node.heading_lev_markup = 1;
+ comp_obj_heading_.node.heading_lev_collapsed = 1;
+ comp_obj_heading_.node.parent_ocn = 1;
+ comp_obj_heading_.node.parent_lev_markup = 0;
+ the_endnotes_section ~= comp_obj_heading_;
}
if (opt_action.backmatter && opt_action.section_endnotes) {
ObjGenericComposite comp_obj_endnote_;
- comp_obj_endnote_ = comp_obj_endnote_.init;
- comp_obj_endnote_.of_part = "backmatter";
- comp_obj_endnote_.of_section = "endnote";
- comp_obj_endnote_.is_of = "para";
- comp_obj_endnote_.is_a = "endnote";
- comp_obj_endnote_.ocn = 0;
- comp_obj_heading_.obj_cite_number = "";
- comp_obj_heading_.obj_cite_number_off = "";
- comp_obj_heading_.obj_cite_number_type = 0;
- comp_obj_endnote_.indent_hang = 0;
- comp_obj_endnote_.indent_base = 0;
- comp_obj_endnote_.bullet = false;
+ comp_obj_endnote_ = comp_obj_endnote_.init;
+ comp_obj_endnote_.typeinfo.of_part = "backmatter";
+ comp_obj_endnote_.typeinfo.of_section = "endnote";
+ comp_obj_endnote_.typeinfo.is_of = "para";
+ comp_obj_endnote_.typeinfo.is_a = "endnote";
+ comp_obj_endnote_.node.ocn = 0;
+ comp_obj_heading_.node.obj_cite_number = "";
+ comp_obj_heading_.misc.obj_cite_number_off = "";
+ comp_obj_heading_.misc.obj_cite_number_type = 0;
+ comp_obj_endnote_.attrib.indent_hang = 0;
+ comp_obj_endnote_.attrib.indent_base = 0;
+ comp_obj_endnote_.attrib.bullet = false;
foreach (i, endnote; endnotes_["notes"]) {
auto m = endnote.matchFirst(rgx.note_ref);
string notenumber = m.captures[1].to!string;
string anchor_tag = "note_" ~ notenumber;
- comp_obj_endnote_.anchor_tags = [ endnotes_["anchor"][i] ];
- comp_obj_endnote_.inline_links = true;
+ comp_obj_endnote_.tags.anchor_tags = [ endnotes_["anchor"][i] ];
+ comp_obj_endnote_.has.inline_links = true;
comp_obj_endnote_.text = endnote.strip;
the_endnotes_section ~= comp_obj_endnote_;
}
@@ -6869,12 +6869,12 @@ struct NodeStructureMetadata {
p_["obj_cite_number"] = lv4;
}
ObjGenericComposite comp_obj_location;
- comp_obj_location = comp_obj_location.init;
- comp_obj_location.is_a = is_;
- comp_obj_location.ocn = obj_cite_digits.on;
- comp_obj_location.segment_anchor_tag = segment_anchor_tag.to!string;
- comp_obj_location.parent_ocn = p_["obj_cite_number"];
- comp_obj_location.parent_lev_markup = p_["lev_markup_number"];
+ comp_obj_location = comp_obj_location.init;
+ comp_obj_location.typeinfo.is_a = is_;
+ comp_obj_location.node.ocn = obj_cite_digits.on;
+ comp_obj_location.tags.segment_anchor_tag = segment_anchor_tag.to!string;
+ comp_obj_location.node.parent_ocn = p_["obj_cite_number"];
+ comp_obj_location.node.parent_lev_markup = p_["lev_markup_number"];
debug(node) {
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
writeln("x ", _node.to!string);
@@ -6882,9 +6882,9 @@ struct NodeStructureMetadata {
writeln("- ", _node.to!string);
}
}
- assert(comp_obj_location.parent_lev_markup >= 4);
- assert(comp_obj_location.parent_lev_markup <= 7);
- assert(comp_obj_location.parent_ocn >= 0);
+ assert(comp_obj_location.node.parent_lev_markup >= 4);
+ assert(comp_obj_location.node.parent_lev_markup <= 7);
+ assert(comp_obj_location.node.parent_ocn >= 0);
return comp_obj_location;
}
invariant() {
@@ -7026,29 +7026,29 @@ struct NodeStructureMetadata {
break;
}
ObjGenericComposite _comp_obj_heading_;
- _comp_obj_heading_ = _comp_obj_heading_.init;
- _comp_obj_heading_.of_part = "body";
- _comp_obj_heading_.of_section = "body";
- _comp_obj_heading_.is_of = "para";
- _comp_obj_heading_.is_a = "heading";
- _comp_obj_heading_.text = _text.to!string.strip;
- _comp_obj_heading_.ocn = obj_cite_digits.on;
- _comp_obj_heading_.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
- _comp_obj_heading_.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
- _comp_obj_heading_.obj_cite_number_type = obj_cite_digits.type;
- _comp_obj_heading_.segment_anchor_tag = segment_anchor_tag.to!string;
- _comp_obj_heading_.marked_up_level = lev;
- _comp_obj_heading_.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
- _comp_obj_heading_.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
- _comp_obj_heading_.parent_ocn = p_["obj_cite_number"];
- _comp_obj_heading_.parent_lev_markup = p_["lev_markup_number"];
- _comp_obj_heading_.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_.inline_notes_reg = flag_notes_reg;
- _comp_obj_heading_.inline_notes_star = flag_notes_star;
- _comp_obj_heading_.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_.node.obj_cite_number = (obj_cite_digits.on==0) ? "" : obj_cite_digits.on.to!string;
+ _comp_obj_heading_.misc.obj_cite_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string;
+ _comp_obj_heading_.misc.obj_cite_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_["obj_cite_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);
@@ -7059,34 +7059,34 @@ struct NodeStructureMetadata {
writeln("* ", _node.to!string);
}
}
- assert(_comp_obj_heading_.parent_lev_markup <= 7);
- assert(_comp_obj_heading_.parent_ocn >= 0);
+ assert(_comp_obj_heading_.node.parent_lev_markup <= 7);
+ assert(_comp_obj_heading_.node.parent_ocn >= 0);
if (lev_markup_number.match(rgx.levels_numbered_headings)) {
- assert(_comp_obj_heading_.heading_lev_markup <= 7);
- assert(_comp_obj_heading_.ocn >= 0);
- if (_comp_obj_heading_.parent_lev_markup > 0) {
- assert(_comp_obj_heading_.parent_lev_markup < _comp_obj_heading_.heading_lev_markup);
- if (_comp_obj_heading_.ocn != 0) {
- assert(_comp_obj_heading_.parent_ocn < _comp_obj_heading_.ocn);
+ assert(_comp_obj_heading_.node.heading_lev_markup <= 7);
+ assert(_comp_obj_heading_.node.ocn >= 0);
+ if (_comp_obj_heading_.node.parent_lev_markup > 0) {
+ assert(_comp_obj_heading_.node.parent_lev_markup < _comp_obj_heading_.node.heading_lev_markup);
+ if (_comp_obj_heading_.node.ocn != 0) {
+ assert(_comp_obj_heading_.node.parent_ocn < _comp_obj_heading_.node.ocn);
}
}
- if (_comp_obj_heading_.heading_lev_markup == 0) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_sect_B) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_sect_C) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_B);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_sect_D) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_sect_C);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_1) {
- assert(_comp_obj_heading_.parent_lev_markup <= DocStructMarkupHeading.h_sect_D);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_2) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_text_1);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_3) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_text_2);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_4) {
- assert(_comp_obj_heading_.parent_lev_markup == DocStructMarkupHeading.h_text_3);
- } else if (_comp_obj_heading_.heading_lev_markup == DocStructMarkupHeading.h_text_5) {
+ if (_comp_obj_heading_.node.heading_lev_markup == 0) {
+ assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
+ } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_sect_B) {
+ assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
+ } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_sect_C) {
+ assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_sect_B);
+ } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_sect_D) {
+ assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_sect_C);
+ } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_text_1) {
+ assert(_comp_obj_heading_.node.parent_lev_markup <= DocStructMarkupHeading.h_sect_D);
+ } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_text_2) {
+ assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_text_1);
+ } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_text_3) {
+ assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_text_2);
+ } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_text_4) {
+ assert(_comp_obj_heading_.node.parent_lev_markup == DocStructMarkupHeading.h_text_3);
+ } else if (_comp_obj_heading_.node.heading_lev_markup == DocStructMarkupHeading.h_text_5) {
}
}
return _comp_obj_heading_;
@@ -7361,73 +7361,81 @@ template ObjectSetter() {
#+END_SRC
** 1. initialize structs :struct:
-*** heading attribute
-
-#+name: meta_structs_init
-#+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 ObjGenericComposite {
- // size_t id;
- string of_part = "";
- string of_section = "";
- string is_of = "";
- string is_a = "";
- string text = "";
- string obj_cite_number = "";
- string obj_cite_number_off = "";
- string obj_cite_number_bkidx = "";
- int obj_cite_number_type = 0;
- string[] anchor_tags = [];
+struct DocObj_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_ {
int indent_base = 0;
int indent_hang = 0;
bool bullet = false;
+ string language = ""; // not implemented, consider
+}
+struct DocObj_Has_ {
bool inline_links = false;
bool inline_notes_reg = false;
bool inline_notes_star = false;
bool contains_image_without_dimensions = false;
- string language = ""; // not implemented, consider
- string code_block_syntax = "";
- int table_number_of_columns = 0;
- double[] table_column_widths = [];
- string[] table_column_aligns = [];
- bool table_heading = false;
- bool table_walls = false; // not implemented
- int ocn = 0;
- string segment_anchor_tag = "";
- string segname_prev = "";
- string segname_next = "";
- int parent_lev_markup = 0;
- int parent_ocn = 0;
- int[] ancestors = [];
+}
+struct DocObj_Node_ {
+ string[string][string] node;
+ int ocn = 0; // duplicated as string with obj_cite_number
+ string obj_cite_number = ""; // duplicated as int with ocn may apply additional info for backmatter (glossary, biblio etc.)
string marked_up_level = "9";
int heading_lev_markup = 9;
int heading_lev_collapsed = 9;
int[] dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0,];
int[] dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0,];
int[] heading_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
+ int parent_lev_markup = 0;
+ int parent_ocn = 0;
+ int[] ancestors = [];
+}
+struct DocObj_Table_ {
+ int number_of_columns = 0;
+ double[] column_widths = [];
+ string[] column_aligns = [];
+ bool heading = false;
+ bool walls = false; // not implemented
+}
+struct DocObj_CodeBlock_ {
+ string syntax = "";
+}
+struct DocObj_Pointer_ {
+ int doc_object = 0;
+ int html_segnames = 0;
+ int heading = 0;
+}
+struct DocObj_Tags_ {
string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ];
+ string segment_anchor_tag = "";
+ string segname_prev = "";
+ string segname_next = "";
string[] lev4_subtoc = [];
- int heading_array_ptr = 0;
- int ptr_doc_object = 0;
- int ptr_html_segnames = 0;
- int ptr_heading = 0;
- int array_ptr = 0;
- int heading_array_ptr_segments = 0;
- string[string][string] node;
+ string[] anchor_tags = [];
+}
+struct DocObj_Misc_ {
+ string obj_cite_number_bkidx = "";
+ string obj_cite_number_off = "";
+ int obj_cite_number_type = 0; // { ocn, non, bkidx }
+}
+struct ObjGenericComposite {
+ string text = "";
+ DocObj_TypeInfo_ typeinfo;
+ DocObj_TxtAttrib_ attrib;
+ DocObj_Tags_ tags;
+ DocObj_Has_ has;
+ DocObj_Table_ table;
+ DocObj_CodeBlock_ code_block;
+ DocObj_Misc_ misc;
+ DocObj_Pointer_ ptr;
+ DocObj_Node_ node;
}
#+END_SRC