aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/meta_abstraction.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-04-20 14:44:42 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2019-05-17 16:59:54 -0400
commitd60c328d3bd3d1a8be39dd835b2ee96640490120 (patch)
tree9f0c930715dcf9ba2fd5800447b96f49fad1b82c /org/meta_abstraction.org
parenttext format delimiter, use: "┃" instead of "┋" (diff)
(segmented html) dummy heading related
Diffstat (limited to 'org/meta_abstraction.org')
-rw-r--r--org/meta_abstraction.org50
1 files changed, 42 insertions, 8 deletions
diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org
index 890519e..d2adf27 100644
--- a/org/meta_abstraction.org
+++ b/org/meta_abstraction.org
@@ -206,6 +206,7 @@ enum DocStructMarkupHeading {
h_text_5, // extra level, drop
content_non_header
} // header section A-D; header text 1-4
+enum Status { off, on, }
enum OCNstatus { on, off, bkidx, closing, reset, }
enum OCN_off_block_status { off, on }
enum OCNtype { ocn, non, bkidx, }
@@ -591,6 +592,7 @@ comp_obj_heading_.metainfo.is_a = "heading";
comp_obj_heading_.text = "Table of Contents";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+comp_obj_heading_.metainfo.dummy_heading = false;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "toc";
@@ -783,6 +785,7 @@ if there is a glossary section you need to:
comp_obj_heading_.text = "Glossary";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = false;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_glossary";
@@ -805,6 +808,7 @@ if there is a glossary section you need to:
comp_obj_heading_.text = "Glossary";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "glossary";
@@ -919,6 +923,7 @@ if there is a blurb section you need to:
comp_obj_heading_.text = "Blurb";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = false;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_blurb";
@@ -941,6 +946,7 @@ if there is a blurb section you need to:
comp_obj_heading_.text = "Blurb";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "blurb";
@@ -966,6 +972,7 @@ if there is a blurb section you need to:
comp_obj_heading_.text = line.to!string;
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = false;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "blurb";
@@ -1373,6 +1380,7 @@ if ((obj_type_status["heading"] == State.on)
an_object["substantive"],
an_object["lev_markup_number"],
an_object["lev_collapsed_number"],
+ an_object["dummy_heading_status"],
tag_in_seg,
lev_anchor_tag,
tag_assoc,
@@ -1571,6 +1579,7 @@ if (an_object["glossary_nugget"].length == 0) {
comp_obj_heading_.text = "(skip) there is no Glossary section";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.metainfo.heading_lev_markup = 1;
@@ -1607,6 +1616,7 @@ if (biblio_ordered.length > 0) {
comp_obj_heading_.text = "Bibliography";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_bibliography";
@@ -1627,6 +1637,7 @@ if (biblio_ordered.length > 0) {
comp_obj_heading_.text = "Bibliography";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "bibliography";
@@ -1649,6 +1660,7 @@ if (biblio_ordered.length > 0) {
comp_obj_heading_.text = "(skip) there is no Bibliography";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.metainfo.heading_lev_markup = 1;
@@ -2896,8 +2908,9 @@ comp_obj_heading_.metainfo.is_of_type = "para";
comp_obj_heading_.metainfo.is_a = "heading";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
-comp_obj_para.metainfo.object_number_off = true;
-comp_obj_para.metainfo.object_number_type = 0;
+comp_obj_heading_.metainfo.dummy_heading = true;
+comp_obj_heading_.metainfo.object_number_off = true;
+comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "";
comp_obj_heading_.tags.anchor_tag_html = "";
comp_obj_heading_.tags.in_segment_html = "";
@@ -3104,8 +3117,9 @@ static auto _check_ocn_status_(L,T)(
writeln(line);
}
}
- if (line.matchFirst(rgx.object_number_off_block_dh)) {
+ if (line.matchFirst(rgx.object_number_off_block_dummy_heading)) {
obj_type_status["ocn_status_off_for_multiple_objects"] = OCN_off_block_status.on;
+ obj_type_status["heading_off_for_multiple_objects"] = Status.on;
obj_type_status["ocn_status"] = OCNstatus.off;
debug(ocnoff) {
writeln(line);
@@ -3113,15 +3127,21 @@ static auto _check_ocn_status_(L,T)(
}
} else {
if (obj_type_status["ocn_status_off_for_multiple_objects"] == OCN_off_block_status.off) {
+ obj_type_status["dummy_heading_status"] = Status.off;
+ if (obj_type_status["heading_off_for_multiple_objects"]) {
+ obj_type_status["dummy_heading_status"] = Status.on;
+ }
if (line.matchFirst(rgx.object_number_off)) {
obj_type_status["ocn_status"] = OCNstatus.off;
- } else if (line.matchFirst(rgx.object_number_off_dh)) {
- obj_type_status["ocn_status"] = OCNstatus.off;
+ } else if (line.matchFirst(rgx.object_number_off_dummy_heading)) {
+ obj_type_status["ocn_status"] = OCNstatus.off;
+ obj_type_status["dummy_heading_status"] = Status.on;
} else {
- obj_type_status["ocn_status"] = OCNstatus.on;
+ obj_type_status["ocn_status"] = OCNstatus.on;
+ obj_type_status["dummy_heading_status"] = Status.off;
}
} else {
- obj_type_status["ocn_status"] = obj_type_status["ocn_status_off_for_multiple_objects"];
+ obj_type_status["ocn_status"] = obj_type_status["ocn_status_off_for_multiple_objects"];
}
}
} else if (
@@ -3131,6 +3151,7 @@ static auto _check_ocn_status_(L,T)(
if (line.matchFirst(rgx.object_number_off_block_close)) {
obj_type_status["ocn_status_off_for_multiple_objects"] = OCN_off_block_status.off;
obj_type_status["ocn_status"] = OCNstatus.on;
+ obj_type_status["dummy_heading_status"] = Status.off;
debug(ocnoff) {
writeln(line);
}
@@ -4991,6 +5012,7 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,CMM)(
default:
an_object["lev_markup_number"] = lv["lv"].to!string;
}
+ an_object["dummy_heading_status"] = (obj_type_status["dummy_heading_status"] == State.off) ? "f" : "t";
debug(heading) {
writeln(line.strip);
}
@@ -5989,6 +6011,7 @@ static struct ObjInlineMarkup {
comp_obj_toc.metainfo.identifier = "";
comp_obj_toc.metainfo.object_number_off = true;
comp_obj_toc.metainfo.object_number_type = 0;
+ comp_obj_toc.metainfo.dummy_heading = (an_object["dummy_heading_status"] == "t") ? true: false;
comp_obj_toc.attrib.indent_hang = indent["hang_position"];
comp_obj_toc.attrib.indent_base = indent["base_position"];
comp_obj_toc.attrib.bullet = false;
@@ -6005,6 +6028,7 @@ static struct ObjInlineMarkup {
comp_obj_toc.metainfo.identifier = "";
comp_obj_toc.metainfo.object_number_off = true;
comp_obj_toc.metainfo.object_number_type = 0;
+ comp_obj_toc.metainfo.dummy_heading = (an_object["dummy_heading_status"] == "t") ? true: false;
comp_obj_toc.attrib.bullet = false;
comp_obj_toc.has.inline_links = true;
switch (obj_["lev_markup_number"].to!int) {
@@ -6855,6 +6879,7 @@ struct BookIndexReportSection {
comp_obj_heading_.text = "Book Index";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = false;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_book_index";
@@ -6877,6 +6902,7 @@ struct BookIndexReportSection {
comp_obj_heading_.text = "Index";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "bookindex";
@@ -6953,6 +6979,7 @@ struct BookIndexReportSection {
comp_obj_heading_.text = "(skip) there is no Book Index";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.metainfo.heading_lev_markup = 1;
@@ -7096,6 +7123,7 @@ struct NotesSection {
comp_obj_heading_.text = "Endnotes";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = false;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_endnotes";
@@ -7117,6 +7145,7 @@ struct NotesSection {
comp_obj_heading_.text = "Endnotes";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.tags.segment_anchor_tag_epub = "endnotes";
@@ -7140,6 +7169,7 @@ struct NotesSection {
comp_obj_heading_.text = "(skip) there are no Endnotes";
comp_obj_heading_.metainfo.ocn = 0;
comp_obj_heading_.metainfo.identifier = "";
+ comp_obj_heading_.metainfo.dummy_heading = true;
comp_obj_heading_.metainfo.object_number_off = true;
comp_obj_heading_.metainfo.object_number_type = 0;
comp_obj_heading_.metainfo.heading_lev_markup = 1;
@@ -7157,6 +7187,7 @@ struct NotesSection {
comp_obj_endnote_.metainfo.is_a = "endnote";
comp_obj_endnote_.metainfo.ocn = 0;
comp_obj_endnote_.metainfo.identifier = "";
+ // comp_obj_heading_.metainfo.dummy_heading = false;
comp_obj_heading_.metainfo.object_number_off = true; // check
comp_obj_heading_.metainfo.object_number_type = 0; // check
comp_obj_endnote_.attrib.indent_hang = 0;
@@ -7404,10 +7435,11 @@ struct NodeStructureMetadata {
#+name: meta_emitters_metadata
#+BEGIN_SRC d
- ObjGenericComposite node_emitter_heading(T,Lm,Lc,TaB,TaL,TA,N,C,P,LA,I,PSn,fNr,fNs,fL)(
+ ObjGenericComposite node_emitter_heading(T,Lm,Lc,Hd,TaB,TaL,TA,N,C,P,LA,I,PSn,fNr,fNs,fL)(
T _text,
Lm lev_markup_number,
Lc lev_collapsed_number,
+ Hd dummy_heading_status,
TaB tag_in_seg,
TaL lev_anchor_tag,
TA tag_assoc,
@@ -7544,6 +7576,7 @@ struct NodeStructureMetadata {
_comp_obj_heading_.text = _text.to!string.strip;
_comp_obj_heading_.metainfo.ocn = obj_cite_digits.object_number;
_comp_obj_heading_.metainfo.identifier = obj_cite_digits.identifier;
+ _comp_obj_heading_.metainfo.dummy_heading = (dummy_heading_status == "t") ? true: false;
_comp_obj_heading_.metainfo.object_number_off = obj_cite_digits.off;
// _comp_obj_heading_.metainfo.o_n_book_index = obj_cite_digits.bkidx;
_comp_obj_heading_.metainfo.object_number_type = obj_cite_digits.type;
@@ -7958,6 +7991,7 @@ struct DocObj_MetaInfo_ {
}
return _out;
}
+ bool dummy_heading = false;
int[] markedup_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
int[] collapsed_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
int[] dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,];