diff options
-rw-r--r-- | org/ao_abstract_doc_source.org | 224 | ||||
-rw-r--r-- | org/ao_output_debugs.org | 8 | ||||
-rw-r--r-- | org/output.org | 105 | ||||
-rw-r--r-- | src/sdp/ao_abstract_doc_source.d | 131 | ||||
-rw-r--r-- | src/sdp/ao_object_setter.d | 2 | ||||
-rw-r--r-- | src/sdp/output_html.d | 91 |
6 files changed, 333 insertions, 228 deletions
diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org index c11193c..c4733cc 100644 --- a/org/ao_abstract_doc_source.org +++ b/org/ao_abstract_doc_source.org @@ -319,11 +319,12 @@ string toc_txt_; an_object["glossary_nugget"] = ""; an_object["blurb_nugget"] = ""; comp_obj_heading_ = comp_obj_heading_.init; -comp_obj_heading_.use = "content"; -comp_obj_heading_.of = "para"; +comp_obj_heading_.use = "body"; +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_.segment_anchor_tag = "toc"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -453,11 +454,12 @@ if there is a glossary section you need to: an_object_key="glossary_nugget"; // if (matchFirst(line, rgx.heading_glossary)) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -465,11 +467,12 @@ if there is a glossary section you need to: comp_obj_heading_.parent_lev_markup = 0; the_glossary_section ~= comp_obj_heading_; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + 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_.segment_anchor_tag = "glossary"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -483,12 +486,12 @@ if there is a glossary section you need to: } else { _para_match_(line, an_object, an_object_key, indent, bullet, type, line_occur); comp_obj_para = comp_obj_para.init; - comp_obj_para.use = "content"; - comp_obj_para.of = "para"; - comp_obj_para.is_a = "para"; + comp_obj_para.use = "backmatter"; + comp_obj_para.is_of = "para"; + comp_obj_para.is_a = "glossary"; comp_obj_para.text = to!string(line).strip; comp_obj_para.ocn = 0; - comp_obj_para.obj_cite_number = "0"; + comp_obj_para.obj_cite_number = ""; comp_obj_para.indent_hang = indent["hang_position"]; comp_obj_para.indent_base = indent["base_position"]; comp_obj_para.bullet = bullet; @@ -535,11 +538,12 @@ if there is a blurb section you need to: an_object_key="blurb_nugget"; if (matchFirst(line, rgx.heading_blurb)) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -547,11 +551,12 @@ if there is a blurb section you need to: comp_obj_heading_.parent_lev_markup = 0; the_blurb_section ~= comp_obj_heading_; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + 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_.segment_anchor_tag = "blurb"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -563,11 +568,12 @@ if there is a blurb section you need to: } else if ((matchFirst(line, rgx.heading)) && (opt_action_bool["backmatter"] && opt_action_bool["section_blurb"])) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + comp_obj_heading_.is_of = "para"; comp_obj_heading_.is_a = "heading"; comp_obj_heading_.text = to!string(line); comp_obj_heading_.ocn = 0; + comp_obj_heading_.obj_cite_number = ""; comp_obj_heading_.segment_anchor_tag = "blurb"; comp_obj_heading_.marked_up_level = to!string(an_object["lev"]); comp_obj_heading_.heading_lev_markup = to!int(an_object["lev_markup_number"]); // make int, remove need to conv @@ -578,12 +584,12 @@ if there is a blurb section you need to: } else { _para_match_(line, an_object, an_object_key, indent, bullet, type, line_occur); comp_obj_para = comp_obj_para.init; - comp_obj_para.use = "content"; - comp_obj_para.of = "para"; - comp_obj_para.is_a = "para"; + comp_obj_para.use = "backmatter"; + comp_obj_para.is_of = "para"; + comp_obj_para.is_a = "blurb"; comp_obj_para.text = to!string(line).strip; comp_obj_para.ocn = obj_cite_number; - comp_obj_para.obj_cite_number = to!string(obj_cite_number); + comp_obj_para.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_para.indent_hang = indent["hang_position"]; comp_obj_para.indent_base = indent["base_position"]; comp_obj_para.bullet = bullet; @@ -734,7 +740,7 @@ if ((matchFirst(line, rgx.book_index)) an_object[an_object_key] ~= line ~= "\n"; comp_obj_comment = comp_obj_comment.init; comp_obj_comment.use = "comment"; - comp_obj_comment.of = "comment"; + 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; @@ -936,12 +942,12 @@ if ((type["heading"] == State.on) an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0]; anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_para = comp_obj_para.init; - comp_obj_para.use = "content"; - comp_obj_para.of = "para"; + comp_obj_para.use = "body"; + comp_obj_para.is_of = "para"; comp_obj_para.is_a = "para"; comp_obj_para.text = to!string(an_object["substantive"]).strip; comp_obj_para.ocn = obj_cite_number; - comp_obj_para.obj_cite_number = to!string(obj_cite_number); + comp_obj_para.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_para.indent_hang = indent["hang_position"]; comp_obj_para.indent_base = indent["base_position"]; comp_obj_para.bullet = bullet; @@ -1046,13 +1052,13 @@ debug(endnotes) { #+name: abs_post #+BEGIN_SRC d if (an_object["glossary_nugget"].length == 0) { - writeln("no gloss"); comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -1084,11 +1090,12 @@ auto biblio_ordered = #+BEGIN_SRC d if (biblio_ordered.length > 0) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -1097,11 +1104,12 @@ if (biblio_ordered.length > 0) { the_bibliography_section ~= comp_obj_heading_; // --- comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + 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_.segment_anchor_tag = "bibliography"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -1112,11 +1120,12 @@ if (biblio_ordered.length > 0) { the_bibliography_section ~= comp_obj_heading_; } else { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -1147,12 +1156,12 @@ foreach (entry; biblio_ordered) { ((entry["url"].str.empty) ? "" : ", [" ~ entry["url"].str ~ "]"), ); comp_obj_para = comp_obj_para.init; - comp_obj_para.use = "content"; - comp_obj_para.of = "para"; + comp_obj_para.use = "backmatter"; + comp_obj_para.is_of = "para"; comp_obj_para.is_a = "bibliography"; comp_obj_para.text = to!string(out_).strip; comp_obj_para.ocn = 0; - comp_obj_para.obj_cite_number = "0"; + comp_obj_para.obj_cite_number = ""; comp_obj_para.indent_hang = 0; comp_obj_para.indent_base = 1; comp_obj_para.bullet = bullet; @@ -1229,13 +1238,13 @@ debug(bookindex) { // bookindex #+name: abs_post #+BEGIN_SRC d if (an_object["blurb_nugget"].length == 0) { - writeln("no blurb"); comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "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_heading_.segment_anchor_tag = "bibliography"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -1263,11 +1272,11 @@ indent=[ "base_position" : 1, ]; comp_obj_toc = comp_obj_toc.init; -comp_obj_toc.use = "content"; -comp_obj_toc.of = "para"; +comp_obj_toc.use = "body"; +comp_obj_toc.is_of = "para"; comp_obj_toc.is_a = "toc"; comp_obj_toc.ocn = 0; -comp_obj_toc.obj_cite_number = "0"; +comp_obj_toc.obj_cite_number = ""; comp_obj_toc.indent_hang = indent["hang_position"]; comp_obj_toc.indent_base = indent["base_position"]; comp_obj_toc.bullet = false; @@ -1401,12 +1410,17 @@ auto document_the = [ ]; #+END_SRC -*** misc heading +*** clean out structure #+name: abs_post +destroy(the_document_head_section); +destroy(the_document_table_of_contents_section); destroy(the_document_body_section); destroy(the_endnotes_section); +destroy(the_glossary_section); +destroy(the_bibliography_section); destroy(the_bookindex_section); +destroy(the_blurb_section); #+END_SRC *** [#A] return document tuple :return:tuple: @@ -1973,9 +1987,9 @@ void _poem_block_( an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0]; anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; - comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.use = "body"; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "verse"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -2024,9 +2038,9 @@ void _poem_block_( an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0]; anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; - comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.use = "body"; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "verse"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -2060,9 +2074,9 @@ void _poem_block_( an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0]; anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; - comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.use = "body"; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "verse"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -2111,9 +2125,9 @@ void _poem_block_( an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0]; anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; - comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.use = "body"; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "verse"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -2339,9 +2353,9 @@ void _block_flag_line_empty_( an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0]; anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_code = comp_obj_code.init; - comp_obj_code.use = "content"; - comp_obj_code.of = "block"; - comp_obj_code.is_a = an_object["is"]; + comp_obj_code.use = "body"; + comp_obj_code.is_of = "block"; + comp_obj_code.is_a = "code"; comp_obj_code.ocn = obj_cite_number; comp_obj_code.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_code.text = an_object["substantive"]; @@ -2367,8 +2381,8 @@ void _block_flag_line_empty_( an_object["is"] ); comp_obj_poem_ocn = comp_obj_poem_ocn.init; - comp_obj_poem_ocn.use = "content"; - comp_obj_poem_ocn.of = "block"; + comp_obj_poem_ocn.use = "body"; + comp_obj_poem_ocn.is_of = "block"; comp_obj_poem_ocn.is_a = "poem"; comp_obj_poem_ocn.ocn = obj_cite_number; comp_obj_poem_ocn.obj_cite_number = (obj_cite_number_poem["start"], obj_cite_number_poem["end"]); // not sure about this @@ -2400,9 +2414,9 @@ void _block_flag_line_empty_( an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0]; anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; - comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.use = "body"; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "table"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -2434,9 +2448,9 @@ void _block_flag_line_empty_( an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0]; anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; - comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.use = "body"; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "group"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -2467,9 +2481,9 @@ void _block_flag_line_empty_( an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0]; anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; - comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.use = "body"; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "block"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -2501,9 +2515,9 @@ void _block_flag_line_empty_( an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0]; anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; - comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.use = "body"; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "quote"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -3311,11 +3325,11 @@ struct ObjInlineMarkup { ); toc_txt_= munge.url_links(toc_txt_); comp_obj_toc = comp_obj_toc.init; - comp_obj_toc.use = "content"; - comp_obj_toc.of = "para"; + comp_obj_toc.use = "body"; + comp_obj_toc.is_of = "para"; comp_obj_toc.is_a = "toc"; comp_obj_toc.ocn = 0; - comp_obj_toc.obj_cite_number = "0"; + comp_obj_toc.obj_cite_number = ""; comp_obj_toc.indent_hang = indent["hang_position"]; comp_obj_toc.indent_base = indent["base_position"]; comp_obj_toc.bullet = false; @@ -3327,11 +3341,11 @@ struct ObjInlineMarkup { "base_position" : 0, ]; comp_obj_toc = comp_obj_toc.init; - comp_obj_toc.use = "content"; - comp_obj_toc.of = "para"; + comp_obj_toc.use = "body"; + comp_obj_toc.is_of = "para"; comp_obj_toc.is_a = "toc"; comp_obj_toc.ocn = 0; - comp_obj_toc.obj_cite_number = "0"; + comp_obj_toc.obj_cite_number = ""; comp_obj_toc.indent_hang = indent["hang_position"]; comp_obj_toc.indent_base = indent["base_position"]; comp_obj_toc.bullet = false; @@ -3339,11 +3353,11 @@ struct ObjInlineMarkup { the_table_of_contents_section["scroll"] ~= comp_obj_toc; } comp_obj_toc = comp_obj_toc.init; - comp_obj_toc.use = "content"; - comp_obj_toc.of = "para"; + comp_obj_toc.use = "body"; + comp_obj_toc.is_of = "para"; comp_obj_toc.is_a = "toc"; comp_obj_toc.ocn = 0; - comp_obj_toc.obj_cite_number = "0"; + comp_obj_toc.obj_cite_number = ""; comp_obj_toc.bullet = false; switch (to!int(obj_["lev_markup_number"])) { case 0: @@ -4050,7 +4064,7 @@ struct BookIndexReportIndent { #+name: ao_emitters_book_index_report_section #+BEGIN_SRC d struct BookIndexReportSection { - int mkn, skn; + int mkn, skn; auto rgx = Rgx(); auto munge = ObjInlineMarkupMunge(); #+END_SRC @@ -4113,11 +4127,12 @@ struct BookIndexReportSection { && (opt_action_bool["backmatter"] && opt_action_bool["section_bookindex"])) { string bi_tmp_seg, bi_tmp_scroll; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -4128,11 +4143,12 @@ struct BookIndexReportSection { ++obj_cite_number; ++mkn; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + 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_.segment_anchor_tag = "bookindex"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -4176,12 +4192,12 @@ struct BookIndexReportSection { bi_tmp_scroll = replaceFirst(bi_tmp_scroll, rgx.trailing_linebreak, ""); bi_tmp_seg = replaceFirst(bi_tmp_seg, rgx.trailing_linebreak, ""); comp_obj_para = comp_obj_para.init; - comp_obj_para.use = "content"; - comp_obj_para.of = "para"; - comp_obj_para.is_a = "para"; + comp_obj_para.use = "backmatter"; + comp_obj_para.is_of = "para"; + comp_obj_para.is_a = "bookindex"; comp_obj_para.text = to!string(bi_tmp_scroll).strip; comp_obj_para.ocn = obj_cite_number; - comp_obj_para.obj_cite_number = to!string(obj_cite_number); + comp_obj_para.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_para.indent_hang = 0; comp_obj_para.indent_base = 1; comp_obj_para.bullet = false; @@ -4195,6 +4211,7 @@ struct BookIndexReportSection { 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -4328,11 +4345,12 @@ struct NotesSection { if ((endnotes_["seg"].length > 0) && (opt_action_bool["backmatter"] && opt_action_bool["section_endnotes"])) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -4343,11 +4361,12 @@ struct NotesSection { ++obj_cite_number; ++mkn; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "backmatter"; + 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_.segment_anchor_tag = "endnotes"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -4361,11 +4380,12 @@ struct NotesSection { ++mkn; } else { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.use = "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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -4377,11 +4397,11 @@ struct NotesSection { if (opt_action_bool["backmatter"] && opt_action_bool["section_endnotes"]) { ObjGenericComposite comp_obj_endnote_; comp_obj_endnote_ = comp_obj_endnote_.init; - comp_obj_endnote_.use = "content"; - comp_obj_endnote_.of = "para"; + comp_obj_endnote_.use = "backmatter"; + comp_obj_endnote_.is_of = "para"; comp_obj_endnote_.is_a = "endnote"; comp_obj_endnote_.ocn = 0; - comp_obj_endnote_.obj_cite_number = "0"; + comp_obj_heading_.obj_cite_number = ""; comp_obj_endnote_.indent_hang = 0; comp_obj_endnote_.indent_base = 0; comp_obj_endnote_.bullet = false; @@ -4714,8 +4734,8 @@ struct NodeStructureMetadata { } ObjGenericComposite _comp_obj_heading_; _comp_obj_heading_ = _comp_obj_heading_.init; - _comp_obj_heading_.use = "content"; - _comp_obj_heading_.of = "para"; + _comp_obj_heading_.use = "body"; + _comp_obj_heading_.is_of = "para"; _comp_obj_heading_.is_a = "heading"; _comp_obj_heading_.text = to!string(_text).strip; _comp_obj_heading_.ocn = obj_cite_number_; @@ -5019,7 +5039,7 @@ struct HeadingAttrib { struct ObjGenericComposite { // size_t id; string use = ""; - string of = ""; + string is_of = ""; string is_a = ""; string text = ""; string obj_cite_number = ""; diff --git a/org/ao_output_debugs.org b/org/ao_output_debugs.org index 28fcef2..a3b74c9 100644 --- a/org/ao_output_debugs.org +++ b/org/ao_output_debugs.org @@ -68,7 +68,7 @@ debug(parent) { ); foreach (key; document_section_keys_sequenced["seg"]) { foreach (obj; contents[key]) { - if (obj.use == "content") { + if (obj.use != "empty") { if (obj.is_a == "heading") { writefln( "%s node: %s heading: %s %s", @@ -96,7 +96,7 @@ debug(dumpdoc) { __LINE__, ); foreach (obj; contents) { - if (obj.use == "content") { + if (obj.use != "empty") { writefln( "[%s][%s]\n%s", obj.obj_cite_number, @@ -376,7 +376,7 @@ debug(objects) { __LINE__, ); foreach (obj; contents) { - if (obj.use == "content") { + if (obj.use != "empty") { writefln( "* [%s][%s] %s", obj.obj_cite_number, @@ -639,7 +639,7 @@ debug(summary) { debug(checkdoc) { foreach (k; document_section_keys_sequenced["seg"]) { foreach (obj; contents[k]) { - if (obj.use == "content") { + if (obj.use != "empty") { if (!empty(obj.obj_cite_number)) { check["last_obj_cite_number"] = obj.obj_cite_number; } diff --git a/org/output.org b/org/output.org index 976fcdd..eae453a 100644 --- a/org/output.org +++ b/org/output.org @@ -150,7 +150,7 @@ auto html_para(O)( if (obj.obj_cite_number.empty) { o = format(q"¶ <div class="substance"> <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> - <p class="%s" attrib="h%si%s">%s + <p class="%s" indent="h%si%s">%s %s </p> </div>¶", @@ -165,7 +165,7 @@ auto html_para(O)( } else { o = format(q"¶ <div class="substance"> <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> - <p class="%s" attrib="h%si%s" id="%s">%s + <p class="%s" indent="h%si%s" id="%s">%s %s </p> </div>¶", @@ -253,7 +253,7 @@ auto html_toc(O)( ) { string o; o = format(q"¶ <div class="substance"> - <p class="%s" attrib="h%si%s"> + <p class="%s" indent="h%si%s"> %s </p> </div>¶", @@ -274,7 +274,7 @@ auto html_endnote(O)( auto ref const O obj, ) { string o; - o = format(q"¶ <p class="%s" attrib="h%si%s"> + o = format(q"¶ <p class="%s" indent="h%si%s"> %s </p>¶", obj.is_a, @@ -319,39 +319,84 @@ void scroll(C)( string[] doc; foreach (part; document_section_keys_sequenced["scroll"]) { foreach (obj; contents[part]) { - if (obj.use == "content") { - switch (obj.is_a) { - case "heading": - body_html ~= html_heading(obj); - break; - case "toc": - body_html ~= html_toc(obj); - break; + if (obj.use == "body") { + switch (obj.is_of) { case "para": - body_html ~= html_para(obj); - break; - case "verse": - body_html ~= html_nugget(obj); - break; - case "group": - body_html ~= html_nugget(obj); + switch (obj.is_a) { + case "heading": + body_html ~= html_heading(obj); + break; + case "toc": + body_html ~= html_toc(obj); + break; + case "para": + body_html ~= html_para(obj); + break; + default: + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + break; + } break; case "block": - body_html ~= html_nugget(obj); - break; - case "quote": - body_html ~= html_nugget(obj); + switch (obj.is_a) { + case "poem": + break; + case "verse": + body_html ~= html_nugget(obj); + break; + case "group": + body_html ~= html_nugget(obj); + break; + case "block": + body_html ~= html_nugget(obj); + break; + case "quote": + body_html ~= html_nugget(obj); + break; + case "table": + body_html ~= html_para(obj); // + break; + case "code": + body_html ~= html_nugget(obj); + break; + default: + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + break; + } break; - case "table": - body_html ~= html_para(obj); - break; - case "code": - body_html ~= html_nugget(obj); + default: + writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); break; - case "endnote": - body_html ~= html_endnote(obj); + } + } else if (obj.use == "backmatter") { + switch (obj.is_of) { + case "para": + switch (obj.is_a) { + case "heading": + body_html ~= html_heading(obj); + break; + case "endnote": + body_html ~= html_endnote(obj); + break; + case "glossary": + body_html ~= html_para(obj); + break; + case "bibliography": + body_html ~= html_para(obj); + break; + case "bookindex": + body_html ~= html_para(obj); + break; + case "blurb": + body_html ~= html_para(obj); + break; + default: + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + break; + } break; default: + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); break; } } diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d index 1580238..0697ae4 100644 --- a/src/sdp/ao_abstract_doc_source.d +++ b/src/sdp/ao_abstract_doc_source.d @@ -161,10 +161,11 @@ template SiSUdocAbstraction() { an_object["blurb_nugget"] = ""; comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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_.segment_anchor_tag = "toc"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -262,10 +263,11 @@ template SiSUdocAbstraction() { if (matchFirst(line, rgx.heading_glossary)) { comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -274,10 +276,11 @@ template SiSUdocAbstraction() { the_glossary_section ~= comp_obj_heading_; comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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_.segment_anchor_tag = "glossary"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -292,11 +295,11 @@ template SiSUdocAbstraction() { _para_match_(line, an_object, an_object_key, indent, bullet, type, line_occur); comp_obj_para = comp_obj_para.init; comp_obj_para.use = "content"; - comp_obj_para.of = "para"; - comp_obj_para.is_a = "para"; + comp_obj_para.is_of = "para"; + comp_obj_para.is_a = "glossary"; comp_obj_para.text = to!string(line).strip; comp_obj_para.ocn = 0; - comp_obj_para.obj_cite_number = "0"; + comp_obj_para.obj_cite_number = ""; comp_obj_para.indent_hang = indent["hang_position"]; comp_obj_para.indent_base = indent["base_position"]; comp_obj_para.bullet = bullet; @@ -331,10 +334,11 @@ template SiSUdocAbstraction() { if (matchFirst(line, rgx.heading_blurb)) { comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -343,10 +347,11 @@ template SiSUdocAbstraction() { the_blurb_section ~= comp_obj_heading_; comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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_.segment_anchor_tag = "blurb"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -359,10 +364,11 @@ template SiSUdocAbstraction() { && (opt_action_bool["backmatter"] && opt_action_bool["section_blurb"])) { comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.is_of = "para"; comp_obj_heading_.is_a = "heading"; comp_obj_heading_.text = to!string(line); comp_obj_heading_.ocn = 0; + comp_obj_heading_.obj_cite_number = ""; comp_obj_heading_.segment_anchor_tag = "blurb"; comp_obj_heading_.marked_up_level = to!string(an_object["lev"]); comp_obj_heading_.heading_lev_markup = to!int(an_object["lev_markup_number"]); // make int, remove need to conv @@ -374,11 +380,11 @@ template SiSUdocAbstraction() { _para_match_(line, an_object, an_object_key, indent, bullet, type, line_occur); comp_obj_para = comp_obj_para.init; comp_obj_para.use = "content"; - comp_obj_para.of = "para"; + comp_obj_para.is_of = "para"; comp_obj_para.is_a = "para"; comp_obj_para.text = to!string(line).strip; comp_obj_para.ocn = obj_cite_number; - comp_obj_para.obj_cite_number = to!string(obj_cite_number); + comp_obj_para.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_para.indent_hang = indent["hang_position"]; comp_obj_para.indent_base = indent["base_position"]; comp_obj_para.bullet = bullet; @@ -465,7 +471,7 @@ template SiSUdocAbstraction() { an_object[an_object_key] ~= line ~= "\n"; comp_obj_comment = comp_obj_comment.init; comp_obj_comment.use = "comment"; - comp_obj_comment.of = "comment"; + 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; @@ -628,11 +634,11 @@ template SiSUdocAbstraction() { anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_para = comp_obj_para.init; comp_obj_para.use = "content"; - comp_obj_para.of = "para"; + comp_obj_para.is_of = "para"; comp_obj_para.is_a = "para"; comp_obj_para.text = to!string(an_object["substantive"]).strip; comp_obj_para.ocn = obj_cite_number; - comp_obj_para.obj_cite_number = to!string(obj_cite_number); + comp_obj_para.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_para.indent_hang = indent["hang_position"]; comp_obj_para.indent_base = indent["base_position"]; comp_obj_para.bullet = bullet; @@ -717,10 +723,11 @@ template SiSUdocAbstraction() { writeln("no gloss"); comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -743,10 +750,11 @@ template SiSUdocAbstraction() { if (biblio_ordered.length > 0) { comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -756,10 +764,11 @@ template SiSUdocAbstraction() { // --- comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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_.segment_anchor_tag = "bibliography"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -771,10 +780,11 @@ template SiSUdocAbstraction() { } else { comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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_.marked_up_level = "B"; comp_obj_heading_.heading_lev_markup = 1; comp_obj_heading_.heading_lev_collapsed = 1; @@ -800,11 +810,11 @@ template SiSUdocAbstraction() { ); comp_obj_para = comp_obj_para.init; comp_obj_para.use = "content"; - comp_obj_para.of = "para"; + comp_obj_para.is_of = "para"; comp_obj_para.is_a = "bibliography"; comp_obj_para.text = to!string(out_).strip; comp_obj_para.ocn = 0; - comp_obj_para.obj_cite_number = "0"; + comp_obj_para.obj_cite_number = ""; comp_obj_para.indent_hang = 0; comp_obj_para.indent_base = 1; comp_obj_para.bullet = bullet; @@ -836,10 +846,11 @@ template SiSUdocAbstraction() { writeln("no blurb"); comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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_heading_.segment_anchor_tag = "bibliography"; comp_obj_heading_.marked_up_level = "1"; comp_obj_heading_.heading_lev_markup = 4; @@ -862,10 +873,10 @@ template SiSUdocAbstraction() { ]; comp_obj_toc = comp_obj_toc.init; comp_obj_toc.use = "content"; - comp_obj_toc.of = "para"; + comp_obj_toc.is_of = "para"; comp_obj_toc.is_a = "toc"; comp_obj_toc.ocn = 0; - comp_obj_toc.obj_cite_number = "0"; + comp_obj_toc.obj_cite_number = ""; comp_obj_toc.indent_hang = indent["hang_position"]; comp_obj_toc.indent_base = indent["base_position"]; comp_obj_toc.bullet = false; @@ -1420,8 +1431,8 @@ template SiSUdocAbstraction() { anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "verse"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -1471,8 +1482,8 @@ template SiSUdocAbstraction() { anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "verse"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -1507,8 +1518,8 @@ template SiSUdocAbstraction() { anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "verse"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -1558,8 +1569,8 @@ template SiSUdocAbstraction() { anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "verse"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -1756,8 +1767,8 @@ template SiSUdocAbstraction() { anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_code = comp_obj_code.init; comp_obj_code.use = "content"; - comp_obj_code.of = "block"; - comp_obj_code.is_a = an_object["is"]; + comp_obj_code.is_of = "block"; + comp_obj_code.is_a = "code"; comp_obj_code.ocn = obj_cite_number; comp_obj_code.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_code.text = an_object["substantive"]; @@ -1784,7 +1795,7 @@ template SiSUdocAbstraction() { ); comp_obj_poem_ocn = comp_obj_poem_ocn.init; comp_obj_poem_ocn.use = "content"; - comp_obj_poem_ocn.of = "block"; + comp_obj_poem_ocn.is_of = "block"; comp_obj_poem_ocn.is_a = "poem"; comp_obj_poem_ocn.ocn = obj_cite_number; comp_obj_poem_ocn.obj_cite_number = (obj_cite_number_poem["start"], obj_cite_number_poem["end"]); // not sure about this @@ -1817,8 +1828,8 @@ template SiSUdocAbstraction() { anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "table"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -1851,8 +1862,8 @@ template SiSUdocAbstraction() { anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "group"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -1884,8 +1895,8 @@ template SiSUdocAbstraction() { anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "block"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -1918,8 +1929,8 @@ template SiSUdocAbstraction() { anchor_tags = substantive_object_and_anchor_tags_tuple[1]; comp_obj_block = comp_obj_block.init; comp_obj_block.use = "content"; - comp_obj_block.of = "block"; - comp_obj_block.is_a = an_object["is"]; + comp_obj_block.is_of = "block"; + comp_obj_block.is_a = "quote"; comp_obj_block.ocn = obj_cite_number; comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_block.text = an_object["substantive"]; @@ -2667,10 +2678,10 @@ template SiSUdocAbstraction() { toc_txt_= munge.url_links(toc_txt_); comp_obj_toc = comp_obj_toc.init; comp_obj_toc.use = "content"; - comp_obj_toc.of = "para"; + comp_obj_toc.is_of = "para"; comp_obj_toc.is_a = "toc"; comp_obj_toc.ocn = 0; - comp_obj_toc.obj_cite_number = "0"; + comp_obj_toc.obj_cite_number = ""; comp_obj_toc.indent_hang = indent["hang_position"]; comp_obj_toc.indent_base = indent["base_position"]; comp_obj_toc.bullet = false; @@ -2683,10 +2694,10 @@ template SiSUdocAbstraction() { ]; comp_obj_toc = comp_obj_toc.init; comp_obj_toc.use = "content"; - comp_obj_toc.of = "para"; + comp_obj_toc.is_of = "para"; comp_obj_toc.is_a = "toc"; comp_obj_toc.ocn = 0; - comp_obj_toc.obj_cite_number = "0"; + comp_obj_toc.obj_cite_number = ""; comp_obj_toc.indent_hang = indent["hang_position"]; comp_obj_toc.indent_base = indent["base_position"]; comp_obj_toc.bullet = false; @@ -2695,10 +2706,10 @@ template SiSUdocAbstraction() { } comp_obj_toc = comp_obj_toc.init; comp_obj_toc.use = "content"; - comp_obj_toc.of = "para"; + comp_obj_toc.is_of = "para"; comp_obj_toc.is_a = "toc"; comp_obj_toc.ocn = 0; - comp_obj_toc.obj_cite_number = "0"; + comp_obj_toc.obj_cite_number = ""; comp_obj_toc.bullet = false; switch (to!int(obj_["lev_markup_number"])) { case 0: @@ -3260,7 +3271,7 @@ template SiSUdocAbstraction() { } } struct BookIndexReportSection { - int mkn, skn; + int mkn, skn; auto rgx = Rgx(); auto munge = ObjInlineMarkupMunge(); auto bookindex_write_section( @@ -3312,7 +3323,7 @@ template SiSUdocAbstraction() { string bi_tmp_seg, bi_tmp_scroll; comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.is_of = "para"; comp_obj_heading_.is_a = "heading"; comp_obj_heading_.text = "Book Index"; comp_obj_heading_.ocn = 0; @@ -3327,7 +3338,7 @@ template SiSUdocAbstraction() { ++mkn; comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.is_of = "para"; comp_obj_heading_.is_a = "heading"; comp_obj_heading_.text = "Index"; comp_obj_heading_.ocn = 0; @@ -3375,11 +3386,11 @@ template SiSUdocAbstraction() { bi_tmp_seg = replaceFirst(bi_tmp_seg, rgx.trailing_linebreak, ""); comp_obj_para = comp_obj_para.init; comp_obj_para.use = "content"; - comp_obj_para.of = "para"; - comp_obj_para.is_a = "para"; + comp_obj_para.is_of = "para"; + comp_obj_para.is_a = "bookindex"; comp_obj_para.text = to!string(bi_tmp_scroll).strip; comp_obj_para.ocn = obj_cite_number; - comp_obj_para.obj_cite_number = to!string(obj_cite_number); + comp_obj_para.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); comp_obj_para.indent_hang = 0; comp_obj_para.indent_base = 1; comp_obj_para.bullet = false; @@ -3498,7 +3509,7 @@ template SiSUdocAbstraction() { && (opt_action_bool["backmatter"] && opt_action_bool["section_endnotes"])) { comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.is_of = "para"; comp_obj_heading_.is_a = "heading"; comp_obj_heading_.text = "Endnotes"; comp_obj_heading_.ocn = 0; @@ -3513,7 +3524,7 @@ template SiSUdocAbstraction() { ++mkn; comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + comp_obj_heading_.is_of = "para"; comp_obj_heading_.is_a = "heading"; comp_obj_heading_.text = "Endnotes"; comp_obj_heading_.ocn = 0; @@ -3531,7 +3542,7 @@ template SiSUdocAbstraction() { } else { comp_obj_heading_ = comp_obj_heading_.init; comp_obj_heading_.use = "content"; - comp_obj_heading_.of = "para"; + 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; @@ -3547,10 +3558,10 @@ template SiSUdocAbstraction() { ObjGenericComposite comp_obj_endnote_; comp_obj_endnote_ = comp_obj_endnote_.init; comp_obj_endnote_.use = "content"; - comp_obj_endnote_.of = "para"; + comp_obj_endnote_.is_of = "para"; comp_obj_endnote_.is_a = "endnote"; comp_obj_endnote_.ocn = 0; - comp_obj_endnote_.obj_cite_number = "0"; + comp_obj_heading_.obj_cite_number = ""; comp_obj_endnote_.indent_hang = 0; comp_obj_endnote_.indent_base = 0; comp_obj_endnote_.bullet = false; @@ -3824,7 +3835,7 @@ template SiSUdocAbstraction() { ObjGenericComposite _comp_obj_heading_; _comp_obj_heading_ = _comp_obj_heading_.init; _comp_obj_heading_.use = "content"; - _comp_obj_heading_.of = "para"; + _comp_obj_heading_.is_of = "para"; _comp_obj_heading_.is_a = "heading"; _comp_obj_heading_.text = to!string(_text).strip; _comp_obj_heading_.ocn = obj_cite_number_; diff --git a/src/sdp/ao_object_setter.d b/src/sdp/ao_object_setter.d index f6f7641..13bcc36 100644 --- a/src/sdp/ao_object_setter.d +++ b/src/sdp/ao_object_setter.d @@ -17,7 +17,7 @@ template ObjectSetter() { struct ObjGenericComposite { // size_t id; string use = ""; - string of = ""; + string is_of = ""; string is_a = ""; string text = ""; string obj_cite_number = ""; diff --git a/src/sdp/output_html.d b/src/sdp/output_html.d index 42ecf0a..5cd1b26 100644 --- a/src/sdp/output_html.d +++ b/src/sdp/output_html.d @@ -43,7 +43,7 @@ template SiSUoutputHTML() { if (obj.obj_cite_number.empty) { o = format(q"¶ <div class="substance"> <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> - <p class="%s" attrib="h%si%s">%s + <p class="%s" indent="h%si%s">%s %s </p> </div>¶", @@ -58,7 +58,7 @@ template SiSUoutputHTML() { } else { o = format(q"¶ <div class="substance"> <label class="ocn"><a href="#%s" class="lnkocn">%s</a></label> - <p class="%s" attrib="h%si%s" id="%s">%s + <p class="%s" indent="h%si%s" id="%s">%s %s </p> </div>¶", @@ -128,7 +128,7 @@ template SiSUoutputHTML() { ) { string o; o = format(q"¶ <div class="substance"> - <p class="%s" attrib="h%si%s"> + <p class="%s" indent="h%si%s"> %s </p> </div>¶", @@ -143,7 +143,7 @@ template SiSUoutputHTML() { auto ref const O obj, ) { string o; - o = format(q"¶ <p class="%s" attrib="h%si%s"> + o = format(q"¶ <p class="%s" indent="h%si%s"> %s </p>¶", obj.is_a, @@ -176,38 +176,67 @@ template SiSUoutputHTML() { foreach (part; document_section_keys_sequenced["scroll"]) { foreach (obj; contents[part]) { if (obj.use == "content") { - switch (obj.is_a) { - case "heading": - body_html ~= html_heading(obj); - break; - case "toc": - body_html ~= html_toc(obj); - break; + switch (obj.is_of) { case "para": - body_html ~= html_para(obj); - break; - case "verse": - body_html ~= html_nugget(obj); - break; - case "group": - body_html ~= html_nugget(obj); + switch (obj.is_a) { + case "heading": + body_html ~= html_heading(obj); + break; + case "toc": + body_html ~= html_toc(obj); + break; + case "para": + body_html ~= html_para(obj); + break; + case "endnote": + body_html ~= html_endnote(obj); + break; + case "glossary": + body_html ~= html_para(obj); + break; + case "bibliography": + body_html ~= html_para(obj); + break; + case "bookindex": + body_html ~= html_para(obj); + break; + case "blurb": + body_html ~= html_para(obj); + break; + default: + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + break; + } break; case "block": - body_html ~= html_nugget(obj); - break; - case "quote": - body_html ~= html_nugget(obj); - break; - case "table": - body_html ~= html_para(obj); - break; - case "code": - body_html ~= html_nugget(obj); - break; - case "endnote": - body_html ~= html_endnote(obj); + switch (obj.is_a) { + case "poem": + break; + case "verse": + body_html ~= html_nugget(obj); + break; + case "group": + body_html ~= html_nugget(obj); + break; + case "block": + body_html ~= html_nugget(obj); + break; + case "quote": + body_html ~= html_nugget(obj); + break; + case "table": + body_html ~= html_para(obj); // + break; + case "code": + body_html ~= html_nugget(obj); + break; + default: + writeln(__FILE__, ":", __LINE__, ": ", obj.is_a); + break; + } break; default: + writeln(__FILE__, ":", __LINE__, ": ", obj.is_of); break; } } |