aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2020-10-22 10:57:37 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2020-10-23 09:50:55 -0400
commitbbe133420aacf1ed7fc9a88702580be1782a1639 (patch)
tree2f3a88c7f62791d214b2745758974a032a48a5a6 /org
parentproject nix shell(s) (diff)
org mode, code-block names
Diffstat (limited to 'org')
-rw-r--r--org/in_source_files.org12
-rw-r--r--org/metaverse.org4652
-rw-r--r--org/spine.org64
-rw-r--r--org/spine_build_scaffold.org234
4 files changed, 2484 insertions, 2478 deletions
diff --git a/org/in_source_files.org b/org/in_source_files.org
index 86b0607..2465541 100644
--- a/org/in_source_files.org
+++ b/org/in_source_files.org
@@ -48,15 +48,15 @@ import
<<imports_spine>>,
doc_reform.meta.rgx;
<<meta_config_file_in>>
-<<meta_config_file_hub_0>>
-<<meta_config_file_hub_1>>
-<<meta_config_file_hub_2>>
+<<meta_config_file_hub_read_site_config>>
+<<meta_config_file_hub_read_document_config>>
+<<meta_config_file_hub_read_site_yaml>>
#+END_SRC
*** 0. read config files (config local site & dr document make) (yaml)
**** 1. site configuration
-#+NAME: meta_config_file_hub_0
+#+NAME: meta_config_file_hub_read_site_config
#+BEGIN_SRC d
template readConfigSite() {
@system final auto readConfigSite(C,O)(C _conf_file_details, O _opt_action) {
@@ -170,7 +170,7 @@ webserv:
**** 2. document make/config
-#+NAME: meta_config_file_hub_1
+#+NAME: meta_config_file_hub_read_document_config
#+BEGIN_SRC d
static template readConfigDoc() {
import
@@ -226,7 +226,7 @@ static template readConfigDoc() {
*** YAML config (config local site & dr document make) :file:config:hub:
-#+NAME: meta_config_file_hub_2
+#+NAME: meta_config_file_hub_read_site_yaml
#+BEGIN_SRC d
static template configReadSiteYAML() {
import
diff --git a/org/metaverse.org b/org/metaverse.org
index 668ac15..cec377e 100644
--- a/org/metaverse.org
+++ b/org/metaverse.org
@@ -69,77 +69,77 @@ template docAbstraction() {
} else if (!matchFirst(line, rgx.skip_from_regular_parse)) { /+ object other than "code block" object +/
/+ (includes regular text paragraph, headings & blocks other than code) +/
/+ heading, glossary, blurb, poem, group, block, quote, table +/
- <<abs_in_loop_body_non_code_obj_0>>
- <<abs_in_loop_body_non_code_obj_1>>
- <<abs_in_loop_body_non_code_obj_2>>
- <<abs_in_loop_body_non_code_obj_3>>
- <<abs_in_loop_body_non_code_obj_4>>
- <<abs_in_loop_body_non_code_obj_5>>
- <<abs_in_loop_body_non_code_obj_6>>
- <<abs_in_loop_body_non_code_obj_7>>
- <<abs_in_loop_body_non_code_obj_8>>
- <<abs_in_loop_body_non_code_obj_9>>
+ <<abs_in_loop_body_non_code_obj_fontface_markup>>
+ <<abs_in_loop_body_non_code_obj_in_biblio>>
+ <<abs_in_loop_body_non_code_obj_in_glossary>>
+ <<abs_in_loop_body_non_code_obj_in_blurb>>
+ <<abs_in_loop_body_non_code_obj_in_block>>
+ <<abs_in_loop_body_non_code_obj_in_block_quote>>
+ <<abs_in_loop_body_non_code_obj_in_block_group>>
+ <<abs_in_loop_body_non_code_obj_in_block_block>>
+ <<abs_in_loop_body_non_code_obj_in_block_poem>>
+ <<abs_in_loop_body_non_code_obj_in_block_table>>
} else { /+ not within a block group +/
<<abs_in_loop_body_open_block_obj_assert>>
if (line.matchFirst(rgx.block_open)) {
<<abs_in_loop_body_open_block_obj>>
} else if (!line.empty) { /+ line not empty +/
/+ non blocks (headings, paragraphs) & closed blocks +/
- <<abs_in_loop_body_not_block_obj_0>>
- <<abs_in_loop_body_not_block_obj_1>>
- <<abs_in_loop_body_not_block_obj_2>>
- <<abs_in_loop_body_not_block_obj_3>>
- <<abs_in_loop_body_not_block_obj_4>>
- <<abs_in_loop_body_not_block_obj_5>>
- <<abs_in_loop_body_not_block_obj_6>>
+ <<abs_in_loop_body_not_block_obj_assert>>
+ <<abs_in_loop_body_not_block_obj_bookindex>>
+ <<abs_in_loop_body_not_block_obj_not_bookindex>>
+ <<abs_in_loop_body_not_block_obj_not_bookindex_a_comment>>
+ <<abs_in_loop_body_not_block_obj_not_bookindex_a_para_type>>
+ <<abs_in_loop_body_not_block_obj_not_bookindex_a_heading>>
+ <<abs_in_loop_body_not_block_obj_not_bookindex_a_para>>
+ <<abs_in_loop_body_not_block_obj_not_bookindex_close>>
} else if (pith["block_state"] == eN.blk_state.closing) { /+ line empty, with blocks flag +/
<<abs_in_loop_body_not_block_obj_line_empty_blocks_flags>>
} else { /+ line.empty, post contents, empty variables: +/
- <<abs_in_loop_body_not_block_obj_line_empty_0>>
- <<abs_in_loop_body_not_block_obj_line_empty_1>>
- <<abs_in_loop_body_not_block_obj_line_empty_2>>
+ <<abs_in_loop_body_not_block_obj_line_empty_assert>>
+ <<abs_in_loop_body_not_block_obj_line_empty_heading_obj>>
+ <<abs_in_loop_body_not_block_obj_line_empty_para_obj>>
} // close else for line empty
} // close else for not the above
} // close after non code, other blocks or regular text
- <<abs_in_loop_body_01>>
+ <<abs_in_loop_body_reloop_get_prior_state>>
} /+ ← srcDocLoop closed: loop markup document/text line by line +/
/+ ↓ post loop markup document/text +/
- <<abs_post_0>>
- <<abs_post_1>>
- <<abs_post_2>>
- <<abs_post_3>>
- <<abs_post_4>>
- <<abs_post_5>>
- <<abs_post_6>>
- <<abs_post_7>>
- <<abs_post_8>>
- <<abs_post_9>>
- <<abs_post_10>>
- <<abs_post_11>>
- <<abs_post_12>>
- <<abs_post_13>>
- <<abs_post_14>>
- <<abs_post_15>>
- <<abs_post_16>>
- <<abs_post_17>>
- <<abs_post_18>>
- <<abs_post_19>>
- <<abs_post_20>>
- <<abs_post_21>>
- <<abs_post_22>>
- <<abs_post_23>>
- <<abs_post_24>>
- <<abs_post_25>>
- <<abs_post_26>>
- <<abs_post_27>>
- <<abs_post_28>>
- <<abs_post_29>>
- <<abs_post_30>>
- <<abs_post_31>>
- <<abs_post_32>>
- <<abs_post_33>>
- <<abs_post_34>>
- <<abs_post_doc_reloop_processing>>
+ <<abs_post_endnote_tuple>>
+ <<abs_post_glossary_nugget>>
+ <<abs_post_biblio_init>>
+ <<abs_post_biblio>>
+ <<abs_post_biblio_debug_write>>
+ <<abs_post_bookindex>>
+ <<abs_post_no_blurb>>
+ <<abs_post_contents>>
+ <<abs_post_separate_doc_head_and_doc_body>>
+ <<abs_post_heading_ancestors_markup>>
+ <<abs_post_heading_ancestors_collapsed>>
+ <<abs_post_loop_section_body_get_ancestors>>
+ <<abs_post_loop_section_endnotes>>
+ <<abs_post_loop_section_glossary>>
+ <<abs_post_loop_section_biblio>>
+ <<abs_post_loop_section_bookindex>>
+ <<abs_post_loop_section_blurb>>
+ <<abs_post_loop_all_obj_get_heading_decendants>>
+ <<abs_post_loop_all_obj_get_image_names>>
+ <<abs_post_loop_all_obj_get_image_dimensions>>
+ <<abs_post_loop_all_obj_get_links>>
+ <<abs_post_loop_section_head>>
+ <<abs_post_loop_section_toc>>
+ <<abs_post_reloop_section_body>>
+ <<abs_post_reloop_section_endnotes>>
+ <<abs_post_reloop_section_glossary_get_numbering>>
+ <<abs_post_reloop_section_biblio_get_numbering>>
+ <<abs_post_reloop_section_bookindex_get_index>>
+ <<abs_post_reloop_section_blurb_get_numbering>>
+ <<abs_post_reloop_section_all_get_decendants>>
+ <<abs_post_heading_obj_reinitialize>>
+ <<abs_post_the_document>>
+ <<abs_post_document_parts_keys>>
+ <<abs_post_document_segnames>>
+ <<abs_post_document_reinitialize>>
<<abs_struct_doc_has>>
<<abs_return_tuple>>
/+ post loop markup document/text ↑ +/
@@ -148,117 +148,117 @@ template docAbstraction() {
<<abs_functions_object_reset>>
<<abs_functions_header_set_common>>
<<abs_functions_ocn_status>>
- <<abs_functions_substitutions_0>>
- <<abs_functions_substitutions_1>>
- <<abs_functions_block_0>>
- <<abs_functions_block_1>>
- <<abs_functions_block_2>>
- <<abs_functions_block_3>>
- <<abs_functions_block_4>>
- <<abs_functions_block_5>>
- <<abs_functions_block_6>>
- <<abs_functions_block_7>>
- <<abs_functions_block_8>>
- <<abs_functions_block_9>>
- <<abs_functions_block_10>>
- <<abs_functions_block_11>>
- <<abs_functions_block_12>>
- <<abs_functions_block_13>>
- <<abs_functions_block_14>>
- <<abs_functions_block_15>>
+ <<abs_functions_substitutions_user_requested>>
+ <<abs_functions_substitutions_fontface>>
+ <<abs_functions_block_open>>
+ <<abs_functions_block_regex>>
+ <<abs_functions_block_curly_open_code>>
+ <<abs_functions_block_curly_open_poem>>
+ <<abs_functions_block_curly_open_group>>
+ <<abs_functions_block_curly_open_block>>
+ <<abs_functions_block_curly_open_quote>>
+ <<abs_functions_block_curly_open_table>>
+ <<abs_functions_block_curly_open_table_special>>
+ <<abs_functions_block_tic_open_code>>
+ <<abs_functions_block_tic_open_poem>>
+ <<abs_functions_block_tic_open_group>>
+ <<abs_functions_block_tic_open_block>>
+ <<abs_functions_block_tic_open_quote>>
+ <<abs_functions_block_tic_open_table>>
+ <<abs_functions_block_close>>
<<abs_functions_block_quote>>
<<abs_functions_block_group>>
<<abs_functions_block_block>>
<<abs_functions_block_poem>>
<<abs_functions_block_code>>
<<abs_functions_block_table>>
- <<abs_functions_block_biblio_0>>
- <<abs_functions_block_biblio_1>>
- <<abs_functions_block_line_status_empty_0>>
- <<abs_functions_block_line_status_empty_1>>
- <<abs_functions_block_line_status_empty_2>>
- <<abs_functions_block_line_status_empty_3>>
- <<abs_functions_block_line_status_empty_4>>
- <<abs_functions_block_line_status_empty_5>>
- <<abs_functions_block_line_status_empty_6>>
- <<abs_functions_block_line_status_empty_7>>
- <<abs_functions_block_line_status_empty_8>>
+ <<abs_functions_block_biblio_map_tags>>
+ <<abs_functions_block_biblio_text_block>>
+ <<abs_functions_block_line_status_empty_table_closed>>
+ <<abs_functions_block_line_status_empty_block_close_function_open>>
+ <<abs_functions_block_line_status_empty_block_quote>>
+ <<abs_functions_block_line_status_empty_block_group>>
+ <<abs_functions_block_line_status_empty_block_block>>
+ <<abs_functions_block_line_status_empty_block_poem>>
+ <<abs_functions_block_line_status_empty_block_code>>
+ <<abs_functions_block_line_status_empty_block_table>>
+ <<abs_functions_block_line_status_empty_block_close_function_close>>
<<abs_functions_book_index>>
- <<abs_functions_heading_0>>
- <<abs_functions_heading_1>>
- <<abs_functions_heading_2>>
- <<abs_functions_para_0>>
- <<abs_functions_para_1>>
- <<abs_functions_table_0>>
- <<abs_functions_table_1>>
- <<abs_functions_table_2>>
- <<abs_functions_table_3>>
+ <<abs_functions_heading_found>>
+ <<abs_functions_heading_make_set>>
+ <<abs_functions_heading_matched>>
+ <<abs_functions_para_matched>>
+ <<abs_functions_para_font_faces_line>>
+ <<abs_functions_table_instructions>>
+ <<abs_functions_table_munge_array>>
+ <<abs_functions_table_munge_substantive>>
+ <<abs_functions_table_munge_substantive_special>>
/+ abstraction functions ↑ +/
/+ ↓ abstraction function emitters +/
<<meta_emitters_ocn>>
/+ +/
- <<meta_emitters_obj_inline_markup_munge_0>>
- <<meta_emitters_obj_inline_markup_munge_1>>
- <<meta_emitters_obj_inline_markup_munge_2>>
- <<meta_emitters_obj_inline_markup_munge_3>>
- <<meta_emitters_obj_inline_markup_munge_4>>
- <<meta_emitters_obj_inline_markup_munge_5>>
- <<meta_emitters_obj_inline_markup_munge_6>>
- <<meta_emitters_obj_inline_markup_munge_7>>
- <<meta_emitters_obj_inline_markup_munge_8>>
- <<meta_emitters_obj_inline_markup_munge_9>>
- <<meta_emitters_obj_inline_markup_munge_10>>
- <<meta_emitters_obj_inline_markup_munge_11>>
- <<meta_emitters_obj_inline_markup_munge_12>>
- <<meta_emitters_obj_inline_markup_munge_13>>
- <<meta_emitters_obj_inline_markup>>
- <<meta_emitters_obj_inline_markup_and_anchor_tags_and_misc>>
- <<meta_emitters_obj_inline_markup_table_of_contents>>
- <<meta_emitters_obj_inline_markup_private>>
- <<meta_emitters_obj_inline_markup_heading_numbering_segment_anchor_tags_0>>
- <<meta_emitters_obj_inline_markup_heading_numbering_segment_anchor_tags_1>>
- <<meta_emitters_obj_inline_markup_close>>
+ <<meta_emitters_obj_inline_markup_munge_function_open>>
+ <<meta_emitters_obj_inline_markup_munge_function_markup_images>>
+ <<meta_emitters_obj_inline_markup_munge_function_markup_footnotes_endnotes>>
+ <<meta_emitters_obj_inline_markup_munge_function_object_notes_and_links>>
+ <<meta_emitters_obj_inline_markup_munge_function_heading>>
+ <<meta_emitters_obj_inline_markup_munge_function_para>>
+ <<meta_emitters_obj_inline_markup_munge_function_quote>>
+ <<meta_emitters_obj_inline_markup_munge_function_group>>
+ <<meta_emitters_obj_inline_markup_munge_function_block>>
+ <<meta_emitters_obj_inline_markup_munge_function_verse>>
+ <<meta_emitters_obj_inline_markup_munge_function_code>>
+ <<meta_emitters_obj_inline_markup_munge_function_table>>
+ <<meta_emitters_obj_inline_markup_munge_function_comment>>
+ <<meta_emitters_obj_inline_markup_munge_function_close>>
+ <<meta_emitters_obj_inline_markup_function_open>>
+ <<meta_emitters_obj_inline_markup_and_anchor_tags_and_misc>>
+ <<meta_emitters_obj_inline_markup_table_of_contents>>
+ <<meta_emitters_obj_inline_markup_private_function_open>>
+ <<meta_emitters_obj_inline_markup_heading_numbering_and_segment_anchor_tags>>
+ <<meta_emitters_obj_inline_segment_anchor_tags_manufacture>>
+ <<meta_emitters_obj_inline_markup_private_function_close>>
/+ +/
<<meta_emitters_obj_attributes>>
- <<meta_emitters_obj_attributes_public>>
- <<meta_emitters_obj_attributes_private>>
- <<meta_emitters_obj_attributes_private_an_attribute_0>>
- <<meta_emitters_obj_attributes_private_an_attribute_1>>
- <<meta_emitters_obj_attributes_private_an_attribute_2>>
- <<meta_emitters_obj_attributes_private_an_attribute_3>>
- <<meta_emitters_obj_attributes_private_an_attribute_4>>
- <<meta_emitters_obj_attributes_private_an_attribute_5>>
- <<meta_emitters_obj_attributes_private_an_attribute_6>>
- <<meta_emitters_obj_attributes_private_an_attribute_7>>
- <<meta_emitters_obj_attributes_private_an_attribute_8>>
- <<meta_emitters_obj_attributes_private_an_attribute_9>>
- <<meta_emitters_obj_attributes_private_json>>
+ <<meta_emitters_obj_attributes_public>>
+ <<meta_emitters_obj_attributes_private>>
+ <<meta_emitters_obj_attributes_private_an_attribute_txt_para_and_blocks>>
+ <<meta_emitters_obj_attributes_private_an_attribute_txt_heading>>
+ <<meta_emitters_obj_attributes_private_an_attribute_txt_para>>
+ <<meta_emitters_obj_attributes_private_an_attribute_txt_quote>>
+ <<meta_emitters_obj_attributes_private_an_attribute_txt_group>>
+ <<meta_emitters_obj_attributes_private_an_attribute_txt_block>>
+ <<meta_emitters_obj_attributes_private_an_attribute_txt_verse>>
+ <<meta_emitters_obj_attributes_private_an_attribute_txt_code>>
+ <<meta_emitters_obj_attributes_private_an_attribute_txt_table>>
+ <<meta_emitters_obj_attributes_private_an_attribute_txt_comment>>
+ <<meta_emitters_obj_attributes_private_json>>
<<meta_emitters_obj_attributes_private_close>>
/+ +/
- <<meta_emitters_book_index_nugget>>
- <<meta_emitters_book_index_report_indented>>
- <<meta_emitters_book_index_report_section_0>>
- <<meta_emitters_book_index_report_section_1>>
- <<meta_emitters_book_index_report_section_2>>
- <<meta_emitters_book_index_report_section_3>>
+ <<meta_emitters_bookindex_nugget>>
+ <<meta_emitters_bookindex_report_indented>>
+ <<meta_emitters_bookindex_report_section_function_open>>
+ <<meta_emitters_bookindex_report_section_function_write_section>>
+ <<meta_emitters_bookindex_report_section_function_build_abstraction>>
+ <<meta_emitters_bookindex_report_section_function_close>>
/+ +/
- <<meta_emitters_endnotes_0>>
- <<meta_emitters_endnotes_1>>
- <<meta_emitters_endnotes_2>>
- <<meta_emitters_endnotes_3>>
- <<meta_emitters_endnotes_4>>
+ <<meta_emitters_endnotes_function_open>>
+ <<meta_emitters_endnotes_function_gather_notes>>
+ <<meta_emitters_endnotes_function_gathered_notes>>
+ <<meta_emitters_endnotes_function_endnote_objects>>
+ <<meta_emitters_endnotes_function_close>>
/+ +/
- <<meta_emitters_bibliography_0>>
- <<meta_emitters_bibliography_1>>
- <<meta_emitters_bibliography_2>>
- <<meta_emitters_bibliography_3>>
- <<meta_emitters_bibliography_4>>
- <<meta_emitters_bibliography_5>>
+ <<meta_emitters_bibliography_function_open>>
+ <<meta_emitters_bibliography_function_biblio_sorted>>
+ <<meta_emitters_bibliography_function_biblio_unsorted_json_object_array>>
+ <<meta_emitters_bibliography_function_biblio_sort_json>>
+ <<meta_emitters_bibliography_function_biblio_sorted_json>>
+ <<meta_emitters_bibliography_function_close>>
/+ +/
- <<meta_emitters_metadata_0>>
- <<meta_emitters_metadata_1>>
- <<meta_emitters_metadata_2>>
- <<meta_emitters_metadata_3>>
+ <<meta_emitters_metadata_function_open>>
+ <<meta_emitters_metadata_function_node_location>>
+ <<meta_emitters_metadata_function_heading>>
+ <<meta_emitters_metadata_function_close>>
/+ abstraction functions emitters ↑ +/
/+ ↓ abstraction functions assertions +/
<<abs_functions_assertions>>
@@ -923,7 +923,7 @@ continue;
**** _non code objects_ (non-code blocks & regular text: by line) [+4] :non_code:
***** inline fontface markup
-#+NAME: abs_in_loop_body_non_code_obj_0
+#+NAME: abs_in_loop_body_non_code_obj_fontface_markup
#+BEGIN_SRC d
line = line.inline_markup_faces; // by text line (rather than by text object), linebreaks in para problematic
#+END_SRC
@@ -931,7 +931,7 @@ line = line.inline_markup_faces; // by text line (rather than by text object), l
***** in section (biblio, glossary, blurb) +(block group)+ [+1] :block:active:
****** in section: biblio :biblio:
-#+NAME: abs_in_loop_body_non_code_obj_1
+#+NAME: abs_in_loop_body_non_code_obj_in_biblio
#+BEGIN_SRC d
if (line.matchFirst(rgx.heading_biblio)
|| (pith["section"] == eN.sect.bibliography
@@ -960,7 +960,7 @@ if there is a glossary section you need to:
- need indentation and regular paragraph inline markup
- reconstitute the document with the glossary section following the endnotes
-#+NAME: abs_in_loop_body_non_code_obj_2
+#+NAME: abs_in_loop_body_non_code_obj_in_glossary
#+BEGIN_SRC d
} else if (line.matchFirst(rgx.heading_glossary)
|| (pith["section"] == eN.sect.glossary
@@ -1068,7 +1068,7 @@ if there is a blurb section you need to:
- need regular paragraph inline markup
- reconstitute the document with the blurb section at the very end of the doucment
-#+NAME: abs_in_loop_body_non_code_obj_3
+#+NAME: abs_in_loop_body_non_code_obj_in_blurb
#+BEGIN_SRC d
} else if (line.matchFirst(rgx.heading_blurb)
|| (pith["section"] == eN.sect.blurb
@@ -1221,69 +1221,69 @@ if there is a blurb section you need to:
***** in blocks [+1] :block:active:
-#+NAME: abs_in_loop_body_non_code_obj_4
+#+NAME: abs_in_loop_body_non_code_obj_in_block
#+BEGIN_SRC d
} else if (pith["block_state"] == eN.blk_state.on) {
#+END_SRC
****** in block: quote :quote:
-#+NAME: abs_in_loop_body_non_code_obj_5
+#+NAME: abs_in_loop_body_non_code_obj_in_block_quote
#+BEGIN_SRC d
- if (pith["block_is"] == eN.blk_is.quote) {
- line = line
- ._doc_header_and_make_substitutions_(conf_make_meta)
- ._doc_header_and_make_substitutions_fontface_(conf_make_meta);
- an_object = line.flow_txt_block_quote(an_object, pith);
- continue;
+if (pith["block_is"] == eN.blk_is.quote) {
+ line = line
+ ._doc_header_and_make_substitutions_(conf_make_meta)
+ ._doc_header_and_make_substitutions_fontface_(conf_make_meta);
+ an_object = line.flow_txt_block_quote(an_object, pith);
+ continue;
#+END_SRC
****** in block: group :group:
-#+NAME: abs_in_loop_body_non_code_obj_6
+#+NAME: abs_in_loop_body_non_code_obj_in_block_group
#+BEGIN_SRC d
- } else if (pith["block_is"] == eN.blk_is.group) {
- line = line
- ._doc_header_and_make_substitutions_(conf_make_meta)
- ._doc_header_and_make_substitutions_fontface_(conf_make_meta)
- .replaceAll(rgx.para_delimiter, mkup.br_paragraph ~ "$1");
- an_object = line.flow_txt_block_group(an_object, pith);
- continue;
+} else if (pith["block_is"] == eN.blk_is.group) {
+ line = line
+ ._doc_header_and_make_substitutions_(conf_make_meta)
+ ._doc_header_and_make_substitutions_fontface_(conf_make_meta)
+ .replaceAll(rgx.para_delimiter, mkup.br_paragraph ~ "$1");
+ an_object = line.flow_txt_block_group(an_object, pith);
+ continue;
#+END_SRC
****** in block: block :block:
-#+NAME: abs_in_loop_body_non_code_obj_7
+#+NAME: abs_in_loop_body_non_code_obj_in_block_block
#+BEGIN_SRC d
- } else if (pith["block_is"] == eN.blk_is.block) {
+} else if (pith["block_is"] == eN.blk_is.block) {
+ line = line
+ ._doc_header_and_make_substitutions_(conf_make_meta)
+ ._doc_header_and_make_substitutions_fontface_(conf_make_meta);
+ if (auto m = line.match(rgx.spaces_keep)) {
line = line
- ._doc_header_and_make_substitutions_(conf_make_meta)
- ._doc_header_and_make_substitutions_fontface_(conf_make_meta);
- if (auto m = line.match(rgx.spaces_keep)) {
- line = line
- .replaceAll(rgx.spaces_keep, (m.captures[1]).translate([ ' ' : mkup.nbsp ]));
- }
- an_object = line.flow_txt_block_block(an_object, pith);
- continue;
+ .replaceAll(rgx.spaces_keep, (m.captures[1]).translate([ ' ' : mkup.nbsp ]));
+ }
+ an_object = line.flow_txt_block_block(an_object, pith);
+ continue;
#+END_SRC
****** in block: poem :poem:
-#+NAME: abs_in_loop_body_non_code_obj_8
+#+NAME: abs_in_loop_body_non_code_obj_in_block_poem
#+BEGIN_SRC d
- } else if (pith["block_is"] == eN.blk_is.poem) {
- an_object = line.flow_txt_block_poem(an_object, pith, cntr, object_number_poem, conf_make_meta, tag_in_seg);
- continue;
+} else if (pith["block_is"] == eN.blk_is.poem) {
+ an_object = line.flow_txt_block_poem(an_object, pith, cntr, object_number_poem, conf_make_meta, tag_in_seg);
+ continue;
#+END_SRC
****** in block: table :table:
-#+NAME: abs_in_loop_body_non_code_obj_9
+#+NAME: abs_in_loop_body_non_code_obj_in_block_table
#+BEGIN_SRC d
- } else if (pith["block_is"] == eN.blk_is.table) {
- an_object = line.flow_txt_block_table(an_object, pith, conf_make_meta);
- continue;
- }
+} else if (pith["block_is"] == eN.blk_is.table) {
+ an_object = line.flow_txt_block_table(an_object, pith, conf_make_meta);
+ continue;
+}
#+END_SRC
***** not identified as being within block group (could still be, or not) [+3]
@@ -1314,7 +1314,7 @@ continue;
****** line not empty [+2]
******* asserts :assert:
-#+NAME: abs_in_loop_body_not_block_obj_0
+#+NAME: abs_in_loop_body_not_block_obj_assert
#+BEGIN_SRC d
assert(
!line.empty,
@@ -1342,7 +1342,7 @@ if (pith["block_state"] == eN.blk_state.closing) {
******* book index :bookindex:
-#+NAME: abs_in_loop_body_not_block_obj_1
+#+NAME: abs_in_loop_body_not_block_obj_bookindex
#+BEGIN_SRC d
if (line.matchFirst(rgx.book_index_item)
|| line.matchFirst(rgx.book_index_item_open)
@@ -1352,104 +1352,110 @@ if (line.matchFirst(rgx.book_index_item)
******* not book index [+1]
-#+NAME: abs_in_loop_body_not_block_obj_2
+#+NAME: abs_in_loop_body_not_block_obj_not_bookindex
#+BEGIN_SRC d
} else { /+ not book_index +/
#+END_SRC
******** matched: comment :comment:match:
-#+NAME: abs_in_loop_body_not_block_obj_3
+#+NAME: abs_in_loop_body_not_block_obj_not_bookindex_a_comment
#+BEGIN_SRC d
- an_object_key = "body_nugget";
- if (auto m = line.matchFirst(rgx.comment)) { /+ matched comment +/
- debug(comment) {
- writeln(line);
- }
- an_object[an_object_key] ~= line ~= "\n";
- comp_obj_comment = comp_obj_comment.init;
- comp_obj_comment.metainfo.is_of_part = "comment"; // breaks flow
- comp_obj_comment.metainfo.is_of_section = "comment"; // breaks flow
- comp_obj_comment.metainfo.is_of_type = "comment";
- comp_obj_comment.metainfo.is_a = "comment";
- comp_obj_comment.text = an_object[an_object_key].strip;
- the_document_body_section ~= comp_obj_comment;
- flow_common_reset_(line_occur, an_object, pith);
- processing.remove("verse");
- ++cntr;
+an_object_key = "body_nugget";
+if (auto m = line.matchFirst(rgx.comment)) { /+ matched comment +/
+ debug(comment) {
+ writeln(line);
+ }
+ an_object[an_object_key] ~= line ~= "\n";
+ comp_obj_comment = comp_obj_comment.init;
+ comp_obj_comment.metainfo.is_of_part = "comment"; // breaks flow
+ comp_obj_comment.metainfo.is_of_section = "comment"; // breaks flow
+ comp_obj_comment.metainfo.is_of_type = "comment";
+ comp_obj_comment.metainfo.is_a = "comment";
+ comp_obj_comment.text = an_object[an_object_key].strip;
+ the_document_body_section ~= comp_obj_comment;
+ flow_common_reset_(line_occur, an_object, pith);
+ processing.remove("verse");
+ ++cntr;
#+END_SRC
******** flag !set & line !exist: heading or para :heading:paragraph:
-#+NAME: abs_in_loop_body_not_block_obj_4
+#+NAME: abs_in_loop_body_not_block_obj_not_bookindex_a_para_type
#+BEGIN_SRC d
- } else if ((line_occur["para"] == eN.bi.off
+} else if ((line_occur["para"] == eN.bi.off
+ && line_occur["heading"] == eN.bi.off)
+ && pith["txt_is"] == eN.txt_is.off
+) { /+ heading or para but neither flag nor line exists +/
+ if ((conf_make_meta.make.headings.length > 2)
+ && (pith["make_headings"] == eN.bi.off)) { /+ heading found +/
+ heading_match_str = line.flow_heading_found_(heading_match_str, conf_make_meta.make.headings, heading_match_rgx, pith);
+ }
+ if (pith["make_headings"] == eN.bi.on
+ && (line_occur["para"] == eN.bi.off
&& line_occur["heading"] == eN.bi.off)
&& pith["txt_is"] == eN.txt_is.off
- ) { /+ heading or para but neither flag nor line exists +/
- if ((conf_make_meta.make.headings.length > 2)
- && (pith["make_headings"] == eN.bi.off)) { /+ heading found +/
- heading_match_str = line.flow_heading_found_(heading_match_str, conf_make_meta.make.headings, heading_match_rgx, pith);
- }
- if (pith["make_headings"] == eN.bi.on
- && (line_occur["para"] == eN.bi.off
- && line_occur["heading"] == eN.bi.off)
- && pith["txt_is"] == eN.txt_is.off
- ) { /+ heading make set +/
- line = line.flow_heading_make_set_(line_occur, heading_match_rgx, pith);
- }
- /+ TODO node info: all headings identified at this point,
- - extract node info here??
- - how long can it wait?
- - should be incorporated in composite objects
- - should happen before endnote links set (they need to be moved down?)
- +/
- if (line.matchFirst(rgx.headings)) { /+ heading match +/
- line = line._doc_header_and_make_substitutions_(conf_make_meta);
- an_object = line.flow_heading_matched_(
- an_object,
- line_occur,
- an_object_key,
- lv,
- collapsed_lev,
- pith,
- conf_make_meta,
- );
- } else if (line_occur["para"] == eN.bi.off) { /+ para match +/
- an_object_key = "body_nugget";
- line = line
- ._doc_header_and_make_substitutions_(conf_make_meta)
- ._doc_header_and_make_substitutions_fontface_(conf_make_meta);
- an_object = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
- }
+ ) { /+ heading make set +/
+ line = line.flow_heading_make_set_(line_occur, heading_match_rgx, pith);
+ }
+ /+ TODO node info: all headings identified at this point,
+ - extract node info here??
+ - how long can it wait?
+ - should be incorporated in composite objects
+ - should happen before endnote links set (they need to be moved down?)
+ +/
+ if (line.matchFirst(rgx.headings)) { /+ heading match +/
+ line = line._doc_header_and_make_substitutions_(conf_make_meta);
+ an_object = line.flow_heading_matched_(
+ an_object,
+ line_occur,
+ an_object_key,
+ lv,
+ collapsed_lev,
+ pith,
+ conf_make_meta,
+ );
+ } else if (line_occur["para"] == eN.bi.off) { /+ para match +/
+ an_object_key = "body_nugget";
+ line = line
+ ._doc_header_and_make_substitutions_(conf_make_meta)
+ ._doc_header_and_make_substitutions_fontface_(conf_make_meta);
+ an_object = line.flow_para_match_(an_object, an_object_key, indent, bullet, pith, line_occur);
+ }
#+END_SRC
******** line exist: heading :heading:
-#+NAME: abs_in_loop_body_not_block_obj_5
+#+NAME: abs_in_loop_body_not_block_obj_not_bookindex_a_heading
#+BEGIN_SRC d
- } else if (line_occur["heading"] > eN.bi.off) { /+ heading +/
- debug(heading) {
- writeln(line);
- }
- an_object[an_object_key] ~= line ~= "\n";
- ++line_occur["heading"];
+} else if (line_occur["heading"] > eN.bi.off) { /+ heading +/
+ debug(heading) {
+ writeln(line);
+ }
+ an_object[an_object_key] ~= line ~= "\n";
+ ++line_occur["heading"];
#+END_SRC
******** line exist: para :para:
-#+NAME: abs_in_loop_body_not_block_obj_6
+#+NAME: abs_in_loop_body_not_block_obj_not_bookindex_a_para
#+BEGIN_SRC d
- } else if (line_occur["para"] > eN.bi.off) { /+ paragraph +/
- debug(para) {
- writeln(an_object_key, "-> ", line);
- }
- line = line
- ._doc_header_and_make_substitutions_(conf_make_meta)
- ._doc_header_and_make_substitutions_fontface_(conf_make_meta);
- an_object[an_object_key] ~= " " ~ line;
- ++line_occur["para"];
+} else if (line_occur["para"] > eN.bi.off) { /+ paragraph +/
+ debug(para) {
+ writeln(an_object_key, "-> ", line);
}
+ line = line
+ ._doc_header_and_make_substitutions_(conf_make_meta)
+ ._doc_header_and_make_substitutions_fontface_(conf_make_meta);
+ an_object[an_object_key] ~= " " ~ line;
+ ++line_occur["para"];
+}
+#+END_SRC
+
+******** not book index close
+
+#+NAME: abs_in_loop_body_not_block_obj_not_bookindex_close
+#+BEGIN_SRC d
}
#+END_SRC
@@ -1475,7 +1481,7 @@ an_object = line.flow_block_flag_line_empty_(
****** line empty [+1]
******* assert line empty :assert:
-#+NAME: abs_in_loop_body_not_block_obj_line_empty_0
+#+NAME: abs_in_loop_body_not_block_obj_line_empty_assert
#+BEGIN_SRC d
assert(
line.empty,
@@ -1490,7 +1496,7 @@ assert(
******* heading object :heading:object:
-#+NAME: abs_in_loop_body_not_block_obj_line_empty_1
+#+NAME: abs_in_loop_body_not_block_obj_line_empty_heading_obj
#+BEGIN_SRC d
if (_new_doc) {
tag_assoc = tag_assoc.init;
@@ -1624,7 +1630,7 @@ if (pith["txt_is"] == eN.txt_is.heading
******* paragraph object :paragraph:object:
-#+NAME: abs_in_loop_body_not_block_obj_line_empty_2
+#+NAME: abs_in_loop_body_not_block_obj_line_empty_para_obj
#+BEGIN_SRC d
} else if (pith["txt_is"] == eN.txt_is.para
&& line_occur["para"] > eN.bi.off
@@ -1693,7 +1699,7 @@ if (pith["txt_is"] == eN.txt_is.heading
*** regular _text objects_ identified :text:paragraph:
-#+NAME: abs_in_loop_body_01
+#+NAME: abs_in_loop_body_reloop_get_prior_state
#+BEGIN_SRC d
/+ unless (the_document_body_section.length == 0) ? +/
if (the_document_body_section.length > 0) {
@@ -1755,7 +1761,7 @@ if (the_document_body_section.length > 0) {
*** tie up preparation of document sections
**** endnotes section (scroll & seg) :endnotes:
-#+NAME: abs_post_0
+#+NAME: abs_post_endnote_tuple
#+BEGIN_SRC d
auto en_tuple
= note_section.endnote_objects(obj_cite_digits, opt_action);
@@ -1775,7 +1781,7 @@ debug(endnotes) {
**** no glossary section? :glossary:
-#+NAME: abs_post_1
+#+NAME: abs_post_glossary_nugget
#+BEGIN_SRC d
if (an_object["glossary_nugget"].length == 0) {
comp_obj_heading_ = comp_obj_heading_.init;
@@ -1804,7 +1810,7 @@ debug(glossary) {
**** bibliography section (objects) :bibliography:
-#+NAME: abs_post_2
+#+NAME: abs_post_biblio_init
#+BEGIN_SRC d
auto biblio_unsorted_incomplete = biblio_arr_json.dup;
auto biblio = Bibliography();
@@ -1812,7 +1818,7 @@ auto biblio_ordered
= biblio.flow_bibliography_(biblio_unsorted_incomplete, bib_arr_json);
#+END_SRC
-#+NAME: abs_post_3
+#+NAME: abs_post_biblio
#+BEGIN_SRC d
if (biblio_ordered.length > 0) {
{
@@ -1920,7 +1926,7 @@ if (biblio_ordered.length > 0) {
}
#+END_SRC
-#+NAME: abs_post_4
+#+NAME: abs_post_biblio_debug_write
#+BEGIN_SRC d
debug(bibliosection) {
foreach (o; the_bibliography_section) {
@@ -1965,7 +1971,7 @@ JSONValue biblio_entry_tags_jsonstr = `{
**** bookindex section (scroll & seg) :book:index:
-#+NAME: abs_post_5
+#+NAME: abs_post_bookindex
#+BEGIN_SRC d
auto bi = BookIndexReportSection();
auto bi_tuple
@@ -1986,7 +1992,7 @@ debug(bookindex) {
**** no blurb section? :blurb:
-#+NAME: abs_post_6
+#+NAME: abs_post_no_blurb
#+BEGIN_SRC d
if (an_object["blurb_nugget"].length == 0) {
comp_obj_heading_ = comp_obj_heading_.init;
@@ -2017,7 +2023,7 @@ debug(blurb) {
**** toc backmatter, table of contents backmatter (scroll & seg) :contents:
-#+NAME: abs_post_7
+#+NAME: abs_post_contents
#+BEGIN_SRC d
indent = [
"hang_position" : 1,
@@ -2118,7 +2124,7 @@ debug(toc) {
**** doc head (separate document head from body, make space for toc)
-#+NAME: abs_post_8
+#+NAME: abs_post_separate_doc_head_and_doc_body
#+BEGIN_SRC d
the_document_head_section ~= the_document_body_section[0];
the_document_body_section = the_document_body_section[1..$];
@@ -2142,7 +2148,7 @@ NOTE there are issues attempting to do this on first pass as:
***** Methods
****** get ancestors markup
-#+NAME: abs_post_9
+#+NAME: abs_post_heading_ancestors_markup
#+BEGIN_SRC d
@safe int[] _get_ancestors_markup(O)(O obj, ref int[] _ancestors_markup) {
if (obj.metainfo.is_a == "heading") {
@@ -2235,7 +2241,7 @@ NOTE there are issues attempting to do this on first pass as:
****** get ancestors collapsed
-#+NAME: abs_post_10
+#+NAME: abs_post_heading_ancestors_collapsed
#+BEGIN_SRC d
@safe int[] _get_ancestors_collapsed(O)(O obj, ref int[] _ancestors_collapsed) {
if (obj.metainfo.is_a == "heading") {
@@ -2328,7 +2334,7 @@ NOTE there are issues attempting to do this on first pass as:
- substantive object numbers already exist
- number un-numbered non-substantive text
-#+NAME: abs_post_11
+#+NAME: abs_post_loop_section_body_get_ancestors
#+BEGIN_SRC d
/+ multiple 1~ levels, loop through document body +/
if (the_document_body_section.length > 1) {
@@ -2356,7 +2362,7 @@ if (the_document_body_section.length > 1) {
***** ↻ Loop section: endnotes [en]
-#+NAME: abs_post_12
+#+NAME: abs_post_loop_section_endnotes
#+BEGIN_SRC d
if (the_endnotes_section.length > 1) {
segnames["html"] ~= "endnotes";
@@ -2377,7 +2383,7 @@ if (the_endnotes_section.length > 1) {
***** ↻ Loop section: glossary [gl]
-#+NAME: abs_post_13
+#+NAME: abs_post_loop_section_glossary
#+BEGIN_SRC d
if (the_glossary_section.length > 1) {
segnames["html"] ~= "glossary";
@@ -2398,7 +2404,7 @@ if (the_glossary_section.length > 1) {
***** ↻ Loop section: bibliography [bb]
-#+NAME: abs_post_14
+#+NAME: abs_post_loop_section_biblio
#+BEGIN_SRC d
if (the_bibliography_section.length > 1) {
segnames["html"] ~= "bibliography";
@@ -2419,7 +2425,7 @@ if (the_bibliography_section.length > 1) {
***** ↻ Loop section: book index [bi]
-#+NAME: abs_post_15
+#+NAME: abs_post_loop_section_bookindex
#+BEGIN_SRC d
if (the_bookindex_section.length > 1) {
segnames["html"] ~= "bookindex";
@@ -2440,7 +2446,7 @@ if (the_bookindex_section.length > 1) {
***** ↻ Loop section: blurb [bl]
-#+NAME: abs_post_16
+#+NAME: abs_post_loop_section_blurb
#+BEGIN_SRC d
if (the_blurb_section.length > 1) {
segnames["html"] ~= "blurb";
@@ -2500,7 +2506,7 @@ Build here:
***** Methods
****** decendants
-#+NAME: abs_post_17
+#+NAME: abs_post_loop_all_obj_get_heading_decendants
#+BEGIN_SRC d
@safe auto get_decendants()(ObjGenericComposite[] document_sections) {
int[string] _heading_ocn_decendants;
@@ -2553,7 +2559,7 @@ Build here:
****** images: extract
-#+NAME: abs_post_18
+#+NAME: abs_post_loop_all_obj_get_image_names
#+BEGIN_SRC d
string[] _images;
@safe string[] extract_images()(string content_block) {
@@ -2568,7 +2574,7 @@ string[] segnames_0_to_4;
****** images: dimensions
-#+NAME: abs_post_19
+#+NAME: abs_post_loop_all_obj_get_image_dimensions
#+BEGIN_SRC d
@system auto _image_dimensions(O,M)(O obj, M manifested) {
if (obj.has.image_without_dimensions) {
@@ -2621,7 +2627,7 @@ string[] segnames_0_to_4;
- book index
- footnotes and footnote numbers
-#+NAME: abs_post_20
+#+NAME: abs_post_loop_all_obj_get_links
#+BEGIN_SRC d
@safe auto _links(O)(O obj) {
if (auto m = obj.text.match(rgx.inline_link_stow_uri)) {
@@ -2646,7 +2652,7 @@ string[] segnames_0_to_4;
***** ↻ Loop section: head
-#+NAME: abs_post_21
+#+NAME: abs_post_loop_section_head
#+BEGIN_SRC d
foreach (ref obj; the_document_head_section) {
if (obj.metainfo.is_a == "heading") {
@@ -2678,7 +2684,7 @@ foreach (ref obj; the_document_head_section) {
***** ↻ Loop section: toc [to]
-#+NAME: abs_post_22
+#+NAME: abs_post_loop_section_toc
#+BEGIN_SRC d
if (the_table_of_contents_section.length > 1) {
/+ scroll +/
@@ -2708,7 +2714,7 @@ if (the_table_of_contents_section.length > 1) {
***** ↻ Loop section: document body [bd]
-#+NAME: abs_post_23
+#+NAME: abs_post_reloop_section_body
#+BEGIN_SRC d
/+ multiple 1~ levels, loop through document body +/
if (the_document_body_section.length > 1) {
@@ -2759,7 +2765,7 @@ auto image_list = (_images.sort()).uniq;
- endnotes have their own number, (also use in node) and they belong to calling object
-#+NAME: abs_post_24
+#+NAME: abs_post_reloop_section_endnotes
#+BEGIN_SRC d
/+ optional only one 1~ level +/
if (the_endnotes_section.length > 1) {
@@ -2800,11 +2806,11 @@ if (the_endnotes_section.length > 1) {
}
#+END_SRC
-***** ↻ Loop section: glossary [gl]
+***** ↻ reLoop section: glossary [gl]
- add glossary numbering, (also use in node) no need to show in text
-#+NAME: abs_post_25
+#+NAME: abs_post_reloop_section_glossary_get_numbering
#+BEGIN_SRC d
/+ optional only one 1~ level +/
if (the_glossary_section.length > 1) {
@@ -2845,11 +2851,11 @@ if (the_glossary_section.length > 1) {
}
#+END_SRC
-***** ↻ Loop section: bibliography [bb]
+***** ↻ reLoop section: bibliography [bb]
- add bibliography numbering, (also use in node) no need to show in text
-#+NAME: abs_post_26
+#+NAME: abs_post_reloop_section_biblio_get_numbering
#+BEGIN_SRC d
/+ optional only one 1~ level +/
if (the_bibliography_section.length > 1) {
@@ -2894,7 +2900,7 @@ if (the_bibliography_section.length > 1) {
- add book index numbering?, (also use in node) no need to show in text
-#+NAME: abs_post_27
+#+NAME: abs_post_reloop_section_bookindex_get_index
#+BEGIN_SRC d
/+ optional only one 1~ level +/
int ocn_ = obj_cite_digits.object_number;
@@ -2949,7 +2955,7 @@ if (the_bookindex_section.length > 1) { /
***** ↻ Loop section: blurb [bl]
-#+NAME: abs_post_28
+#+NAME: abs_post_reloop_section_blurb_get_numbering
#+BEGIN_SRC d
/+ optional only one 1~ level +/
if (the_blurb_section.length > 1) {
@@ -2990,9 +2996,9 @@ if (the_blurb_section.length > 1) {
}
#+END_SRC
-***** ↻ Loop sections: get decendants
+***** ↻ reLoop sections: get decendants
-#+NAME: abs_post_29
+#+NAME: abs_post_reloop_section_all_get_decendants
#+BEGIN_SRC d
if (the_document_body_section.length > 1) {
auto pairs = get_decendants(
@@ -3090,7 +3096,7 @@ if (the_document_body_section.length > 1) {
**** TODO update BUG?
-#+NAME: abs_post_30
+#+NAME: abs_post_heading_obj_reinitialize
#+BEGIN_SRC d
/+ TODO
- note create/insert heading object sole purpose eof close all open tags
@@ -3128,7 +3134,7 @@ comp_obj_heading_ = comp_obj_heading_.obj_heading_ancestors(lv_ancestors_txt);
** 4. _return document tuple_ :post:
*** _the document_ :document:
-#+NAME: abs_post_31
+#+NAME: abs_post_the_document
#+BEGIN_SRC d
ObjGenericComposite[][string] document_the = [
"head": the_document_head_section,
@@ -3148,7 +3154,7 @@ ObjGenericComposite[][string] document_the = [
*** document _section keys_ sequence
-#+NAME: abs_post_32
+#+NAME: abs_post_document_parts_keys
#+BEGIN_SRC d
string[][string] document_section_keys_sequenced = [
"scroll": ["head", "toc", "body",],
@@ -3196,7 +3202,7 @@ if ((opt_action.html)
*** dup
-#+NAME: abs_post_33
+#+NAME: abs_post_document_segnames
#+BEGIN_SRC d
string[] segnames_4 = segnames["html"].dup;
string[] segnames_lv1_to_4 = segnames["epub"].dup;
@@ -3208,7 +3214,7 @@ debug(segnames) {
*** clean out structure
-#+NAME: abs_post_34
+#+NAME: abs_post_document_reinitialize
#+BEGIN_SRC d
destroy(the_document_head_section);
destroy(the_table_of_contents_section);
@@ -3398,7 +3404,7 @@ functions used in document abstraction
*** make substitutions
**** project
-#+NAME: abs_functions_substitutions_0
+#+NAME: abs_functions_substitutions_user_requested
#+BEGIN_SRC d
@safe char[] _doc_header_and_make_substitutions_(CMM)(
char[] line,
@@ -3419,7 +3425,7 @@ functions used in document abstraction
**** fontface
-#+NAME: abs_functions_substitutions_1
+#+NAME: abs_functions_substitutions_fontface
#+BEGIN_SRC d
@safe char[] _doc_header_and_make_substitutions_fontface_(CMM)(
char[] line,
@@ -3452,7 +3458,7 @@ functions used in document abstraction
**** block start (open) block :start:
***** { block starts function
-#+NAME: abs_functions_block_0
+#+NAME: abs_functions_block_open
#+BEGIN_SRC d
@safe void flow_txt_block_start()(
char[] line,
@@ -3464,271 +3470,271 @@ functions used in document abstraction
****** block (various) curly open :curly:
-#+NAME: abs_functions_block_1
+#+NAME: abs_functions_block_regex
#+BEGIN_SRC d
- static auto rgx = RgxI();
+static auto rgx = RgxI();
#+END_SRC
******* code
-#+NAME: abs_functions_block_2
+#+NAME: abs_functions_block_curly_open_code
#+BEGIN_SRC d
- if (auto m = line.matchFirst(rgx.block_curly_code_open)) {
- dochas["codeblock"]++;
- an_object["lang"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : "";
- debug(codecurly) { // code (curly) open
- writefln(
- "* [code curly] %s",
- line
- );
- }
- pith["block_is"] = eN.blk_is.code;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
+if (auto m = line.matchFirst(rgx.block_curly_code_open)) {
+ dochas["codeblock"]++;
+ an_object["lang"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : "";
+ debug(codecurly) { // code (curly) open
+ writefln(
+ "* [code curly] %s",
+ line
+ );
+ }
+ pith["block_is"] = eN.blk_is.code;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
#+END_SRC
******* poem
-#+NAME: abs_functions_block_3
+#+NAME: abs_functions_block_curly_open_poem
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_curly_poem_open)) {
- dochas["poem"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
- debug(poem) { // poem (curly) open
- writefln(
- "* [poem curly] %s",
- line
- );
- }
- object_number_poem["start"] = obj_cite_digits.object_number.to!string;
- pith["block_is"] = eN.blk_is.poem;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
- pith["verse_new"] = eN.bi.on;
+} else if (auto m = line.matchFirst(rgx.block_curly_poem_open)) {
+ dochas["poem"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ debug(poem) { // poem (curly) open
+ writefln(
+ "* [poem curly] %s",
+ line
+ );
+ }
+ object_number_poem["start"] = obj_cite_digits.object_number.to!string;
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
+ pith["verse_new"] = eN.bi.on;
#+END_SRC
******* group
-#+NAME: abs_functions_block_4
+#+NAME: abs_functions_block_curly_open_group
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_curly_group_open)) {
- dochas["group"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
- debug(group) { // group (curly) open
- writefln(
- "* [group curly] %s",
- line
- );
- }
- pith["block_is"] = eN.blk_is.group;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
+} else if (auto m = line.matchFirst(rgx.block_curly_group_open)) {
+ dochas["group"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ debug(group) { // group (curly) open
+ writefln(
+ "* [group curly] %s",
+ line
+ );
+ }
+ pith["block_is"] = eN.blk_is.group;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
#+END_SRC
******* block
-#+NAME: abs_functions_block_5
+#+NAME: abs_functions_block_curly_open_block
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_curly_block_open)) {
- dochas["block"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
- debug(block) {
- writefln(
- "* [block curly] %s",
- line
- );
- }
- pith["block_is"] = eN.blk_is.block;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
+} else if (auto m = line.matchFirst(rgx.block_curly_block_open)) {
+ dochas["block"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ debug(block) {
+ writefln(
+ "* [block curly] %s",
+ line
+ );
+ }
+ pith["block_is"] = eN.blk_is.block;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
#+END_SRC
******* quote
-#+NAME: abs_functions_block_6
+#+NAME: abs_functions_block_curly_open_quote
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_curly_quote_open)) {
- dochas["quote"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = m["attrib"].to!string;
- an_object["lang"] = m["lang"].to!string;
- debug(quote) {
- writefln(
- "* [quote curly] %s",
- line
- );
- }
- pith["block_is"] = eN.blk_is.quote;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
+} else if (auto m = line.matchFirst(rgx.block_curly_quote_open)) {
+ dochas["quote"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = m["attrib"].to!string;
+ an_object["lang"] = m["lang"].to!string;
+ debug(quote) {
+ writefln(
+ "* [quote curly] %s",
+ line
+ );
+ }
+ pith["block_is"] = eN.blk_is.quote;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
#+END_SRC
******* table
-#+NAME: abs_functions_block_7
+#+NAME: abs_functions_block_curly_open_table
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_curly_table_open)) { /+ curly table open +/
- debug(table) { // table (curly) open
- writefln(
- "* [table curly] %s",
- line
- );
- }
- dochas["table"] ++;
- an_object["table_head"] = m["attrib"].to!string;
- an_object["block_type"] = "curly";
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly;
+} else if (auto m = line.matchFirst(rgx.block_curly_table_open)) { /+ curly table open +/
+ debug(table) { // table (curly) open
+ writefln(
+ "* [table curly] %s",
+ line
+ );
+ }
+ dochas["table"] ++;
+ an_object["table_head"] = m["attrib"].to!string;
+ an_object["block_type"] = "curly";
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly;
#+END_SRC
******* table special
-#+NAME: abs_functions_block_8
+#+NAME: abs_functions_block_curly_open_table_special
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_curly_table_special_markup)) { /+ table: special table block markup syntax! +/
- dochas["table"]++;
- an_object["table_head"] = m["attrib"].to!string;
- an_object["block_type"] = "special";
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.curly_special;
+} else if (auto m = line.matchFirst(rgx.block_curly_table_special_markup)) { /+ table: special table block markup syntax! +/
+ dochas["table"]++;
+ an_object["table_head"] = m["attrib"].to!string;
+ an_object["block_type"] = "special";
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.curly_special;
#+END_SRC
****** block (various) tic open :tic:
******* code
-#+NAME: abs_functions_block_9
+#+NAME: abs_functions_block_tic_open_code
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_tic_code_open)) {
- dochas["codeblock"]++;
- an_object["lang"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : "";
- debug(codetic) {
- writefln(
- "* [code tic] %s",
- line
- );
- }
- pith["block_is"] = eN.blk_is.code;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
+} else if (auto m = line.matchFirst(rgx.block_tic_code_open)) {
+ dochas["codeblock"]++;
+ an_object["lang"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["syntax"] = (m["syntax"]) ? m["syntax"].to!string : "";
+ debug(codetic) {
+ writefln(
+ "* [code tic] %s",
+ line
+ );
+ }
+ pith["block_is"] = eN.blk_is.code;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
#+END_SRC
******* poem
-#+NAME: abs_functions_block_10
+#+NAME: abs_functions_block_tic_open_poem
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_tic_poem_open)) {
- dochas["poem"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
- debug(poem) {
- writefln(
- "* [poem tic] %s",
- line
- );
- }
- object_number_poem["start"] = obj_cite_digits.object_number.to!string;
- pith["block_is"] = eN.blk_is.poem;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
- pith["verse_new"] = eN.bi.on;
+} else if (auto m = line.matchFirst(rgx.block_tic_poem_open)) {
+ dochas["poem"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ debug(poem) {
+ writefln(
+ "* [poem tic] %s",
+ line
+ );
+ }
+ object_number_poem["start"] = obj_cite_digits.object_number.to!string;
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
+ pith["verse_new"] = eN.bi.on;
#+END_SRC
******* group
-#+NAME: abs_functions_block_11
+#+NAME: abs_functions_block_tic_open_group
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_tic_group_open)) {
- dochas["group"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
- debug(group) {
- writefln(
- "* [group tic] %s",
- line
- );
- }
- pith["block_is"] = eN.blk_is.group;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
+} else if (auto m = line.matchFirst(rgx.block_tic_group_open)) {
+ dochas["group"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ debug(group) {
+ writefln(
+ "* [group tic] %s",
+ line
+ );
+ }
+ pith["block_is"] = eN.blk_is.group;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
#+END_SRC
******* block
-#+NAME: abs_functions_block_12
+#+NAME: abs_functions_block_tic_open_block
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_tic_block_open)) {
- dochas["block"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
- an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
- debug(block) {
- writefln(
- "* [block tic] %s",
- line
- );
- }
- pith["block_is"] = eN.blk_is.block;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
+} else if (auto m = line.matchFirst(rgx.block_tic_block_open)) {
+ dochas["block"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = (m["attrib"]) ? m["attrib"].to!string : "";
+ an_object["lang"] = (m["lang"]) ? m["lang"].to!string : "";
+ debug(block) {
+ writefln(
+ "* [block tic] %s",
+ line
+ );
+ }
+ pith["block_is"] = eN.blk_is.block;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
#+END_SRC
******* quote
-#+NAME: abs_functions_block_13
+#+NAME: abs_functions_block_tic_open_quote
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_tic_quote_open)) {
- dochas["quote"]++;
- an_object["syntax"] = "";
- an_object["attrib"] = m["attrib"].to!string;
- an_object["lang"] = m["lang"].to!string;
- debug(quote) { // quote (tic) open
- writefln(
- "* [quote tic] %s",
- line
- );
- }
- pith["block_is"] = eN.blk_is.quote;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
+} else if (auto m = line.matchFirst(rgx.block_tic_quote_open)) {
+ dochas["quote"]++;
+ an_object["syntax"] = "";
+ an_object["attrib"] = m["attrib"].to!string;
+ an_object["lang"] = m["lang"].to!string;
+ debug(quote) { // quote (tic) open
+ writefln(
+ "* [quote tic] %s",
+ line
+ );
+ }
+ pith["block_is"] = eN.blk_is.quote;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
#+END_SRC
******* table
-#+NAME: abs_functions_block_14
+#+NAME: abs_functions_block_tic_open_table
#+BEGIN_SRC d
- } else if (auto m = line.matchFirst(rgx.block_tic_table_open)) { /+ tic table open +/
- debug(table) { // table (tic) open
- writefln(
- "* [table tic] %s",
- line
- );
- }
- dochas["table"] ++;
- an_object["table_head"] = m["attrib"].to!string;
- an_object["block_type"] = "tic";
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.on;
- pith["block_delim"] = eN.blk_delim.tic;
+} else if (auto m = line.matchFirst(rgx.block_tic_table_open)) { /+ tic table open +/
+ debug(table) { // table (tic) open
+ writefln(
+ "* [table tic] %s",
+ line
+ );
}
+ dochas["table"] ++;
+ an_object["table_head"] = m["attrib"].to!string;
+ an_object["block_type"] = "tic";
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.on;
+ pith["block_delim"] = eN.blk_delim.tic;
+}
#+END_SRC
***** }
-#+NAME: abs_functions_block_15
+#+NAME: abs_functions_block_close
#+BEGIN_SRC d
}
#+END_SRC
@@ -3785,9 +3791,9 @@ functions used in document abstraction
#+END_SRC
***** biblio block :biblio:
-****** biblio tag map
+****** biblio map tags
-#+NAME: abs_functions_block_biblio_0
+#+NAME: abs_functions_block_biblio_map_tags
#+BEGIN_SRC d
@safe final string biblio_tag_map()(string abr) {
auto btm = [
@@ -3839,7 +3845,7 @@ final string biblio_tag_map_()(string abr) {
****** biblio block
-#+NAME: abs_functions_block_biblio_1
+#+NAME: abs_functions_block_biblio_text_block
#+BEGIN_SRC d
@system void flow_txt_block_biblio(
char[] line,
@@ -4453,7 +4459,7 @@ process and use an_object["table_head"] (then empty it)
- table_column_widths, int[] column widths (as given or calculate average)
- show table walls, bool
-#+NAME: abs_functions_block_line_status_empty_0
+#+NAME: abs_functions_block_line_status_empty_table_closed
#+BEGIN_SRC d
@system void flow_table_closed_make_special_notation_table_(N,CMM)(
char[] line,
@@ -4502,7 +4508,7 @@ process and use an_object["table_head"] (then empty it)
***** { line empty, _make block_
-#+NAME: abs_functions_block_line_status_empty_1
+#+NAME: abs_functions_block_line_status_empty_block_close_function_open
#+BEGIN_SRC d
@system string[string] flow_block_flag_line_empty_(B,N,CMM,Ts)(
char[] line,
@@ -4528,337 +4534,337 @@ process and use an_object["table_head"] (then empty it)
"code block status: closed"
);
static auto rgx = RgxI();
+ if (pith["block_state"] == eN.blk_state.closing) {
#+END_SRC
****** make: quote block
-#+NAME: abs_functions_block_line_status_empty_2
+#+NAME: abs_functions_block_line_status_empty_block_quote
#+BEGIN_SRC d
- if (pith["block_state"] == eN.blk_state.closing) {
- if (pith["block_is"] == eN.blk_is.quote) {
- obj_cite_digits = ocn_emit(pith["ocn"]);
- an_object["bookindex_nugget"]
- = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
- bookindex_unordered_hashes
- = bookindex_extract_hash.bookindex_nugget_hash(
- an_object["bookindex_nugget"],
- obj_cite_digits,
- tag_in_seg
- );
- an_object["is"] = "quote";
- auto comp_obj_location
- = node_construct.node_location_emitter(
- content_non_header,
- tag_in_seg,
- lev_anchor_tag,
- tag_assoc,
- obj_cite_digits,
- cntr,
- heading_ptr-1,
- an_object["is"]
- );
- TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
- = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.is_of_part = "body";
- comp_obj_block.metainfo.is_of_section = "body";
- comp_obj_block.metainfo.is_of_type = "block";
- comp_obj_block.metainfo.is_a = "quote";
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digit_type;
- comp_obj_block.metainfo.lang = an_object["lang"];
- comp_obj_block.metainfo.attrib = an_object["attrib"];
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.text = an_object["substantive"];
- comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_block;
- tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
- pith["block_is"] = eN.blk_is.quote;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
- object_reset(an_object);
- processing.remove("verse");
- ++cntr;
+if (pith["block_is"] == eN.blk_is.quote) {
+ obj_cite_digits = ocn_emit(pith["ocn"]);
+ an_object["bookindex_nugget"]
+ = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
+ bookindex_unordered_hashes
+ = bookindex_extract_hash.bookindex_nugget_hash(
+ an_object["bookindex_nugget"],
+ obj_cite_digits,
+ tag_in_seg
+ );
+ an_object["is"] = "quote";
+ auto comp_obj_location
+ = node_construct.node_location_emitter(
+ content_non_header,
+ tag_in_seg,
+ lev_anchor_tag,
+ tag_assoc,
+ obj_cite_digits,
+ cntr,
+ heading_ptr-1,
+ an_object["is"]
+ );
+ TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
+ = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "quote";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digit_type;
+ comp_obj_block.metainfo.lang = an_object["lang"];
+ comp_obj_block.metainfo.attrib = an_object["attrib"];
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_block;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ pith["block_is"] = eN.blk_is.quote;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
+ object_reset(an_object);
+ processing.remove("verse");
+ ++cntr;
#+END_SRC
****** make: group block
-#+NAME: abs_functions_block_line_status_empty_3
+#+NAME: abs_functions_block_line_status_empty_block_group
#+BEGIN_SRC d
- } else if (pith["block_is"] == eN.blk_is.group) {
- obj_cite_digits = ocn_emit(pith["ocn"]);
- an_object["bookindex_nugget"]
- = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
- bookindex_unordered_hashes
- = bookindex_extract_hash.bookindex_nugget_hash(
- an_object["bookindex_nugget"],
- obj_cite_digits,
- tag_in_seg
- );
- an_object["is"] = "group";
- auto comp_obj_location
- = node_construct.node_location_emitter(
- content_non_header,
- tag_in_seg,
- lev_anchor_tag,
- tag_assoc,
- obj_cite_digits,
- cntr,
- heading_ptr-1,
- an_object["is"]
- );
- TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
- = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.is_of_part = "body";
- comp_obj_block.metainfo.is_of_section = "body";
- comp_obj_block.metainfo.is_of_type = "block";
- comp_obj_block.metainfo.is_a = "group";
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_block.metainfo.lang = an_object["lang"];
- comp_obj_block.metainfo.attrib = an_object["attrib"];
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.text = an_object["substantive"];
- comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_block;
- tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
- pith["block_is"] = eN.blk_is.poem;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
- object_reset(an_object);
- processing.remove("verse");
- ++cntr;
+} else if (pith["block_is"] == eN.blk_is.group) {
+ obj_cite_digits = ocn_emit(pith["ocn"]);
+ an_object["bookindex_nugget"]
+ = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
+ bookindex_unordered_hashes
+ = bookindex_extract_hash.bookindex_nugget_hash(
+ an_object["bookindex_nugget"],
+ obj_cite_digits,
+ tag_in_seg
+ );
+ an_object["is"] = "group";
+ auto comp_obj_location
+ = node_construct.node_location_emitter(
+ content_non_header,
+ tag_in_seg,
+ lev_anchor_tag,
+ tag_assoc,
+ obj_cite_digits,
+ cntr,
+ heading_ptr-1,
+ an_object["is"]
+ );
+ TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
+ = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "group";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_block.metainfo.lang = an_object["lang"];
+ comp_obj_block.metainfo.attrib = an_object["attrib"];
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_block;
+ tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc);
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
+ object_reset(an_object);
+ processing.remove("verse");
+ ++cntr;
#+END_SRC
****** make: block
-#+NAME: abs_functions_block_line_status_empty_4
+#+NAME: abs_functions_block_line_status_empty_block_block
#+BEGIN_SRC d
- } else if (pith["block_is"] == eN.blk_is.block) {
- obj_cite_digits = ocn_emit(pith["ocn"]);
- an_object["bookindex_nugget"]
- = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
- bookindex_unordered_hashes
- = bookindex_extract_hash.bookindex_nugget_hash(
- an_object["bookindex_nugget"],
- obj_cite_digits,
- tag_in_seg
- );
- an_object["is"] = "block";
- auto comp_obj_location
- = node_construct.node_location_emitter(
- content_non_header,
- tag_in_seg,
- lev_anchor_tag,
- tag_assoc,
- obj_cite_digits,
- cntr,
- heading_ptr-1,
- an_object["is"]
- );
- TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
- = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- // anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.is_of_part = "body";
- comp_obj_block.metainfo.is_of_section = "body";
- comp_obj_block.metainfo.is_of_type = "block";
- comp_obj_block.metainfo.is_a = "block";
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digit_type;
- comp_obj_block.metainfo.lang = an_object["lang"];
- comp_obj_block.metainfo.attrib = an_object["attrib"];
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.text = an_object["substantive"];
- comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_block;
- pith["block_is"] = eN.blk_is.block;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
- object_reset(an_object);
- processing.remove("verse");
- ++cntr;
+} else if (pith["block_is"] == eN.blk_is.block) {
+ obj_cite_digits = ocn_emit(pith["ocn"]);
+ an_object["bookindex_nugget"]
+ = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
+ bookindex_unordered_hashes
+ = bookindex_extract_hash.bookindex_nugget_hash(
+ an_object["bookindex_nugget"],
+ obj_cite_digits,
+ tag_in_seg
+ );
+ an_object["is"] = "block";
+ auto comp_obj_location
+ = node_construct.node_location_emitter(
+ content_non_header,
+ tag_in_seg,
+ lev_anchor_tag,
+ tag_assoc,
+ obj_cite_digits,
+ cntr,
+ heading_ptr-1,
+ an_object["is"]
+ );
+ TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
+ = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ // anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.is_of_part = "body";
+ comp_obj_block.metainfo.is_of_section = "body";
+ comp_obj_block.metainfo.is_of_type = "block";
+ comp_obj_block.metainfo.is_a = "block";
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digit_type;
+ comp_obj_block.metainfo.lang = an_object["lang"];
+ comp_obj_block.metainfo.attrib = an_object["attrib"];
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_block;
+ pith["block_is"] = eN.blk_is.block;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
+ object_reset(an_object);
+ processing.remove("verse");
+ ++cntr;
#+END_SRC
****** make: poem
-#+NAME: abs_functions_block_line_status_empty_5
+#+NAME: abs_functions_block_line_status_empty_block_poem
#+BEGIN_SRC d
- } else if (pith["block_is"] == eN.blk_is.poem) {
- an_object["bookindex_nugget"]
- = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
- bookindex_unordered_hashes
- = bookindex_extract_hash.bookindex_nugget_hash(
- an_object["bookindex_nugget"],
- obj_cite_digits,
- tag_in_seg
- );
- an_object["is"] = "verse";
- auto comp_obj_location
- = node_construct.node_location_emitter(
- content_non_header,
- tag_in_seg,
- lev_anchor_tag,
- tag_assoc,
- obj_cite_digits,
- cntr,
- heading_ptr-1,
- an_object["is"]
- );
- comp_obj_poem_ocn = comp_obj_poem_ocn.init;
- comp_obj_poem_ocn.metainfo.is_of_part = "body";
- comp_obj_poem_ocn.metainfo.is_of_section = "body";
- comp_obj_poem_ocn.metainfo.is_of_type = "block";
- comp_obj_poem_ocn.metainfo.is_a = "poem";
- comp_obj_poem_ocn.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_poem_ocn.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_poem_ocn.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_poem_ocn.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_poem_ocn.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_poem_ocn.text = "";
- the_document_body_section ~= comp_obj_poem_ocn;
- pith["block_is"] = eN.blk_is.poem;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
- object_reset(an_object);
- processing.remove("verse");
+} else if (pith["block_is"] == eN.blk_is.poem) {
+ an_object["bookindex_nugget"]
+ = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
+ bookindex_unordered_hashes
+ = bookindex_extract_hash.bookindex_nugget_hash(
+ an_object["bookindex_nugget"],
+ obj_cite_digits,
+ tag_in_seg
+ );
+ an_object["is"] = "verse";
+ auto comp_obj_location
+ = node_construct.node_location_emitter(
+ content_non_header,
+ tag_in_seg,
+ lev_anchor_tag,
+ tag_assoc,
+ obj_cite_digits,
+ cntr,
+ heading_ptr-1,
+ an_object["is"]
+ );
+ comp_obj_poem_ocn = comp_obj_poem_ocn.init;
+ comp_obj_poem_ocn.metainfo.is_of_part = "body";
+ comp_obj_poem_ocn.metainfo.is_of_section = "body";
+ comp_obj_poem_ocn.metainfo.is_of_type = "block";
+ comp_obj_poem_ocn.metainfo.is_a = "poem";
+ comp_obj_poem_ocn.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_poem_ocn.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_poem_ocn.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_poem_ocn.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_poem_ocn.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_poem_ocn.text = "";
+ the_document_body_section ~= comp_obj_poem_ocn;
+ pith["block_is"] = eN.blk_is.poem;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
+ object_reset(an_object);
+ processing.remove("verse");
#+END_SRC
****** make: code block
-#+NAME: abs_functions_block_line_status_empty_6
+#+NAME: abs_functions_block_line_status_empty_block_code
#+BEGIN_SRC d
- } else if (pith["block_is"] == eN.blk_is.code) {
- obj_cite_digits = ocn_emit(pith["ocn"]);
- an_object["bookindex_nugget"]
- = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
- bookindex_unordered_hashes
- = bookindex_extract_hash.bookindex_nugget_hash(
- an_object["bookindex_nugget"],
- obj_cite_digits,
- tag_in_seg
- );
- an_object["is"] = "code";
- auto comp_obj_location
- = node_construct.node_location_emitter(
- content_non_header,
- tag_in_seg,
- lev_anchor_tag,
- tag_assoc,
- obj_cite_digits,
- cntr,
- heading_ptr-1,
- an_object["is"]
- );
- TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
- = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
- comp_obj_code = comp_obj_code.init;
- comp_obj_code.metainfo.is_of_part = "body";
- comp_obj_code.metainfo.is_of_section = "body";
- comp_obj_code.metainfo.is_of_type = "block";
- comp_obj_code.metainfo.is_a = "code";
- comp_obj_code.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_code.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_code.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_code.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_code.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_code.metainfo.syntax = an_object["syntax"];
- comp_obj_code.metainfo.attrib = an_object["attrib"];
- comp_obj_code.code_block.linenumbers = (an_object["attrib"].match(rgx.code_numbering)) ? true : false;
- comp_obj_code.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_code.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_code.text = an_object["substantive"];
- comp_obj_code.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
- comp_obj_code.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
- comp_obj_code.has.inline_links = substantive_obj_misc_tuple[sObj.links];
- the_document_body_section ~= comp_obj_code;
- pith["block_is"] = eN.blk_is.code;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
- object_reset(an_object);
- processing.remove("verse");
- ++cntr;
+} else if (pith["block_is"] == eN.blk_is.code) {
+ obj_cite_digits = ocn_emit(pith["ocn"]);
+ an_object["bookindex_nugget"]
+ = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
+ bookindex_unordered_hashes
+ = bookindex_extract_hash.bookindex_nugget_hash(
+ an_object["bookindex_nugget"],
+ obj_cite_digits,
+ tag_in_seg
+ );
+ an_object["is"] = "code";
+ auto comp_obj_location
+ = node_construct.node_location_emitter(
+ content_non_header,
+ tag_in_seg,
+ lev_anchor_tag,
+ tag_assoc,
+ obj_cite_digits,
+ cntr,
+ heading_ptr-1,
+ an_object["is"]
+ );
+ TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
+ = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tag = substantive_obj_misc_tuple[sObj.anchor_tag];
+ comp_obj_code = comp_obj_code.init;
+ comp_obj_code.metainfo.is_of_part = "body";
+ comp_obj_code.metainfo.is_of_section = "body";
+ comp_obj_code.metainfo.is_of_type = "block";
+ comp_obj_code.metainfo.is_a = "code";
+ comp_obj_code.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_code.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_code.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_code.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_code.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_code.metainfo.syntax = an_object["syntax"];
+ comp_obj_code.metainfo.attrib = an_object["attrib"];
+ comp_obj_code.code_block.linenumbers = (an_object["attrib"].match(rgx.code_numbering)) ? true : false;
+ comp_obj_code.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_code.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_code.text = an_object["substantive"];
+ comp_obj_code.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_code.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_code.has.inline_links = substantive_obj_misc_tuple[sObj.links];
+ the_document_body_section ~= comp_obj_code;
+ pith["block_is"] = eN.blk_is.code;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
+ object_reset(an_object);
+ processing.remove("verse");
+ ++cntr;
#+END_SRC
****** make: table
-#+NAME: abs_functions_block_line_status_empty_7
+#+NAME: abs_functions_block_line_status_empty_block_table
#+BEGIN_SRC d
- } else if (pith["block_is"] == eN.blk_is.table) {
- comp_obj_block = comp_obj_block.init;
- obj_cite_digits = ocn_emit(pith["ocn"]);
- an_object["bookindex_nugget"]
- = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
- bookindex_unordered_hashes
- = bookindex_extract_hash.bookindex_nugget_hash(
- an_object["bookindex_nugget"],
- obj_cite_digits,
- tag_in_seg
- );
- an_object["is"] = "table";
- auto comp_obj_location
- = node_construct.node_location_emitter(
- content_non_header,
- tag_in_seg,
- lev_anchor_tag,
- tag_assoc,
- obj_cite_digits,
- cntr,
- heading_ptr-1,
- an_object["is"]
- );
- TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
- = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
- an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
- comp_obj_block = comp_obj_block.init;
- comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
- comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
- comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
- comp_obj_block = comp_obj_block.flow_table_instructions(an_object["table_head"]);
- comp_obj_block = comp_obj_block.flow_table_substantive_munge(an_object["substantive"]);
- the_document_body_section ~= comp_obj_block;
- pith["block_is"] = eN.blk_is.table;
- pith["block_state"] = eN.blk_state.off;
- pith["block_delim"] = eN.blk_delim.off;
- object_reset(an_object);
- processing.remove("verse");
- ++cntr;
- }
+} else if (pith["block_is"] == eN.blk_is.table) {
+ comp_obj_block = comp_obj_block.init;
+ obj_cite_digits = ocn_emit(pith["ocn"]);
+ an_object["bookindex_nugget"]
+ = ("bookindex_nugget" in an_object) ? an_object["bookindex_nugget"] : "";
+ bookindex_unordered_hashes
+ = bookindex_extract_hash.bookindex_nugget_hash(
+ an_object["bookindex_nugget"],
+ obj_cite_digits,
+ tag_in_seg
+ );
+ an_object["is"] = "table";
+ auto comp_obj_location
+ = node_construct.node_location_emitter(
+ content_non_header,
+ tag_in_seg,
+ lev_anchor_tag,
+ tag_assoc,
+ obj_cite_digits,
+ cntr,
+ heading_ptr-1,
+ an_object["is"]
+ );
+ TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple
+ = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, No._new_doc);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ comp_obj_block = comp_obj_block.init;
+ comp_obj_block.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_block.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_block.metainfo.object_number_off = obj_cite_digits.off;
+ comp_obj_block.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ comp_obj_block.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_block.metainfo.o_n_book_index = obj_cite_digits.bkidx;
+ comp_obj_block.metainfo.object_number_type = obj_cite_digits.type;
+ comp_obj_block = comp_obj_block.flow_table_instructions(an_object["table_head"]);
+ comp_obj_block = comp_obj_block.flow_table_substantive_munge(an_object["substantive"]);
+ the_document_body_section ~= comp_obj_block;
+ pith["block_is"] = eN.blk_is.table;
+ pith["block_state"] = eN.blk_state.off;
+ pith["block_delim"] = eN.blk_delim.off;
+ object_reset(an_object);
+ processing.remove("verse");
+ ++cntr;
+}
#+END_SRC
***** }
-#+NAME: abs_functions_block_line_status_empty_8
+#+NAME: abs_functions_block_line_status_empty_block_close_function_close
#+BEGIN_SRC d
}
return an_object;
@@ -4924,7 +4930,7 @@ process and use an_object["table_head"] (then empty it)
*** heading or paragraph :heading:paragraph:
**** heading found :heading:
-#+NAME: abs_functions_heading_0
+#+NAME: abs_functions_heading_found
#+BEGIN_SRC d
@safe string[string] flow_heading_found_()(
char[] line,
@@ -5011,7 +5017,7 @@ process and use an_object["table_head"] (then empty it)
**** heading make set :heading:
-#+NAME: abs_functions_heading_1
+#+NAME: abs_functions_heading_make_set
#+BEGIN_SRC d
@safe char[] flow_heading_make_set_()(
char[] line,
@@ -5073,7 +5079,7 @@ process and use an_object["table_head"] (then empty it)
**** heading match :heading:
-#+NAME: abs_functions_heading_2
+#+NAME: abs_functions_heading_matched
#+BEGIN_SRC d
@safe string[string] flow_heading_matched_(CMM)(
char[] line,
@@ -5229,7 +5235,7 @@ process and use an_object["table_head"] (then empty it)
**** para match :para:
-#+NAME: abs_functions_para_0
+#+NAME: abs_functions_para_matched
#+BEGIN_SRC d
@safe string[string] flow_para_match_()(
char[] line,
@@ -5288,7 +5294,7 @@ process and use an_object["table_head"] (then empty it)
**** text font face
-#+NAME: abs_functions_para_1
+#+NAME: abs_functions_para_font_faces_line
#+BEGIN_SRC d
@safe char[] font_faces_line()(
char[] textline,
@@ -5325,7 +5331,7 @@ process and use an_object["table_head"] (then empty it)
***** table instructions
-#+NAME: abs_functions_table_0
+#+NAME: abs_functions_table_instructions
#+BEGIN_SRC d
@safe ObjGenericComposite flow_table_instructions(H)(
return ref ObjGenericComposite table_object,
@@ -5356,7 +5362,7 @@ process and use an_object["table_head"] (then empty it)
***** table array munge
-#+NAME: abs_functions_table_1
+#+NAME: abs_functions_table_munge_array
#+BEGIN_SRC d
@safe ObjGenericComposite flow_table_array_munge(T)(
return ref ObjGenericComposite table_object,
@@ -5486,7 +5492,7 @@ process and use an_object["table_head"] (then empty it)
***** table substantive munge
-#+NAME: abs_functions_table_2
+#+NAME: abs_functions_table_munge_substantive
#+BEGIN_SRC d
@system ObjGenericComposite flow_table_substantive_munge(T)(
return ref ObjGenericComposite table_object,
@@ -5508,7 +5514,7 @@ process and use an_object["table_head"] (then empty it)
***** table substantive munge special
-#+NAME: abs_functions_table_3
+#+NAME: abs_functions_table_munge_substantive_special
#+BEGIN_SRC d
@system ObjGenericComposite flow_table_substantive_munge_special(T)(
return ref ObjGenericComposite table_object,
@@ -5588,7 +5594,7 @@ process and use an_object["table_head"] (then empty it)
****** { struct, inline markup munge
-#+NAME: meta_emitters_obj_inline_markup_munge_0
+#+NAME: meta_emitters_obj_inline_markup_munge_function_open
#+BEGIN_SRC d
@safe static struct ObjInlineMarkupMunge {
string[string] obj_txt;
@@ -5606,211 +5612,211 @@ process and use an_object["table_head"] (then empty it)
}
#+END_SRC
-#+NAME: meta_emitters_obj_inline_markup_munge_1
+#+NAME: meta_emitters_obj_inline_markup_munge_function_markup_images
#+BEGIN_SRC d
- @safe static auto images()(string obj_txt_in) {
- static auto mng = InlineMarkup();
- /+ url matched +/
- obj_txt_in = obj_txt_in.replaceAll(rgx.inline_notes_al_special, ""); // TODO reinstate when special footnotes are implemented
- if (obj_txt_in.match(rgx.smid_image_generic)) { /+ images with and without links +/
+@safe static auto images()(string obj_txt_in) {
+ static auto mng = InlineMarkup();
+ /+ url matched +/
+ obj_txt_in = obj_txt_in.replaceAll(rgx.inline_notes_al_special, ""); // TODO reinstate when special footnotes are implemented
+ if (obj_txt_in.match(rgx.smid_image_generic)) { /+ images with and without links +/
+ debug(images) {
+ writeln("Image: ", obj_txt_in);
+ }
+ if (obj_txt_in.match(rgx.smid_image_with_dimensions)) {
+ obj_txt_in = obj_txt_in
+ .replaceAll(rgx.smid_image_with_dimensions, ("$1" ~ mkup.img ~ "$2,w$3h$4 " ~ "$5"))
+ .replaceAll(rgx.smid_image_delimit, ("$1"
+ ~ mkup.lnk_o ~ "$2".strip ~ mkup.lnk_c
+ ~ mkup.url_o ~ mkup.url_c));
debug(images) {
- writeln("Image: ", obj_txt_in);
- }
- if (obj_txt_in.match(rgx.smid_image_with_dimensions)) {
- obj_txt_in = obj_txt_in
- .replaceAll(rgx.smid_image_with_dimensions, ("$1" ~ mkup.img ~ "$2,w$3h$4 " ~ "$5"))
- .replaceAll(rgx.smid_image_delimit, ("$1"
- ~ mkup.lnk_o ~ "$2".strip ~ mkup.lnk_c
- ~ mkup.url_o ~ mkup.url_c));
- debug(images) {
- writeln("IMAGE with size: ", obj_txt_in);
- }
- } else if (obj_txt_in.match(rgx.smid_image)) {
- obj_txt_in = obj_txt_in
- .replaceAll(rgx.smid_image, ("$1" ~ mkup.img ~ "$2,w0h0" ~ "$3"))
- .replaceAll(rgx.smid_image_delimit, ("$1"
- ~ mkup.lnk_o ~ "$2".strip ~ mkup.lnk_c
- ~ mkup.url_o ~ mkup.url_c));
- debug(images) {
- writeln("IMAGE: ", obj_txt_in); // decide on representation
- }
+ writeln("IMAGE with size: ", obj_txt_in);
+ }
+ } else if (obj_txt_in.match(rgx.smid_image)) {
+ obj_txt_in = obj_txt_in
+ .replaceAll(rgx.smid_image, ("$1" ~ mkup.img ~ "$2,w0h0" ~ "$3"))
+ .replaceAll(rgx.smid_image_delimit, ("$1"
+ ~ mkup.lnk_o ~ "$2".strip ~ mkup.lnk_c
+ ~ mkup.url_o ~ mkup.url_c));
+ debug(images) {
+ writeln("IMAGE: ", obj_txt_in); // decide on representation
}
}
- return obj_txt_in;
}
+ return obj_txt_in;
+}
#+END_SRC
******* footnotes endnotes markup
-#+NAME: meta_emitters_obj_inline_markup_munge_2
+#+NAME: meta_emitters_obj_inline_markup_munge_function_markup_footnotes_endnotes
#+BEGIN_SRC d
- @safe TxtPlusHasFootnotes footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) {
- /+ endnotes (regular) +/
- bool flg_notes_reg = false;
- bool flg_notes_star = false;
- bool flg_notes_plus = false;
- obj_txt_in = obj_txt_in.replaceAll(
- rgx.inline_notes_curly,
- (mkup.en_a_o ~ " $1" ~ mkup.en_a_c)
- );
- if (!(stage_reset_note_numbers) && reset_note_numbers) {
- stage_reset_note_numbers = true;
- }
- obj_txt_out = "";
- if (obj_txt_in.match(rgx.inline_notes_al_gen)) {
- string[] _tmp_txt;
- foreach (x; obj_txt_in.split("\n")) {
- if (auto m = x.matchAll(rgx.inline_text_and_note_al_)) {
- if (stage_reset_note_numbers) {
- n_foot = 0;
- n_foot_reg = 0;
- n_foot_sp_asterisk = 0;
- n_foot_sp_plus = 0;
- }
- stage_reset_note_numbers = false;
- foreach(n; m) {
- if (n.hit.to!string.match(rgx.inline_al_delimiter_open_symbol_star)) {
- flg_notes_star = true;
- ++n_foot_sp_asterisk;
- asterisks_ = "*";
- n_foot = n_foot_sp_asterisk;
- _tmp_txt ~= n.hit.to!string.replaceFirst(
- rgx.inline_al_delimiter_open_symbol_star,
- (mkup.en_a_o ~ replicate(asterisks_, n_foot_sp_asterisk) ~ " ")
- );
- } else if (n.hit.to!string.match(rgx.inline_al_delimiter_open_symbol_plus)) {
- flg_notes_plus = true;
- ++n_foot_sp_plus;
- plus_ = "*";
- n_foot = n_foot_sp_plus;
- _tmp_txt ~= n.hit.to!string.replaceFirst(
- rgx.inline_al_delimiter_open_symbol_plus,
- (mkup.en_a_o ~ replicate(plus_, n_foot_sp_plus) ~ " ")
- );
- } else if (n.hit.to!string.matchFirst(rgx.inline_al_delimiter_open_regular)) {
- string _tmp_str = n.hit.to!string;
- flg_notes_reg = true;
- foreach (q; n.hit.to!string.matchAll(rgx.inline_al_delimiter_open_regular)) {
- ++n_foot_reg;
- n_foot = n_foot_reg;
- _tmp_str = replaceFirst!(m => mkup.en_a_o ~ n_foot.to!string ~ " ")
- (_tmp_str, rgx.inline_al_delimiter_open_regular);
- }
- _tmp_txt ~= _tmp_str;
- } else {
- _tmp_txt ~= n.hit.to!string;
+@safe TxtPlusHasFootnotes footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) {
+ /+ endnotes (regular) +/
+ bool flg_notes_reg = false;
+ bool flg_notes_star = false;
+ bool flg_notes_plus = false;
+ obj_txt_in = obj_txt_in.replaceAll(
+ rgx.inline_notes_curly,
+ (mkup.en_a_o ~ " $1" ~ mkup.en_a_c)
+ );
+ if (!(stage_reset_note_numbers) && reset_note_numbers) {
+ stage_reset_note_numbers = true;
+ }
+ obj_txt_out = "";
+ if (obj_txt_in.match(rgx.inline_notes_al_gen)) {
+ string[] _tmp_txt;
+ foreach (x; obj_txt_in.split("\n")) {
+ if (auto m = x.matchAll(rgx.inline_text_and_note_al_)) {
+ if (stage_reset_note_numbers) {
+ n_foot = 0;
+ n_foot_reg = 0;
+ n_foot_sp_asterisk = 0;
+ n_foot_sp_plus = 0;
+ }
+ stage_reset_note_numbers = false;
+ foreach(n; m) {
+ if (n.hit.to!string.match(rgx.inline_al_delimiter_open_symbol_star)) {
+ flg_notes_star = true;
+ ++n_foot_sp_asterisk;
+ asterisks_ = "*";
+ n_foot = n_foot_sp_asterisk;
+ _tmp_txt ~= n.hit.to!string.replaceFirst(
+ rgx.inline_al_delimiter_open_symbol_star,
+ (mkup.en_a_o ~ replicate(asterisks_, n_foot_sp_asterisk) ~ " ")
+ );
+ } else if (n.hit.to!string.match(rgx.inline_al_delimiter_open_symbol_plus)) {
+ flg_notes_plus = true;
+ ++n_foot_sp_plus;
+ plus_ = "*";
+ n_foot = n_foot_sp_plus;
+ _tmp_txt ~= n.hit.to!string.replaceFirst(
+ rgx.inline_al_delimiter_open_symbol_plus,
+ (mkup.en_a_o ~ replicate(plus_, n_foot_sp_plus) ~ " ")
+ );
+ } else if (n.hit.to!string.matchFirst(rgx.inline_al_delimiter_open_regular)) {
+ string _tmp_str = n.hit.to!string;
+ flg_notes_reg = true;
+ foreach (q; n.hit.to!string.matchAll(rgx.inline_al_delimiter_open_regular)) {
+ ++n_foot_reg;
+ n_foot = n_foot_reg;
+ _tmp_str = replaceFirst!(m => mkup.en_a_o ~ n_foot.to!string ~ " ")
+ (_tmp_str, rgx.inline_al_delimiter_open_regular);
}
+ _tmp_txt ~= _tmp_str;
+ } else {
+ _tmp_txt ~= n.hit.to!string;
}
- obj_txt_out = _tmp_txt.join("\n");
}
+ obj_txt_out = _tmp_txt.join("\n");
}
- } else {
- obj_txt_out = obj_txt_in;
}
- TxtPlusHasFootnotes t = tuple(
- obj_txt_out,
- flg_notes_reg,
- flg_notes_star,
- flg_notes_plus,
- );
- return t;
+ } else {
+ obj_txt_out = obj_txt_in;
}
+ TxtPlusHasFootnotes t = tuple(
+ obj_txt_out,
+ flg_notes_reg,
+ flg_notes_star,
+ flg_notes_plus,
+ );
+ return t;
+}
#+END_SRC
******* object notes and links
-#+NAME: meta_emitters_obj_inline_markup_munge_3
+#+NAME: meta_emitters_obj_inline_markup_munge_function_object_notes_and_links
#+BEGIN_SRC d
- @safe private TxtPlusHasFootnotesUrlsImages object_notes_and_links_()(
- string obj_txt_in,
- bool reset_note_numbers = false
- ) {
- obj_txt_out = "";
- bool urls = false;
- bool images_without_dimensions = false;
- tail = "";
- /+ special endnotes +/
- obj_txt_in = obj_txt_in.replaceAll(
- rgx.inline_notes_curly_sp_asterisk,
- (mkup.en_a_o ~ "*" ~ " $1" ~ mkup.en_a_c)
- );
- obj_txt_in
- = obj_txt_in.replaceAll(
- rgx.inline_notes_curly_sp_plus,
- (mkup.en_a_o ~ "+" ~ " $1" ~ mkup.en_a_c)
- );
- /+ image matched +/
- if (obj_txt_in.match(rgx.smid_image_generic)) {
- obj_txt_in = images(obj_txt_in);
- if (obj_txt_in.match(rgx.smid_mod_image_without_dimensions)) {
- images_without_dimensions = true;
- }
- }
- /+ url matched +/
- if (obj_txt_in.match(rgx.smid_inline_url)) {
- urls = true;
- obj_txt_in = obj_txt_in.links_and_images;
- }
- if (auto m = obj_txt_in.match(rgx.para_inline_link_anchor)) {
- obj_txt_in = obj_txt_in
- .replaceAll(rgx.para_inline_link_anchor, "┃$1┃");
- }
- TxtPlusHasFootnotes ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers);
- obj_txt_out = ftn.obj_txt;
- debug(footnotes) {
- writeln(obj_txt_out, tail);
- }
- obj_txt_out = obj_txt_out ~ tail;
- debug(footnotesdone) {
- foreach(m; matchAll(obj_txt_out,
- (mkup.en_a_o ~ `\s*(.+?)` ~ mkup.en_a_c))) {
- writeln(m[1]);
- writeln(m.hit);
- }
- }
- TxtPlusHasFootnotesUrlsImages t = tuple(
- obj_txt_out,
- ftn.has_notes_reg,
- ftn.has_notes_star,
- ftn.has_notes_plus,
- urls,
- images_without_dimensions,
+@safe private TxtPlusHasFootnotesUrlsImages object_notes_and_links_()(
+ string obj_txt_in,
+ bool reset_note_numbers = false
+) {
+ obj_txt_out = "";
+ bool urls = false;
+ bool images_without_dimensions = false;
+ tail = "";
+ /+ special endnotes +/
+ obj_txt_in = obj_txt_in.replaceAll(
+ rgx.inline_notes_curly_sp_asterisk,
+ (mkup.en_a_o ~ "*" ~ " $1" ~ mkup.en_a_c)
+ );
+ obj_txt_in
+ = obj_txt_in.replaceAll(
+ rgx.inline_notes_curly_sp_plus,
+ (mkup.en_a_o ~ "+" ~ " $1" ~ mkup.en_a_c)
);
- return t;
- }
- auto init() {
- TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_("");
- return t;
- }
- invariant() {
- }
+ /+ image matched +/
+ if (obj_txt_in.match(rgx.smid_image_generic)) {
+ obj_txt_in = images(obj_txt_in);
+ if (obj_txt_in.match(rgx.smid_mod_image_without_dimensions)) {
+ images_without_dimensions = true;
+ }
+ }
+ /+ url matched +/
+ if (obj_txt_in.match(rgx.smid_inline_url)) {
+ urls = true;
+ obj_txt_in = obj_txt_in.links_and_images;
+ }
+ if (auto m = obj_txt_in.match(rgx.para_inline_link_anchor)) {
+ obj_txt_in = obj_txt_in
+ .replaceAll(rgx.para_inline_link_anchor, "┃$1┃");
+ }
+ TxtPlusHasFootnotes ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers);
+ obj_txt_out = ftn.obj_txt;
+ debug(footnotes) {
+ writeln(obj_txt_out, tail);
+ }
+ obj_txt_out = obj_txt_out ~ tail;
+ debug(footnotesdone) {
+ foreach(m; matchAll(obj_txt_out,
+ (mkup.en_a_o ~ `\s*(.+?)` ~ mkup.en_a_c))) {
+ writeln(m[1]);
+ writeln(m.hit);
+ }
+ }
+ TxtPlusHasFootnotesUrlsImages t = tuple(
+ obj_txt_out,
+ ftn.has_notes_reg,
+ ftn.has_notes_star,
+ ftn.has_notes_plus,
+ urls,
+ images_without_dimensions,
+ );
+ return t;
+}
+auto init() {
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_("");
+ return t;
+}
+invariant() {
+}
#+END_SRC
******* heading
- identified text by heading level marker followed by text until two new lines
- general markup
-#+NAME: meta_emitters_obj_inline_markup_munge_4
+#+NAME: meta_emitters_obj_inline_markup_munge_function_heading
#+BEGIN_SRC d
- @safe auto munge_heading()(
- string obj_txt_in,
- bool reset_note_numbers = false
- ) {
- obj_txt["munge"] = obj_txt_in
- .replaceFirst(rgx.headings, "")
- .replaceFirst(rgx.object_number_off_all, "")
- .strip;
- TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"], reset_note_numbers);
- debug(munge) {
- writeln(__LINE__);
- writeln(obj_txt_in);
- writeln(__LINE__);
- writeln(obj_txt["munge"].to!string);
- }
- return t;
- }
- invariant() {
+@safe auto munge_heading()(
+ string obj_txt_in,
+ bool reset_note_numbers = false
+) {
+ obj_txt["munge"] = obj_txt_in
+ .replaceFirst(rgx.headings, "")
+ .replaceFirst(rgx.object_number_off_all, "")
+ .strip;
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"], reset_note_numbers);
+ debug(munge) {
+ writeln(__LINE__);
+ writeln(obj_txt_in);
+ writeln(__LINE__);
+ writeln(obj_txt["munge"].to!string);
}
+ return t;
+}
+invariant() {
+}
#+END_SRC
******* para
@@ -5821,33 +5827,33 @@ process and use an_object["table_head"] (then empty it)
- footnotes/endnotes
- links
-#+NAME: meta_emitters_obj_inline_markup_munge_5
+#+NAME: meta_emitters_obj_inline_markup_munge_function_para
#+BEGIN_SRC d
- @safe auto munge_para()(string obj_txt_in) {
- obj_txt["munge"] = (obj_txt_in)
- .replaceFirst(rgx.para_attribs, "")
- .replaceFirst(rgx.object_number_off_all, "");
- TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
- debug(munge) {
- writeln(__LINE__);
- writeln(obj_txt_in);
- writeln(__LINE__);
- writeln(obj_txt["munge"].to!string);
- }
- return t;
+@safe auto munge_para()(string obj_txt_in) {
+ obj_txt["munge"] = (obj_txt_in)
+ .replaceFirst(rgx.para_attribs, "")
+ .replaceFirst(rgx.object_number_off_all, "");
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
+ debug(munge) {
+ writeln(__LINE__);
+ writeln(obj_txt_in);
+ writeln(__LINE__);
+ writeln(obj_txt["munge"].to!string);
}
+ return t;
+}
#+END_SRC
******* quote
-#+NAME: meta_emitters_obj_inline_markup_munge_6
+#+NAME: meta_emitters_obj_inline_markup_munge_function_quote
#+BEGIN_SRC d
- @safe string munge_quote()(string obj_txt_in) {
- obj_txt["munge"] = obj_txt_in;
- return obj_txt["munge"];
- }
- invariant() {
- }
+@safe string munge_quote()(string obj_txt_in) {
+ obj_txt["munge"] = obj_txt_in;
+ return obj_txt["munge"];
+}
+invariant() {
+}
#+END_SRC
******* group
@@ -5860,14 +5866,14 @@ process and use an_object["table_head"] (then empty it)
- drop spaces
- keep newlines?
-#+NAME: meta_emitters_obj_inline_markup_munge_7
+#+NAME: meta_emitters_obj_inline_markup_munge_function_group
#+BEGIN_SRC d
- @safe auto munge_group(string obj_txt_in) {
- TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in.split("\n\n").join(" \\\\\n \\\\\n"));
- return t;
- }
- invariant() {
- }
+@safe auto munge_group(string obj_txt_in) {
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in.split("\n\n").join(" \\\\\n \\\\\n"));
+ return t;
+}
+invariant() {
+}
#+END_SRC
******* block
@@ -5881,14 +5887,14 @@ process and use an_object["table_head"] (then empty it)
- keep newlines
- newlines detected and kept?
-#+NAME: meta_emitters_obj_inline_markup_munge_8
+#+NAME: meta_emitters_obj_inline_markup_munge_function_block
#+BEGIN_SRC d
- @safe auto munge_block()(string obj_txt_in) {
- TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in);
- return t;
- }
- invariant() {
- }
+@safe auto munge_block()(string obj_txt_in) {
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in);
+ return t;
+}
+invariant() {
+}
#+END_SRC
******* verse (poem)
@@ -5900,14 +5906,14 @@ process and use an_object["table_head"] (then empty it)
- footnotes/endnotes
- links?
-#+NAME: meta_emitters_obj_inline_markup_munge_9
+#+NAME: meta_emitters_obj_inline_markup_munge_function_verse
#+BEGIN_SRC d
- @safe auto munge_verse()(string obj_txt_in) {
- TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in);
- return t;
- }
- invariant() {
- }
+@safe auto munge_verse()(string obj_txt_in) {
+ TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt_in);
+ return t;
+}
+invariant() {
+}
#+END_SRC
******* code
@@ -5918,46 +5924,46 @@ process and use an_object["table_head"] (then empty it)
- no general markup
- one special character represented by mkup.nbsp ░
-#+NAME: meta_emitters_obj_inline_markup_munge_10
+#+NAME: meta_emitters_obj_inline_markup_munge_function_code
#+BEGIN_SRC d
- @safe string munge_code()(string obj_txt_in) {
- obj_txt_in = obj_txt_in.replaceAll(rgx.space, mkup.nbsp);
- obj_txt["munge"] = obj_txt_in;
- return obj_txt["munge"];
- }
- invariant() {
- }
+@safe string munge_code()(string obj_txt_in) {
+ obj_txt_in = obj_txt_in.replaceAll(rgx.space, mkup.nbsp);
+ obj_txt["munge"] = obj_txt_in;
+ return obj_txt["munge"];
+}
+invariant() {
+}
#+END_SRC
******* table
- table block identified by open an close tags
- table markup
-#+NAME: meta_emitters_obj_inline_markup_munge_11
+#+NAME: meta_emitters_obj_inline_markup_munge_function_table
#+BEGIN_SRC d
- @safe string munge_table()(string obj_txt_in) {
- obj_txt["munge"] = obj_txt_in;
- return obj_txt["munge"];
- }
- invariant() {
- }
+@safe string munge_table()(string obj_txt_in) {
+ obj_txt["munge"] = obj_txt_in;
+ return obj_txt["munge"];
+}
+invariant() {
+}
#+END_SRC
******* comment
-#+NAME: meta_emitters_obj_inline_markup_munge_12
+#+NAME: meta_emitters_obj_inline_markup_munge_function_comment
#+BEGIN_SRC d
- @safe string munge_comment()(string obj_txt_in) {
- obj_txt["munge"] = obj_txt_in;
- return obj_txt["munge"];
- }
- invariant() {
- }
+@safe string munge_comment()(string obj_txt_in) {
+ obj_txt["munge"] = obj_txt_in;
+ return obj_txt["munge"];
+}
+invariant() {
+}
#+END_SRC
****** }
-#+NAME: meta_emitters_obj_inline_markup_munge_13
+#+NAME: meta_emitters_obj_inline_markup_munge_function_close
#+BEGIN_SRC d
}
#+END_SRC
@@ -5965,7 +5971,7 @@ process and use an_object["table_head"] (then empty it)
***** toc, tags, object inline markup :markup:inline:
****** {
-#+NAME: meta_emitters_obj_inline_markup
+#+NAME: meta_emitters_obj_inline_markup_function_open
#+BEGIN_SRC d
static struct ObjInlineMarkup {
static auto rgx = RgxI();
@@ -5978,404 +5984,404 @@ static struct ObjInlineMarkup {
#+NAME: meta_emitters_obj_inline_markup_and_anchor_tags_and_misc
#+BEGIN_SRC d
- @safe TxtAndAnchorTagPlusHasFootnotesUrlsImages obj_inline_markup_and_anchor_tags_and_misc(CMM)(
- string[string] obj_,
- string obj_key_,
- CMM conf_make_meta,
- Flag!"_new_doc" _new_doc
- ) {
- obj_txt["munge"] = obj_[obj_key_].dup;
- obj_txt["munge"] = (obj_["is"].match(ctRegex!(`verse|code`)))
- ? obj_txt["munge"]
- : obj_txt["munge"].strip;
- if (_new_doc) {
- anchor_tag = "";
- }
- auto x = munge.init;
- bool[string] obj_notes_and_links;
- obj_notes_and_links["notes_reg"] = false;
- obj_notes_and_links["notes_star"] = false;
- obj_notes_and_links["links"] = false;
- obj_notes_and_links["image_no_dimensions"] = false;
- if ((obj_["is"] == "para")
- || (obj_["is"] == "heading")
- || (obj_["is"] == "quote")
- || (obj_["is"] == "group")
- || (obj_["is"] == "block")
- || (obj_["is"] == "verse")) {
- obj_txt["munge"] = (obj_txt["munge"]).inline_markup_faces;
- obj_txt["munge"] = (obj_txt["munge"]).links_and_images;
- }
- switch (obj_["is"]) {
- case "heading":
- if (_new_doc) {
- anchor_tag = "";
- }
- obj_txt["munge"] = _configured_auto_heading_numbering_and_segment_anchor_tags(obj_txt["munge"], obj_, conf_make_meta, _new_doc);
- obj_txt["munge"] = _make_segment_anchor_tags_if_none_provided(obj_txt["munge"], obj_["lev"], _new_doc);
- if (auto m = obj_txt["munge"].match(rgx.heading_anchor_tag)) {
- anchor_tag = m.captures[1];
- } else if (obj_["lev"] == "1") {
- writeln("heading anchor tag missing: ", obj_txt["munge"]);
- }
- x = munge.munge_heading(obj_txt["munge"], reset_note_numbers);
- reset_note_numbers = false;
- goto default;
- case "para":
- x = munge.munge_para(obj_txt["munge"]);
- goto default;
- case "group":
- x = munge.munge_group(obj_txt["munge"]);
- goto default;
- case "block":
- x = munge.munge_block(obj_txt["munge"]);
- goto default;
- case "verse":
- x = munge.munge_verse(obj_txt["munge"]);
- goto default;
- case "code":
- obj_txt["munge"] = munge.munge_code(obj_txt["munge"]);
- break;
- case "table":
- obj_txt["munge"] = munge.munge_table(obj_txt["munge"]);
- break;
- case "quote":
- obj_txt["munge"] = munge.munge_quote(obj_txt["munge"]);
- break;
- case "comment":
- obj_txt["munge"] = munge.munge_comment(obj_txt["munge"]);
- break;
- case "doc_end_reset":
- munge.initialize_note_numbers();
- break;
- default:
- /+ para, heading, group, block, verse +/
- obj_txt["munge"] = x[0];
- obj_notes_and_links["notes_reg"] = x[1];
- obj_notes_and_links["notes_star"] = x[2];
- obj_notes_and_links["notes_plus"] = x[3];
- obj_notes_and_links["links"] = x[4];
- obj_notes_and_links["image_no_dimensions"] = x[5];
- break;
- }
- TxtAndAnchorTagPlusHasFootnotesUrlsImages t = tuple(
- obj_txt["munge"],
- anchor_tag,
- obj_notes_and_links["notes_reg"],
- obj_notes_and_links["notes_star"],
- obj_notes_and_links["links"],
- obj_notes_and_links["image_no_dimensions"],
- );
+@safe TxtAndAnchorTagPlusHasFootnotesUrlsImages obj_inline_markup_and_anchor_tags_and_misc(CMM)(
+ string[string] obj_,
+ string obj_key_,
+ CMM conf_make_meta,
+ Flag!"_new_doc" _new_doc
+) {
+ obj_txt["munge"] = obj_[obj_key_].dup;
+ obj_txt["munge"] = (obj_["is"].match(ctRegex!(`verse|code`)))
+ ? obj_txt["munge"]
+ : obj_txt["munge"].strip;
+ if (_new_doc) {
anchor_tag = "";
- return t;
}
- invariant() {
+ auto x = munge.init;
+ bool[string] obj_notes_and_links;
+ obj_notes_and_links["notes_reg"] = false;
+ obj_notes_and_links["notes_star"] = false;
+ obj_notes_and_links["links"] = false;
+ obj_notes_and_links["image_no_dimensions"] = false;
+ if ((obj_["is"] == "para")
+ || (obj_["is"] == "heading")
+ || (obj_["is"] == "quote")
+ || (obj_["is"] == "group")
+ || (obj_["is"] == "block")
+ || (obj_["is"] == "verse")) {
+ obj_txt["munge"] = (obj_txt["munge"]).inline_markup_faces;
+ obj_txt["munge"] = (obj_txt["munge"]).links_and_images;
+ }
+ switch (obj_["is"]) {
+ case "heading":
+ if (_new_doc) {
+ anchor_tag = "";
+ }
+ obj_txt["munge"] = _configured_auto_heading_numbering_and_segment_anchor_tags(obj_txt["munge"], obj_, conf_make_meta, _new_doc);
+ obj_txt["munge"] = _make_segment_anchor_tags_if_none_provided(obj_txt["munge"], obj_["lev"], _new_doc);
+ if (auto m = obj_txt["munge"].match(rgx.heading_anchor_tag)) {
+ anchor_tag = m.captures[1];
+ } else if (obj_["lev"] == "1") {
+ writeln("heading anchor tag missing: ", obj_txt["munge"]);
+ }
+ x = munge.munge_heading(obj_txt["munge"], reset_note_numbers);
+ reset_note_numbers = false;
+ goto default;
+ case "para":
+ x = munge.munge_para(obj_txt["munge"]);
+ goto default;
+ case "group":
+ x = munge.munge_group(obj_txt["munge"]);
+ goto default;
+ case "block":
+ x = munge.munge_block(obj_txt["munge"]);
+ goto default;
+ case "verse":
+ x = munge.munge_verse(obj_txt["munge"]);
+ goto default;
+ case "code":
+ obj_txt["munge"] = munge.munge_code(obj_txt["munge"]);
+ break;
+ case "table":
+ obj_txt["munge"] = munge.munge_table(obj_txt["munge"]);
+ break;
+ case "quote":
+ obj_txt["munge"] = munge.munge_quote(obj_txt["munge"]);
+ break;
+ case "comment":
+ obj_txt["munge"] = munge.munge_comment(obj_txt["munge"]);
+ break;
+ case "doc_end_reset":
+ munge.initialize_note_numbers();
+ break;
+ default:
+ /+ para, heading, group, block, verse +/
+ obj_txt["munge"] = x[0];
+ obj_notes_and_links["notes_reg"] = x[1];
+ obj_notes_and_links["notes_star"] = x[2];
+ obj_notes_and_links["notes_plus"] = x[3];
+ obj_notes_and_links["links"] = x[4];
+ obj_notes_and_links["image_no_dimensions"] = x[5];
+ break;
}
+ TxtAndAnchorTagPlusHasFootnotesUrlsImages t = tuple(
+ obj_txt["munge"],
+ anchor_tag,
+ obj_notes_and_links["notes_reg"],
+ obj_notes_and_links["notes_star"],
+ obj_notes_and_links["links"],
+ obj_notes_and_links["image_no_dimensions"],
+ );
+ anchor_tag = "";
+ return t;
+}
+invariant() {
+}
#+END_SRC
******* toc (table of contents), build, gather headings :markup:inline:
#+NAME: meta_emitters_obj_inline_markup_table_of_contents
#+BEGIN_SRC d
- @safe auto _clean_heading_toc_()(
- char[] heading_toc_,
- ) {
- auto m = (cast(char[]) heading_toc_).matchFirst(rgx.heading);
- heading_toc_ = (m.post).replaceAll(rgx.inline_notes_curly_gen, "");
- return heading_toc_;
- };
- @safe ObjGenericComposite[] flow_table_of_contents_gather_headings(CMM)(
- string[string] obj_,
- CMM conf_make_meta,
- string[string] tag_in_seg,
- string _anchor_tag,
- return ref string[][string] lev4_subtoc,
- ObjGenericComposite[] the_table_of_contents_section,
- ) {
- ObjGenericComposite comp_obj_toc;
- mixin InternalMarkup;
- static auto mkup = InlineMarkup();
- char[] heading_toc_ = (obj_["substantive"].dup.strip.to!(char[]))
- .replaceAll(rgx.inline_notes_al, "");
- heading_toc_ = _clean_heading_toc_(heading_toc_);
- auto attrib = "";
- string toc_txt_, subtoc_txt_;
- int[string] indent;
- if (obj_["lev_markup_number"].to!int > 0) {
- indent = [
- "hang_position" : obj_["lev_markup_number"].to!int,
- "base_position" : obj_["lev_markup_number"].to!int,
- ];
- toc_txt_ = format("%s%s%s%s#%s%s",
- mkup.lnk_o,
- heading_toc_.strip,
- mkup.lnk_c,
- mkup.url_o,
- _anchor_tag,
- mkup.url_c,
- );
- toc_txt_= toc_txt_.links_and_images;
- comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.metainfo.is_of_part = "frontmatter";
- comp_obj_toc.metainfo.is_of_section = "toc";
- comp_obj_toc.metainfo.is_of_type = "para";
- comp_obj_toc.metainfo.is_a = "toc";
- comp_obj_toc.metainfo.ocn = 0;
- 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;
- comp_obj_toc.text = toc_txt_.to!string.strip;
- comp_obj_toc.has.inline_links = true;
- the_table_of_contents_section ~= comp_obj_toc;
- }
- comp_obj_toc = comp_obj_toc.init;
- comp_obj_toc.metainfo.is_of_part = "frontmatter";
- comp_obj_toc.metainfo.is_of_section = "toc";
- comp_obj_toc.metainfo.is_of_type = "para";
- comp_obj_toc.metainfo.is_a = "toc";
- comp_obj_toc.metainfo.ocn = 0;
- 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) {
- case 0: .. case 3:
- break;
- case 4:
- lev4_subtoc[tag_in_seg["seg_lv4"]] = [];
- break;
- case 5: .. case 7:
- subtoc_txt_ = format("%s%s%s%s#%s%s",
- mkup.lnk_o,
- heading_toc_.strip,
- mkup.lnk_c,
- mkup.url_o,
- _anchor_tag,
- mkup.url_c,
- );
- lev4_subtoc[tag_in_seg["seg_lv4"]]
- ~= links_and_images(obj_["lev_markup_number"]
- ~ "~ " ~ subtoc_txt_.to!string.strip
- );
- break;
- default:
- break;
- }
- return the_table_of_contents_section;
- }
- invariant() {
+@safe auto _clean_heading_toc_()(
+ char[] heading_toc_,
+) {
+ auto m = (cast(char[]) heading_toc_).matchFirst(rgx.heading);
+ heading_toc_ = (m.post).replaceAll(rgx.inline_notes_curly_gen, "");
+ return heading_toc_;
+};
+@safe ObjGenericComposite[] flow_table_of_contents_gather_headings(CMM)(
+ string[string] obj_,
+ CMM conf_make_meta,
+ string[string] tag_in_seg,
+ string _anchor_tag,
+ return ref string[][string] lev4_subtoc,
+ ObjGenericComposite[] the_table_of_contents_section,
+) {
+ ObjGenericComposite comp_obj_toc;
+ mixin InternalMarkup;
+ static auto mkup = InlineMarkup();
+ char[] heading_toc_ = (obj_["substantive"].dup.strip.to!(char[]))
+ .replaceAll(rgx.inline_notes_al, "");
+ heading_toc_ = _clean_heading_toc_(heading_toc_);
+ auto attrib = "";
+ string toc_txt_, subtoc_txt_;
+ int[string] indent;
+ if (obj_["lev_markup_number"].to!int > 0) {
+ indent = [
+ "hang_position" : obj_["lev_markup_number"].to!int,
+ "base_position" : obj_["lev_markup_number"].to!int,
+ ];
+ toc_txt_ = format("%s%s%s%s#%s%s",
+ mkup.lnk_o,
+ heading_toc_.strip,
+ mkup.lnk_c,
+ mkup.url_o,
+ _anchor_tag,
+ mkup.url_c,
+ );
+ toc_txt_= toc_txt_.links_and_images;
+ comp_obj_toc = comp_obj_toc.init;
+ comp_obj_toc.metainfo.is_of_part = "frontmatter";
+ comp_obj_toc.metainfo.is_of_section = "toc";
+ comp_obj_toc.metainfo.is_of_type = "para";
+ comp_obj_toc.metainfo.is_a = "toc";
+ comp_obj_toc.metainfo.ocn = 0;
+ 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;
+ comp_obj_toc.text = toc_txt_.to!string.strip;
+ comp_obj_toc.has.inline_links = true;
+ the_table_of_contents_section ~= comp_obj_toc;
+ }
+ comp_obj_toc = comp_obj_toc.init;
+ comp_obj_toc.metainfo.is_of_part = "frontmatter";
+ comp_obj_toc.metainfo.is_of_section = "toc";
+ comp_obj_toc.metainfo.is_of_type = "para";
+ comp_obj_toc.metainfo.is_a = "toc";
+ comp_obj_toc.metainfo.ocn = 0;
+ 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) {
+ case 0: .. case 3:
+ break;
+ case 4:
+ lev4_subtoc[tag_in_seg["seg_lv4"]] = [];
+ break;
+ case 5: .. case 7:
+ subtoc_txt_ = format("%s%s%s%s#%s%s",
+ mkup.lnk_o,
+ heading_toc_.strip,
+ mkup.lnk_c,
+ mkup.url_o,
+ _anchor_tag,
+ mkup.url_c,
+ );
+ lev4_subtoc[tag_in_seg["seg_lv4"]]
+ ~= links_and_images(obj_["lev_markup_number"]
+ ~ "~ " ~ subtoc_txt_.to!string.strip
+ );
+ break;
+ default:
+ break;
}
+ return the_table_of_contents_section;
+}
+invariant() {
+}
#+END_SRC
******* private:
-#+NAME: meta_emitters_obj_inline_markup_private
+#+NAME: meta_emitters_obj_inline_markup_private_function_open
#+BEGIN_SRC d
private:
#+END_SRC
******** make heading number & segment anchor tags if instructed :markup:inline:segment:anchor:tags:
-#+NAME: meta_emitters_obj_inline_markup_heading_numbering_segment_anchor_tags_0
-#+BEGIN_SRC d
- static int[] heading_num = [ 0, 0, 0, 0 ];
- static string heading_number_auto_composite = "";
- static string heading_number_auto_composite_segname = "";
- static bool[] auto_heading_numbering = [ true, true, true, true];
- @safe static string _configured_auto_heading_numbering_and_segment_anchor_tags(CMM)(
- string munge_,
- string[string] obj_,
- CMM conf_make_meta,
- bool _new_doc,
- ) {
- if (_new_doc) {
- heading_num = [ 0, 0, 0, 0 ];
- heading_number_auto_composite = "";
- auto_heading_numbering = [ true, true, true, true];
- }
- if (conf_make_meta.make.auto_num_top_lv) {
- if (obj_["lev_markup_number"].to!int == 0) {
- heading_num[0] = 0;
- heading_num[1] = 0;
- heading_num[2] = 0;
- heading_num[3] = 0;
- heading_number_auto_composite = "";
- }
- /+ auto_num_depth minimum 0
- (1.) default 2 (1.1.1) max 3 (1.1.1.1) implement +/
- if (
- conf_make_meta.make.auto_num_top_lv
- > obj_["lev_markup_number"].to!uint
- ) {
- heading_num[1] = 0;
- heading_num[2] = 0;
- heading_num[3] = 0;
- } else if (
- conf_make_meta.make.auto_num_top_lv
- == obj_["lev_markup_number"].to!uint
- ) {
- auto_heading_numbering[0] =
- (munge_.match(rgx.auto_heading_numbering_off_lv1)) ? false : true;
- if (auto_heading_numbering[0]) {
- heading_num[0] ++;
- }
- heading_num[1] = 0;
- heading_num[2] = 0;
- heading_num[3] = 0;
- } else if (
- conf_make_meta.make.auto_num_top_lv
- == (obj_["lev_markup_number"].to!uint - 1)
- ) {
- auto_heading_numbering[1] =
- (munge_.match(rgx.auto_heading_numbering_off_lv2)) ? false : true;
- if (auto_heading_numbering[0]
- && auto_heading_numbering[1]) {
- heading_num[1] ++;
- }
- heading_num[2] = 0;
- heading_num[3] = 0;
- } else if (
- conf_make_meta.make.auto_num_top_lv
- == (obj_["lev_markup_number"].to!uint - 2)
- ) {
- auto_heading_numbering[2] =
- (munge_.match(rgx.auto_heading_numbering_off_lv3)) ? false : true;
- if (auto_heading_numbering[0]
- && auto_heading_numbering[1]
- && auto_heading_numbering[2]) {
- heading_num[2] ++;
- }
- heading_num[3] = 0;
- } else if (
- conf_make_meta.make.auto_num_top_lv
- == (obj_["lev_markup_number"].to!uint - 3)
- ) {
- auto_heading_numbering[3] =
- (munge_.match(rgx.auto_heading_numbering_off_lv4)) ? false : true;
- if (auto_heading_numbering[0]
- && auto_heading_numbering[1]
- && auto_heading_numbering[2]
- && auto_heading_numbering[3]) {
- heading_num[3] ++;
- }
- }
+#+NAME: meta_emitters_obj_inline_markup_heading_numbering_and_segment_anchor_tags
+#+BEGIN_SRC d
+static int[] heading_num = [ 0, 0, 0, 0 ];
+static string heading_number_auto_composite = "";
+static string heading_number_auto_composite_segname = "";
+static bool[] auto_heading_numbering = [ true, true, true, true];
+@safe static string _configured_auto_heading_numbering_and_segment_anchor_tags(CMM)(
+ string munge_,
+ string[string] obj_,
+ CMM conf_make_meta,
+ bool _new_doc,
+) {
+ if (_new_doc) {
+ heading_num = [ 0, 0, 0, 0 ];
+ heading_number_auto_composite = "";
+ auto_heading_numbering = [ true, true, true, true];
+ }
+ if (conf_make_meta.make.auto_num_top_lv) {
+ if (obj_["lev_markup_number"].to!int == 0) {
+ heading_num[0] = 0;
+ heading_num[1] = 0;
+ heading_num[2] = 0;
+ heading_num[3] = 0;
+ heading_number_auto_composite = "";
+ }
+ /+ auto_num_depth minimum 0
+ (1.) default 2 (1.1.1) max 3 (1.1.1.1) implement +/
+ if (
+ conf_make_meta.make.auto_num_top_lv
+ > obj_["lev_markup_number"].to!uint
+ ) {
+ heading_num[1] = 0;
+ heading_num[2] = 0;
+ heading_num[3] = 0;
+ } else if (
+ conf_make_meta.make.auto_num_top_lv
+ == obj_["lev_markup_number"].to!uint
+ ) {
+ auto_heading_numbering[0] =
+ (munge_.match(rgx.auto_heading_numbering_off_lv1)) ? false : true;
if (auto_heading_numbering[0]) {
- if (heading_num[3] > 0) {
- heading_number_auto_composite
- = (conf_make_meta.make.auto_num_depth.to!uint == 3
- && auto_heading_numbering[3])
- ? (format(q"┃%s.%s.%s.%s┃",
- heading_num[0].to!string,
- heading_num[1].to!string,
- heading_num[2].to!string,
- heading_num[3].to!string
- ))
- : "";
- } else if (heading_num[2] > 0) {
- heading_number_auto_composite
- = ((conf_make_meta.make.auto_num_depth.to!uint >= 2)
- && (conf_make_meta.make.auto_num_depth.to!uint <= 3)
- && auto_heading_numbering[2])
- ? (format(q"┃%s.%s.%s┃",
- heading_num[0].to!string,
- heading_num[1].to!string,
- heading_num[2].to!string
- ))
- : "";
- } else if (heading_num[1] > 0) {
- heading_number_auto_composite
- = ((conf_make_meta.make.auto_num_depth.to!uint >= 1)
- && (conf_make_meta.make.auto_num_depth.to!uint <= 3)
- && auto_heading_numbering[1])
- ? (format(q"┃%s.%s┃",
- heading_num[0].to!string,
- heading_num[1].to!string
- ))
- : "";
- } else if (heading_num[0] > 0
- && munge_.match(rgx.auto_heading_numbering_lv1)
- ) {
- heading_number_auto_composite
- = ((conf_make_meta.make.auto_num_depth.to!uint >= 0)
- && (conf_make_meta.make.auto_num_depth.to!uint <= 3)
- && auto_heading_numbering[0])
- ? (format(q"┃%s┃",
- heading_num[0].to!string
- ))
- : "";
- } else {
- heading_number_auto_composite = "";
- }
- }
- heading_number_auto_composite_segname =
- (heading_number_auto_composite.empty)
- ? ""
- : "seg_" ~ heading_number_auto_composite;
- debug(heading_number_auto) {
- writeln(heading_number_auto_composite);
- }
- if ((!empty(heading_number_auto_composite))
- && (obj_["lev_markup_number"].to!uint >= conf_make_meta.make.auto_num_top_lv)) {
- munge_ = munge_
- .replaceFirst(rgx.heading,
- "$1~$2 " ~ heading_number_auto_composite ~ ". ")
- .replaceFirst(rgx.heading_marker_missing_tag,
- "$1~" ~ heading_number_auto_composite_segname ~ " ");
+ heading_num[0] ++;
+ }
+ heading_num[1] = 0;
+ heading_num[2] = 0;
+ heading_num[3] = 0;
+ } else if (
+ conf_make_meta.make.auto_num_top_lv
+ == (obj_["lev_markup_number"].to!uint - 1)
+ ) {
+ auto_heading_numbering[1] =
+ (munge_.match(rgx.auto_heading_numbering_off_lv2)) ? false : true;
+ if (auto_heading_numbering[0]
+ && auto_heading_numbering[1]) {
+ heading_num[1] ++;
+ }
+ heading_num[2] = 0;
+ heading_num[3] = 0;
+ } else if (
+ conf_make_meta.make.auto_num_top_lv
+ == (obj_["lev_markup_number"].to!uint - 2)
+ ) {
+ auto_heading_numbering[2] =
+ (munge_.match(rgx.auto_heading_numbering_off_lv3)) ? false : true;
+ if (auto_heading_numbering[0]
+ && auto_heading_numbering[1]
+ && auto_heading_numbering[2]) {
+ heading_num[2] ++;
+ }
+ heading_num[3] = 0;
+ } else if (
+ conf_make_meta.make.auto_num_top_lv
+ == (obj_["lev_markup_number"].to!uint - 3)
+ ) {
+ auto_heading_numbering[3] =
+ (munge_.match(rgx.auto_heading_numbering_off_lv4)) ? false : true;
+ if (auto_heading_numbering[0]
+ && auto_heading_numbering[1]
+ && auto_heading_numbering[2]
+ && auto_heading_numbering[3]) {
+ heading_num[3] ++;
+ }
+ }
+ if (auto_heading_numbering[0]) {
+ if (heading_num[3] > 0) {
+ heading_number_auto_composite
+ = (conf_make_meta.make.auto_num_depth.to!uint == 3
+ && auto_heading_numbering[3])
+ ? (format(q"┃%s.%s.%s.%s┃",
+ heading_num[0].to!string,
+ heading_num[1].to!string,
+ heading_num[2].to!string,
+ heading_num[3].to!string
+ ))
+ : "";
+ } else if (heading_num[2] > 0) {
+ heading_number_auto_composite
+ = ((conf_make_meta.make.auto_num_depth.to!uint >= 2)
+ && (conf_make_meta.make.auto_num_depth.to!uint <= 3)
+ && auto_heading_numbering[2])
+ ? (format(q"┃%s.%s.%s┃",
+ heading_num[0].to!string,
+ heading_num[1].to!string,
+ heading_num[2].to!string
+ ))
+ : "";
+ } else if (heading_num[1] > 0) {
+ heading_number_auto_composite
+ = ((conf_make_meta.make.auto_num_depth.to!uint >= 1)
+ && (conf_make_meta.make.auto_num_depth.to!uint <= 3)
+ && auto_heading_numbering[1])
+ ? (format(q"┃%s.%s┃",
+ heading_num[0].to!string,
+ heading_num[1].to!string
+ ))
+ : "";
+ } else if (heading_num[0] > 0
+ && munge_.match(rgx.auto_heading_numbering_lv1)
+ ) {
+ heading_number_auto_composite
+ = ((conf_make_meta.make.auto_num_depth.to!uint >= 0)
+ && (conf_make_meta.make.auto_num_depth.to!uint <= 3)
+ && auto_heading_numbering[0])
+ ? (format(q"┃%s┃",
+ heading_num[0].to!string
+ ))
+ : "";
+ } else {
+ heading_number_auto_composite = "";
}
}
- return munge_;
+ heading_number_auto_composite_segname =
+ (heading_number_auto_composite.empty)
+ ? ""
+ : "seg_" ~ heading_number_auto_composite;
+ debug(heading_number_auto) {
+ writeln(heading_number_auto_composite);
+ }
+ if ((!empty(heading_number_auto_composite))
+ && (obj_["lev_markup_number"].to!uint >= conf_make_meta.make.auto_num_top_lv)) {
+ munge_ = munge_
+ .replaceFirst(rgx.heading,
+ "$1~$2 " ~ heading_number_auto_composite ~ ". ")
+ .replaceFirst(rgx.heading_marker_missing_tag,
+ "$1~" ~ heading_number_auto_composite_segname ~ " ");
+ }
}
+ return munge_;
+}
#+END_SRC
******** make segment anchor tags if not provided :markup:inline:segment:anchor:tags:
-#+NAME: meta_emitters_obj_inline_markup_heading_numbering_segment_anchor_tags_1
+#+NAME: meta_emitters_obj_inline_segment_anchor_tags_manufacture
#+BEGIN_SRC d
- static int heading_num_lev1 = 0;
- @safe static string _make_segment_anchor_tags_if_none_provided()(
- string munge_,
- string lev_,
- bool _new_doc
- ) {
- if (!(munge_.match(rgx.heading_anchor_tag))) {
- if (munge_.match(rgx.heading_identify_anchor_tag)) {
- if (auto m = munge_.match(rgx.heading_extract_named_anchor_tag)) {
- munge_ = munge_.replaceFirst(
- rgx.heading_marker_missing_tag,
- "$1~" ~ m.captures[1].toLower ~ "_" ~ m.captures[2] ~ " ");
- if (auto n = munge_.match(rgx.heading_anchor_tag_plus_colon)) {
- auto tag_remunge_ = n.captures[2]
- .replaceAll(rgx.heading_marker_tag_has_colon, "..");
- munge_ = munge_.replaceFirst(rgx.heading_anchor_tag_plus_colon, n.captures[1] ~ tag_remunge_ ~ " ");
- }
- } else if (auto m = munge_.match(rgx.heading_extract_unnamed_anchor_tag)) {
- munge_ = munge_.replaceFirst(
- rgx.heading_marker_missing_tag,
- "$1~" ~ "s" ~ m.captures[1] ~ " ");
- }
- } else if (lev_ == "1") { // (if not successful) manufacture a unique anchor tag for lev == "1"
- if (_new_doc) {
- heading_num_lev1 = 0;
+static int heading_num_lev1 = 0;
+@safe static string _make_segment_anchor_tags_if_none_provided()(
+ string munge_,
+ string lev_,
+ bool _new_doc
+) {
+ if (!(munge_.match(rgx.heading_anchor_tag))) {
+ if (munge_.match(rgx.heading_identify_anchor_tag)) {
+ if (auto m = munge_.match(rgx.heading_extract_named_anchor_tag)) {
+ munge_ = munge_.replaceFirst(
+ rgx.heading_marker_missing_tag,
+ "$1~" ~ m.captures[1].toLower ~ "_" ~ m.captures[2] ~ " ");
+ if (auto n = munge_.match(rgx.heading_anchor_tag_plus_colon)) {
+ auto tag_remunge_ = n.captures[2]
+ .replaceAll(rgx.heading_marker_tag_has_colon, "..");
+ munge_ = munge_.replaceFirst(rgx.heading_anchor_tag_plus_colon, n.captures[1] ~ tag_remunge_ ~ " ");
}
- heading_num_lev1 ++;
+ } else if (auto m = munge_.match(rgx.heading_extract_unnamed_anchor_tag)) {
munge_ = munge_.replaceFirst(
rgx.heading_marker_missing_tag,
- "$1~" ~ "x" ~ heading_num_lev1.to!string ~ " ");
+ "$1~" ~ "s" ~ m.captures[1] ~ " ");
+ }
+ } else if (lev_ == "1") { // (if not successful) manufacture a unique anchor tag for lev == "1"
+ if (_new_doc) {
+ heading_num_lev1 = 0;
}
+ heading_num_lev1 ++;
+ munge_ = munge_.replaceFirst(
+ rgx.heading_marker_missing_tag,
+ "$1~" ~ "x" ~ heading_num_lev1.to!string ~ " ");
}
- return munge_;
}
+ return munge_;
+}
#+END_SRC
****** }
-#+NAME: meta_emitters_obj_inline_markup_close
+#+NAME: meta_emitters_obj_inline_markup_private_function_close
#+BEGIN_SRC d
}
#+END_SRC
@@ -6393,258 +6399,258 @@ struct ObjAttributes {
#+NAME: meta_emitters_obj_attributes_public
#+BEGIN_SRC d
- @safe string obj_attributes()(
- string obj_is_,
- string obj_raw,
- ObjGenericComposite _comp_obj_heading,
- ) {
- scope(exit) {
- destroy(obj_is_);
- destroy(obj_raw);
- destroy(_comp_obj_heading);
- }
- _obj_attrib["json"] ="{";
- switch (obj_is_) {
- case "heading":
- _obj_attrib["json"] ~= txt_heading(obj_raw);
- break;
- case "para":
- _obj_attrib["json"] ~= txt_para_and_blocks(obj_raw)
- ~ txt_para(obj_raw);
- break;
- case "code":
- _obj_attrib["json"] ~= txt_code(obj_raw);
- break;
- case "group":
- _obj_attrib["json"] ~= txt_para_and_blocks(obj_raw)
- ~ txt_group(obj_raw);
- break;
- case "block":
- _obj_attrib["json"] ~= txt_para_and_blocks(obj_raw)
- ~ txt_block(obj_raw);
- break;
- case "verse":
- _obj_attrib["json"] ~= txt_verse(obj_raw);
- break;
- case "quote":
- _obj_attrib["json"] ~= txt_quote(obj_raw);
- break;
- case "table":
- _obj_attrib["json"] ~= txt_table(obj_raw);
- break;
- case "comment":
- _obj_attrib["json"] ~= txt_comment(obj_raw);
- break;
- default:
- _obj_attrib["json"] ~= txt_para(obj_raw);
- break;
- }
- _obj_attrib["json"] ~= " }";
- _obj_attrib["json"] = _set_additional_values_parse_as_json(_obj_attrib["json"], obj_is_, _comp_obj_heading);
- debug(structattrib) {
- if (oa_j["is"].str() == "heading") {
- writeln(_obj_attrib["json"]);
- writeln(
- "is: ", oa_j["is"].str(),
- "; object_number: ", oa_j["object_number"].integer()
- );
- }
- }
- return _obj_attrib["json"];
+@safe string obj_attributes()(
+ string obj_is_,
+ string obj_raw,
+ ObjGenericComposite _comp_obj_heading,
+) {
+ scope(exit) {
+ destroy(obj_is_);
+ destroy(obj_raw);
+ destroy(_comp_obj_heading);
+ }
+ _obj_attrib["json"] ="{";
+ switch (obj_is_) {
+ case "heading":
+ _obj_attrib["json"] ~= txt_heading(obj_raw);
+ break;
+ case "para":
+ _obj_attrib["json"] ~= txt_para_and_blocks(obj_raw)
+ ~ txt_para(obj_raw);
+ break;
+ case "code":
+ _obj_attrib["json"] ~= txt_code(obj_raw);
+ break;
+ case "group":
+ _obj_attrib["json"] ~= txt_para_and_blocks(obj_raw)
+ ~ txt_group(obj_raw);
+ break;
+ case "block":
+ _obj_attrib["json"] ~= txt_para_and_blocks(obj_raw)
+ ~ txt_block(obj_raw);
+ break;
+ case "verse":
+ _obj_attrib["json"] ~= txt_verse(obj_raw);
+ break;
+ case "quote":
+ _obj_attrib["json"] ~= txt_quote(obj_raw);
+ break;
+ case "table":
+ _obj_attrib["json"] ~= txt_table(obj_raw);
+ break;
+ case "comment":
+ _obj_attrib["json"] ~= txt_comment(obj_raw);
+ break;
+ default:
+ _obj_attrib["json"] ~= txt_para(obj_raw);
+ break;
}
- invariant() {
+ _obj_attrib["json"] ~= " }";
+ _obj_attrib["json"] = _set_additional_values_parse_as_json(_obj_attrib["json"], obj_is_, _comp_obj_heading);
+ debug(structattrib) {
+ if (oa_j["is"].str() == "heading") {
+ writeln(_obj_attrib["json"]);
+ writeln(
+ "is: ", oa_j["is"].str(),
+ "; object_number: ", oa_j["object_number"].integer()
+ );
+ }
}
+ return _obj_attrib["json"];
+}
+invariant() {
+}
#+END_SRC
******* private
#+NAME: meta_emitters_obj_attributes_private
#+BEGIN_SRC d
- private:
- string _obj_attributes;
+private:
+string _obj_attributes;
#+END_SRC
******** para & blocks
-#+NAME: meta_emitters_obj_attributes_private_an_attribute_0
-#+BEGIN_SRC d
- @safe string txt_para_and_blocks()(string obj_txt_in) {
- if (obj_txt_in.matchFirst(rgx.para_bullet)) {
- _obj_attributes =" \"bullet\": \"true\","
- ~ " \"indent_hang\": 0,"
- ~ " \"indent_base\": 0,";
- } else if (auto m = obj_txt_in.matchFirst(rgx.para_bullet_indent)) {
- _obj_attributes =" \"bullet\": \"true\","
- ~ " \"indent_hang\": " ~ m["indent"].to!string ~ ","
- ~ " \"indent_base\": " ~ m["indent"].to!string ~ ",";
- } else if (auto m = obj_txt_in.matchFirst(rgx.para_indent_hang)) {
- _obj_attributes =" \"bullet\": \"false\","
- ~ " \"indent_hang\": " ~ m["hang"].to!string ~ ","
- ~ " \"indent_base\": " ~ m["indent"].to!string ~ ",";
- } else if (auto m = obj_txt_in.matchFirst(rgx.para_indent)) {
- _obj_attributes =" \"bullet\": \"false\","
- ~ " \"indent_hang\": " ~ m["indent"].to!string ~ ","
- ~ " \"indent_base\": " ~ m["indent"].to!string ~ ",";
- } else {
- _obj_attributes =" \"bullet\": \"false\","
- ~ " \"indent_hang\": 0,"
- ~ " \"indent_base\": 0,";
- }
- return _obj_attributes;
+#+NAME: meta_emitters_obj_attributes_private_an_attribute_txt_para_and_blocks
+#+BEGIN_SRC d
+@safe string txt_para_and_blocks()(string obj_txt_in) {
+ if (obj_txt_in.matchFirst(rgx.para_bullet)) {
+ _obj_attributes =" \"bullet\": \"true\","
+ ~ " \"indent_hang\": 0,"
+ ~ " \"indent_base\": 0,";
+ } else if (auto m = obj_txt_in.matchFirst(rgx.para_bullet_indent)) {
+ _obj_attributes =" \"bullet\": \"true\","
+ ~ " \"indent_hang\": " ~ m["indent"].to!string ~ ","
+ ~ " \"indent_base\": " ~ m["indent"].to!string ~ ",";
+ } else if (auto m = obj_txt_in.matchFirst(rgx.para_indent_hang)) {
+ _obj_attributes =" \"bullet\": \"false\","
+ ~ " \"indent_hang\": " ~ m["hang"].to!string ~ ","
+ ~ " \"indent_base\": " ~ m["indent"].to!string ~ ",";
+ } else if (auto m = obj_txt_in.matchFirst(rgx.para_indent)) {
+ _obj_attributes =" \"bullet\": \"false\","
+ ~ " \"indent_hang\": " ~ m["indent"].to!string ~ ","
+ ~ " \"indent_base\": " ~ m["indent"].to!string ~ ",";
+ } else {
+ _obj_attributes =" \"bullet\": \"false\","
+ ~ " \"indent_hang\": 0,"
+ ~ " \"indent_base\": 0,";
}
+ return _obj_attributes;
+}
#+END_SRC
******** heading
-#+NAME: meta_emitters_obj_attributes_private_an_attribute_1
+#+NAME: meta_emitters_obj_attributes_private_an_attribute_txt_heading
#+BEGIN_SRC d
- @safe string txt_heading()(string obj_txt_in) {
- _obj_attributes = " \"use\": \"content\","
- ~ " \"of\": \"para\","
- ~ " \"is\": \"heading\"";
- return _obj_attributes;
- }
- invariant() {
- }
+@safe string txt_heading()(string obj_txt_in) {
+ _obj_attributes = " \"use\": \"content\","
+ ~ " \"of\": \"para\","
+ ~ " \"is\": \"heading\"";
+ return _obj_attributes;
+}
+invariant() {
+}
#+END_SRC
******** para
-#+NAME: meta_emitters_obj_attributes_private_an_attribute_2
+#+NAME: meta_emitters_obj_attributes_private_an_attribute_txt_para
#+BEGIN_SRC d
- @safe string txt_para()(string obj_txt_in) {
- _obj_attributes = " \"use\": \"content\","
- ~ " \"of\": \"para\","
- ~ " \"is\": \"para\"";
- return _obj_attributes;
- }
- invariant() {
- }
+@safe string txt_para()(string obj_txt_in) {
+ _obj_attributes = " \"use\": \"content\","
+ ~ " \"of\": \"para\","
+ ~ " \"is\": \"para\"";
+ return _obj_attributes;
+}
+invariant() {
+}
#+END_SRC
******** quote
-#+NAME: meta_emitters_obj_attributes_private_an_attribute_3
+#+NAME: meta_emitters_obj_attributes_private_an_attribute_txt_quote
#+BEGIN_SRC d
- @safe string txt_quote()(string obj_txt_in) {
- _obj_attributes = " \"use\": \"content\","
- ~ " \"of\": \"block\","
- ~ " \"is\": \"quote\"";
- return _obj_attributes;
- }
- invariant() {
- }
+@safe string txt_quote()(string obj_txt_in) {
+ _obj_attributes = " \"use\": \"content\","
+ ~ " \"of\": \"block\","
+ ~ " \"is\": \"quote\"";
+ return _obj_attributes;
+}
+invariant() {
+}
#+END_SRC
******** group
-#+NAME: meta_emitters_obj_attributes_private_an_attribute_4
+#+NAME: meta_emitters_obj_attributes_private_an_attribute_txt_group
#+BEGIN_SRC d
- @safe string txt_group()(string obj_txt_in) {
- _obj_attributes = " \"use\": \"content\","
- ~ " \"of\": \"block\","
- ~ " \"is\": \"group\"";
- return _obj_attributes;
- }
- invariant() {
- }
+@safe string txt_group()(string obj_txt_in) {
+ _obj_attributes = " \"use\": \"content\","
+ ~ " \"of\": \"block\","
+ ~ " \"is\": \"group\"";
+ return _obj_attributes;
+}
+invariant() {
+}
#+END_SRC
******** block
-#+NAME: meta_emitters_obj_attributes_private_an_attribute_5
+#+NAME: meta_emitters_obj_attributes_private_an_attribute_txt_block
#+BEGIN_SRC d
- @safe string txt_block()(string obj_txt_in) {
- _obj_attributes = " \"use\": \"content\","
- ~ " \"of\": \"block\","
- ~ " \"is\": \"block\"";
- return _obj_attributes;
- }
- invariant() {
- }
+@safe string txt_block()(string obj_txt_in) {
+ _obj_attributes = " \"use\": \"content\","
+ ~ " \"of\": \"block\","
+ ~ " \"is\": \"block\"";
+ return _obj_attributes;
+}
+invariant() {
+}
#+END_SRC
******** verse
-#+NAME: meta_emitters_obj_attributes_private_an_attribute_6
+#+NAME: meta_emitters_obj_attributes_private_an_attribute_txt_verse
#+BEGIN_SRC d
- @safe string txt_verse()(string obj_txt_in) {
- _obj_attributes = " \"use\": \"content\","
- ~ " \"of\": \"block\","
- ~ " \"is\": \"verse\"";
- return _obj_attributes;
- }
- invariant() {
- }
+@safe string txt_verse()(string obj_txt_in) {
+ _obj_attributes = " \"use\": \"content\","
+ ~ " \"of\": \"block\","
+ ~ " \"is\": \"verse\"";
+ return _obj_attributes;
+}
+invariant() {
+}
#+END_SRC
******** code
-#+NAME: meta_emitters_obj_attributes_private_an_attribute_7
+#+NAME: meta_emitters_obj_attributes_private_an_attribute_txt_code
#+BEGIN_SRC d
- @safe string txt_code()(string obj_txt_in) {
- _obj_attributes = " \"use\": \"content\","
- ~ " \"of\": \"block\","
- ~ " \"is\": \"code\"";
- return _obj_attributes;
- }
- invariant() {
- }
+@safe string txt_code()(string obj_txt_in) {
+ _obj_attributes = " \"use\": \"content\","
+ ~ " \"of\": \"block\","
+ ~ " \"is\": \"code\"";
+ return _obj_attributes;
+}
+invariant() {
+}
#+END_SRC
******** table
-#+NAME: meta_emitters_obj_attributes_private_an_attribute_8
+#+NAME: meta_emitters_obj_attributes_private_an_attribute_txt_table
#+BEGIN_SRC d
- @safe string txt_table()(string obj_txt_in) {
- _obj_attributes = " \"use\": \"content\","
- ~ " \"of\": \"block\","
- ~ " \"is\": \"table\"";
- return _obj_attributes;
- }
- invariant() {
- }
+@safe string txt_table()(string obj_txt_in) {
+ _obj_attributes = " \"use\": \"content\","
+ ~ " \"of\": \"block\","
+ ~ " \"is\": \"table\"";
+ return _obj_attributes;
+}
+invariant() {
+}
#+END_SRC
******** comment
-#+NAME: meta_emitters_obj_attributes_private_an_attribute_9
+#+NAME: meta_emitters_obj_attributes_private_an_attribute_txt_comment
#+BEGIN_SRC d
- @safe string txt_comment()(string obj_txt_in) {
- _obj_attributes = " \"use\": \"comment\","
- ~ " \"of\": \"comment\","
- ~ " \"is\": \"comment\"";
- return _obj_attributes;
- }
- invariant() {
- }
+@safe string txt_comment()(string obj_txt_in) {
+ _obj_attributes = " \"use\": \"comment\","
+ ~ " \"of\": \"comment\","
+ ~ " \"is\": \"comment\"";
+ return _obj_attributes;
+}
+invariant() {
+}
#+END_SRC
******** set additional attribute values, parse as json
#+NAME: meta_emitters_obj_attributes_private_json
#+BEGIN_SRC d
- @safe string _set_additional_values_parse_as_json()(
- string _obj_attrib,
- string obj_is_,
- ObjGenericComposite _comp_obj_heading,
- ) {
- JSONValue oa_j = parseJSON(_obj_attrib);
- assert(
- (oa_j.type == JSON_TYPE.OBJECT)
- );
- if (obj_is_ == "heading") {
- oa_j.object["object_number"] = _comp_obj_heading.metainfo.ocn;
- oa_j.object["lev_markup_number"] = _comp_obj_heading.metainfo.heading_lev_markup;
- oa_j.object["lev_collapsed_number"] = _comp_obj_heading.metainfo.heading_lev_collapsed;
- oa_j.object["heading_ptr"] = _comp_obj_heading.ptr.heading;
- oa_j.object["doc_object_ptr"] = _comp_obj_heading.ptr.doc_object;
- }
- oa_j.object["parent_object_number"] = _comp_obj_heading.metainfo.parent_ocn;
- oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.metainfo.parent_lev_markup;
- _obj_attrib = oa_j.toString();
- return _obj_attrib;
- }
+@safe string _set_additional_values_parse_as_json()(
+ string _obj_attrib,
+ string obj_is_,
+ ObjGenericComposite _comp_obj_heading,
+) {
+ JSONValue oa_j = parseJSON(_obj_attrib);
+ assert(
+ (oa_j.type == JSON_TYPE.OBJECT)
+ );
+ if (obj_is_ == "heading") {
+ oa_j.object["object_number"] = _comp_obj_heading.metainfo.ocn;
+ oa_j.object["lev_markup_number"] = _comp_obj_heading.metainfo.heading_lev_markup;
+ oa_j.object["lev_collapsed_number"] = _comp_obj_heading.metainfo.heading_lev_collapsed;
+ oa_j.object["heading_ptr"] = _comp_obj_heading.ptr.heading;
+ oa_j.object["doc_object_ptr"] = _comp_obj_heading.ptr.doc_object;
+ }
+ oa_j.object["parent_object_number"] = _comp_obj_heading.metainfo.parent_ocn;
+ oa_j.object["parent_lev_markup_number"] = _comp_obj_heading.metainfo.parent_lev_markup;
+ _obj_attrib = oa_j.toString();
+ return _obj_attrib;
+}
#+END_SRC
****** }
@@ -6657,7 +6663,7 @@ struct ObjAttributes {
**** book index :book:index:
***** book index nugget hash :hash:nugget:
-#+NAME: meta_emitters_book_index_nugget
+#+NAME: meta_emitters_bookindex_nugget
#+BEGIN_SRC d
struct BookIndexNuggetHash {
string main_term, sub_term, sub_term_bits;
@@ -6737,7 +6743,7 @@ struct BookIndexNuggetHash {
***** book index (sort &) report indented :report:indented:
-#+NAME: meta_emitters_book_index_report_indented
+#+NAME: meta_emitters_bookindex_report_indented
#+BEGIN_SRC d
struct BookIndexReportIndent {
int mkn, skn;
@@ -6770,7 +6776,7 @@ struct BookIndexReportIndent {
***** book index (sort &) report section :report:section:
****** { book index struct open
-#+NAME: meta_emitters_book_index_report_section_0
+#+NAME: meta_emitters_bookindex_report_section_function_open
#+BEGIN_SRC d
struct BookIndexReportSection {
int mkn, skn;
@@ -6780,212 +6786,212 @@ struct BookIndexReportSection {
******* bookindex write section
-#+NAME: meta_emitters_book_index_report_section_1
+#+NAME: meta_emitters_bookindex_report_section_function_write_section
#+BEGIN_SRC d
- @safe void bookindex_write_section()(
- string[][string][string] bookindex_unordered_hashes
- ) {
- auto mainkeys =
- bookindex_unordered_hashes.byKey.array
+@safe void bookindex_write_section()(
+ string[][string][string] bookindex_unordered_hashes
+) {
+ auto mainkeys =
+ bookindex_unordered_hashes.byKey.array
+ .sort!("toUpper(a) < toUpper(b)", SwapStrategy.stable).release;
+ foreach (mainkey; mainkeys) {
+ write("_0_1 !┨", mainkey, "┣! ");
+ foreach (ref_; bookindex_unordered_hashes[mainkey]["_a"]) {
+ auto go = ref_.replaceAll(rgx.book_index_go, "$1");
+ write(" {", ref_, "}#", go, ", ");
+ }
+ writeln(" \\\\");
+ bookindex_unordered_hashes[mainkey].remove("_a");
+ auto subkeys =
+ bookindex_unordered_hashes[mainkey].byKey.array
.sort!("toUpper(a) < toUpper(b)", SwapStrategy.stable).release;
- foreach (mainkey; mainkeys) {
- write("_0_1 !┨", mainkey, "┣! ");
- foreach (ref_; bookindex_unordered_hashes[mainkey]["_a"]) {
+ foreach (subkey; subkeys) {
+ write(" ", subkey, ", ");
+ foreach (ref_; bookindex_unordered_hashes[mainkey][subkey]) {
auto go = ref_.replaceAll(rgx.book_index_go, "$1");
write(" {", ref_, "}#", go, ", ");
}
writeln(" \\\\");
- bookindex_unordered_hashes[mainkey].remove("_a");
- auto subkeys =
- bookindex_unordered_hashes[mainkey].byKey.array
- .sort!("toUpper(a) < toUpper(b)", SwapStrategy.stable).release;
- foreach (subkey; subkeys) {
- write(" ", subkey, ", ");
- foreach (ref_; bookindex_unordered_hashes[mainkey][subkey]) {
- auto go = ref_.replaceAll(rgx.book_index_go, "$1");
- write(" {", ref_, "}#", go, ", ");
- }
- writeln(" \\\\");
- ++skn;
- }
- ++mkn;
+ ++skn;
}
+ ++mkn;
}
+}
#+END_SRC
******* book index (sort &) build section :report:section:
-#+NAME: meta_emitters_book_index_report_section_2
+#+NAME: meta_emitters_bookindex_report_section_function_build_abstraction
#+BEGIN_SRC d
- @system auto bookindex_build_abstraction_section(N,B)(
- string[][string][string] bookindex_unordered_hashes,
- N obj_cite_digits,
- B opt_action,
- ) {
- debug(asserts) {
- static assert(is(typeof(obj_cite_digits.object_number) == int));
- }
- mixin spineNode;
- mixin InternalMarkup;
- static auto mkup = InlineMarkup();
- string type_is;
- string lev;
- int heading_lev_markup, heading_lev_collapsed;
- string attrib;
- int[string] indent;
- auto mainkeys =
- bookindex_unordered_hashes.byKey.array
- .sort!("toUpper(a) < toUpper(b)", SwapStrategy.stable).release;
- ObjGenericComposite[] bookindex_section;
- ObjGenericComposite comp_obj_heading_, comp_obj_para;
- auto node_para_int_ = node_metadata_para_int;
- auto node_para_str_ = node_metadata_para_str;
- if ((mainkeys.length > 0)
- && (opt_action.backmatter
- && opt_action.section_bookindex)) {
- string bi_tmp;
- string[] bi_tmp_tags;
- {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "backmatter";
- comp_obj_heading_.metainfo.is_of_section = "bookindex";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- 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 = false;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_book_index";
- comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
- comp_obj_heading_.tags.in_segment_html = "bookindex";
- comp_obj_heading_.tags.anchor_tags = ["section_bookindex"];
- comp_obj_heading_.metainfo.heading_lev_markup = 1;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- comp_obj_heading.has.inline_links = true;
- bookindex_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
- ++mkn;
+@system auto bookindex_build_abstraction_section(N,B)(
+ string[][string][string] bookindex_unordered_hashes,
+ N obj_cite_digits,
+ B opt_action,
+) {
+ debug(asserts) {
+ static assert(is(typeof(obj_cite_digits.object_number) == int));
+ }
+ mixin spineNode;
+ mixin InternalMarkup;
+ static auto mkup = InlineMarkup();
+ string type_is;
+ string lev;
+ int heading_lev_markup, heading_lev_collapsed;
+ string attrib;
+ int[string] indent;
+ auto mainkeys =
+ bookindex_unordered_hashes.byKey.array
+ .sort!("toUpper(a) < toUpper(b)", SwapStrategy.stable).release;
+ ObjGenericComposite[] bookindex_section;
+ ObjGenericComposite comp_obj_heading_, comp_obj_para;
+ auto node_para_int_ = node_metadata_para_int;
+ auto node_para_str_ = node_metadata_para_str;
+ if ((mainkeys.length > 0)
+ && (opt_action.backmatter
+ && opt_action.section_bookindex)) {
+ string bi_tmp;
+ string[] bi_tmp_tags;
+ {
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "bookindex";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ 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 = false;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_book_index";
+ comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ comp_obj_heading_.tags.in_segment_html = "bookindex";
+ comp_obj_heading_.tags.anchor_tags = ["section_bookindex"];
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading.has.inline_links = true;
+ bookindex_section ~= comp_obj_heading_;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ ++mkn;
+ }
+ {
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "bookindex";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ 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";
+ comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ comp_obj_heading_.tags.in_segment_html = comp_obj_heading_.tags.anchor_tag_html;
+ comp_obj_heading_.metainfo.heading_lev_markup = 4;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading.has.inline_links = false;
+ comp_obj_heading_.tags.anchor_tags = ["bookindex"];
+ bookindex_section ~= comp_obj_heading_;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ ++mkn;
+ }
+ import std.array : appender;
+ auto buffer = appender!(char[])();
+ string[dchar] transTable = [' ' : "_"];
+ foreach (mainkey; mainkeys) {
+ bi_tmp_tags = [""];
+ bi_tmp = mkup.bold ~ mkup.ff_o ~ mainkey ~ mkup.ff_c ~ mkup.bold ~ " ";
+ buffer.clear();
+ bi_tmp_tags ~= translate(mainkey, transTable);
+ auto bkidx_lnk(string locs) {
+ string markup = "";
+ if (auto m = locs.matchFirst(rgx.book_index_go)) {
+ markup
+ = links_and_images("{ " ~ m["link"] ~ " }"
+ ~ "#" ~ m["ocn"] ~ ", ");
+ } else {
+ writeln(__LINE__, ": ", locs);
+ }
+ return markup;
}
- {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "backmatter";
- comp_obj_heading_.metainfo.is_of_section = "bookindex";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- 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";
- comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
- comp_obj_heading_.tags.in_segment_html = comp_obj_heading_.tags.anchor_tag_html;
- comp_obj_heading_.metainfo.heading_lev_markup = 4;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- comp_obj_heading.has.inline_links = false;
- comp_obj_heading_.tags.anchor_tags = ["bookindex"];
- bookindex_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
- ++mkn;
- }
- import std.array : appender;
- auto buffer = appender!(char[])();
- string[dchar] transTable = [' ' : "_"];
- foreach (mainkey; mainkeys) {
- bi_tmp_tags = [""];
- bi_tmp = mkup.bold ~ mkup.ff_o ~ mainkey ~ mkup.ff_c ~ mkup.bold ~ " ";
+ foreach (ref_; bookindex_unordered_hashes[mainkey]["_a"]) {
+ bi_tmp ~= bkidx_lnk(ref_);
+ }
+ bi_tmp ~= " \\\\\n ";
+ bookindex_unordered_hashes[mainkey].remove("_a");
+ auto subkeys =
+ bookindex_unordered_hashes[mainkey].byKey.array
+ .sort!("toUpper(a) < toUpper(b)", SwapStrategy.stable).release;
+ foreach (subkey; subkeys) {
+ bi_tmp ~= subkey ~ ", ";
buffer.clear();
- bi_tmp_tags ~= translate(mainkey, transTable);
- auto bkidx_lnk(string locs) {
- string markup = "";
- if (auto m = locs.matchFirst(rgx.book_index_go)) {
- markup
- = links_and_images("{ " ~ m["link"] ~ " }"
- ~ "#" ~ m["ocn"] ~ ", ");
- } else {
- writeln(__LINE__, ": ", locs);
- }
- return markup;
- }
- foreach (ref_; bookindex_unordered_hashes[mainkey]["_a"]) {
+ bi_tmp_tags ~= translate(subkey, transTable);
+ foreach (ref_; bookindex_unordered_hashes[mainkey][subkey]) {
bi_tmp ~= bkidx_lnk(ref_);
}
bi_tmp ~= " \\\\\n ";
- bookindex_unordered_hashes[mainkey].remove("_a");
- auto subkeys =
- bookindex_unordered_hashes[mainkey].byKey.array
- .sort!("toUpper(a) < toUpper(b)", SwapStrategy.stable).release;
- foreach (subkey; subkeys) {
- bi_tmp ~= subkey ~ ", ";
- buffer.clear();
- bi_tmp_tags ~= translate(subkey, transTable);
- foreach (ref_; bookindex_unordered_hashes[mainkey][subkey]) {
- bi_tmp ~= bkidx_lnk(ref_);
- }
- bi_tmp ~= " \\\\\n ";
- ++skn;
- }
- bi_tmp = bi_tmp.replaceFirst(rgx.trailing_linebreak, "");
- comp_obj_para = comp_obj_para.init;
- comp_obj_para.metainfo.is_of_part = "backmatter";
- comp_obj_para.metainfo.is_of_section = "bookindex";
- comp_obj_para.metainfo.is_of_type = "para";
- comp_obj_para.metainfo.is_a = "bookindex";
- comp_obj_para.text = bi_tmp.to!string.strip;
- comp_obj_para.metainfo.ocn = 0;
- comp_obj_para.metainfo.identifier = "";
- comp_obj_para.metainfo.object_number_off = true;
- comp_obj_para.metainfo.object_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;
- comp_obj_para.text = bi_tmp.to!string.strip;
- bookindex_section ~= 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_.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;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- bookindex_section ~= comp_obj_heading_;
- }
- auto t = tuple(
- bookindex_section,
- obj_cite_digits
- );
- return t;
- }
+ ++skn;
+ }
+ bi_tmp = bi_tmp.replaceFirst(rgx.trailing_linebreak, "");
+ comp_obj_para = comp_obj_para.init;
+ comp_obj_para.metainfo.is_of_part = "backmatter";
+ comp_obj_para.metainfo.is_of_section = "bookindex";
+ comp_obj_para.metainfo.is_of_type = "para";
+ comp_obj_para.metainfo.is_a = "bookindex";
+ comp_obj_para.text = bi_tmp.to!string.strip;
+ comp_obj_para.metainfo.ocn = 0;
+ comp_obj_para.metainfo.identifier = "";
+ comp_obj_para.metainfo.object_number_off = true;
+ comp_obj_para.metainfo.object_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;
+ comp_obj_para.text = bi_tmp.to!string.strip;
+ bookindex_section ~= 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_.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;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ bookindex_section ~= comp_obj_heading_;
+ }
+ auto t = tuple(
+ bookindex_section,
+ obj_cite_digits
+ );
+ return t;
+}
#+END_SRC
****** }
-#+NAME: meta_emitters_book_index_report_section_3
+#+NAME: meta_emitters_bookindex_report_section_function_close
#+BEGIN_SRC d
}
#+END_SRC
**** (end)notes section :endnotes:section:
-#+NAME: meta_emitters_endnotes_0
+#+NAME: meta_emitters_endnotes_function_open
#+BEGIN_SRC d
struct NotesSection {
string[string] object_notes;
@@ -6996,226 +7002,226 @@ struct NotesSection {
***** { gather notes for endnote section struct open
-#+NAME: meta_emitters_endnotes_1
+#+NAME: meta_emitters_endnotes_function_gather_notes
#+BEGIN_SRC d
- @safe private auto gather_notes_for_endnote_section(
- ObjGenericComposite[] contents_am,
- string[string] tag_in_seg,
- int cntr,
+@safe private auto gather_notes_for_endnote_section(
+ ObjGenericComposite[] contents_am,
+ string[string] tag_in_seg,
+ int cntr,
+) {
+ assert((contents_am[cntr].metainfo.is_a == "para")
+ || (contents_am[cntr].metainfo.is_a == "heading")
+ || (contents_am[cntr].metainfo.is_a == "quote")
+ || (contents_am[cntr].metainfo.is_a == "group")
+ || (contents_am[cntr].metainfo.is_a == "block")
+ || (contents_am[cntr].metainfo.is_a == "verse"));
+ assert(cntr >= previous_count);
+ assert(
+ (contents_am[cntr].text).match(
+ rgx.inline_notes_al_all_note)
+ );
+ mixin InternalMarkup;
+ previous_count = cntr;
+ static auto mkup = InlineMarkup();
+ static auto munge = ObjInlineMarkupMunge();
+ foreach(m;
+ (contents_am[cntr].text).matchAll(
+ rgx.inline_notes_al_special_char_note)
) {
- assert((contents_am[cntr].metainfo.is_a == "para")
- || (contents_am[cntr].metainfo.is_a == "heading")
- || (contents_am[cntr].metainfo.is_a == "quote")
- || (contents_am[cntr].metainfo.is_a == "group")
- || (contents_am[cntr].metainfo.is_a == "block")
- || (contents_am[cntr].metainfo.is_a == "verse"));
- assert(cntr >= previous_count);
- assert(
- (contents_am[cntr].text).match(
- rgx.inline_notes_al_all_note)
- );
- mixin InternalMarkup;
- previous_count = cntr;
- static auto mkup = InlineMarkup();
- static auto munge = ObjInlineMarkupMunge();
- foreach(m;
- (contents_am[cntr].text).matchAll(
- rgx.inline_notes_al_special_char_note)
- ) {
- debug(endnotes_build) {
- writeln(
- "{^", mkup.ff_o, m["char"], ".", mkup.ff_c, "^}"
- ~ mkup.mark_internal_site_lnk,
- tag_in_seg["seg_lv4"],
- ".fnSuffix#noteref_\n ", m["char"], " ",
- m["note"]); // sometimes need segment name (segmented html & epub)
- }
- // you need anchor for segments at this point ->
- object_notes["anchor"] ~= "note_" ~ m["char"] ~ "』";
- object_notes["notes"] ~= (tag_in_seg["seg_lv4"].empty)
- ? (links_and_images(
- "{" ~ mkup.superscript ~ mkup.ff_o ~ m["char"] ~ "." ~ mkup.ff_c ~ mkup.superscript ~ "}#noteref_"
- ~ m["char"]) ~ " "
- ~ m["note"] ~ "』"
- )
- : (links_and_images(
- "{" ~ mkup.superscript ~ mkup.ff_o ~ m["char"] ~ "." ~ mkup.ff_c ~ mkup.superscript ~ "}"
- ~ mkup.mark_internal_site_lnk
- ~ tag_in_seg["seg_lv4"]
- ~ ".fnSuffix#noteref_"
- ~ m["char"]) ~ " "
- ~ m["note"] ~ "』"
- );
- }
- foreach(m;
- (contents_am[cntr].text).matchAll(
- rgx.inline_notes_al_regular_number_note)
- ) {
- debug(endnotes_build) {
- writeln(
- "{^", mkup.ff_o, m["num"], ".", mkup.ff_c, "^}"
- ~ mkup.mark_internal_site_lnk,
- tag_in_seg["seg_lv4"],
- ".fnSuffix#noteref_\n ", m["num"], " ",
- m["note"]); // sometimes need segment name (segmented html & epub)
- }
- // you need anchor for segments at this point ->
- object_notes["anchor"] ~= "note_" ~ m["num"] ~ "』";
- object_notes["notes"] ~= (tag_in_seg["seg_lv4"].empty)
- ? (links_and_images(
- "{" ~ mkup.superscript ~ mkup.ff_o ~ m["num"] ~ "." ~ mkup.ff_c ~ mkup.superscript ~ "}#noteref_"
- ~ m["num"]) ~ " "
- ~ m["note"] ~ "』"
- )
- : (links_and_images(
- "{" ~ mkup.superscript ~ mkup.ff_o ~ m["num"] ~ "." ~ mkup.ff_c ~ mkup.superscript ~ "}"
- ~ mkup.mark_internal_site_lnk
- ~ tag_in_seg["seg_lv4"]
- ~ ".fnSuffix#noteref_"
- ~ m["num"]) ~ " "
- ~ m["note"] ~ "』"
- );
- }
- return object_notes;
+ debug(endnotes_build) {
+ writeln(
+ "{^", mkup.ff_o, m["char"], ".", mkup.ff_c, "^}"
+ ~ mkup.mark_internal_site_lnk,
+ tag_in_seg["seg_lv4"],
+ ".fnSuffix#noteref_\n ", m["char"], " ",
+ m["note"]); // sometimes need segment name (segmented html & epub)
+ }
+ // you need anchor for segments at this point ->
+ object_notes["anchor"] ~= "note_" ~ m["char"] ~ "』";
+ object_notes["notes"] ~= (tag_in_seg["seg_lv4"].empty)
+ ? (links_and_images(
+ "{" ~ mkup.superscript ~ mkup.ff_o ~ m["char"] ~ "." ~ mkup.ff_c ~ mkup.superscript ~ "}#noteref_"
+ ~ m["char"]) ~ " "
+ ~ m["note"] ~ "』"
+ )
+ : (links_and_images(
+ "{" ~ mkup.superscript ~ mkup.ff_o ~ m["char"] ~ "." ~ mkup.ff_c ~ mkup.superscript ~ "}"
+ ~ mkup.mark_internal_site_lnk
+ ~ tag_in_seg["seg_lv4"]
+ ~ ".fnSuffix#noteref_"
+ ~ m["char"]) ~ " "
+ ~ m["note"] ~ "』"
+ );
+ }
+ foreach(m;
+ (contents_am[cntr].text).matchAll(
+ rgx.inline_notes_al_regular_number_note)
+ ) {
+ debug(endnotes_build) {
+ writeln(
+ "{^", mkup.ff_o, m["num"], ".", mkup.ff_c, "^}"
+ ~ mkup.mark_internal_site_lnk,
+ tag_in_seg["seg_lv4"],
+ ".fnSuffix#noteref_\n ", m["num"], " ",
+ m["note"]); // sometimes need segment name (segmented html & epub)
+ }
+ // you need anchor for segments at this point ->
+ object_notes["anchor"] ~= "note_" ~ m["num"] ~ "』";
+ object_notes["notes"] ~= (tag_in_seg["seg_lv4"].empty)
+ ? (links_and_images(
+ "{" ~ mkup.superscript ~ mkup.ff_o ~ m["num"] ~ "." ~ mkup.ff_c ~ mkup.superscript ~ "}#noteref_"
+ ~ m["num"]) ~ " "
+ ~ m["note"] ~ "』"
+ )
+ : (links_and_images(
+ "{" ~ mkup.superscript ~ mkup.ff_o ~ m["num"] ~ "." ~ mkup.ff_c ~ mkup.superscript ~ "}"
+ ~ mkup.mark_internal_site_lnk
+ ~ tag_in_seg["seg_lv4"]
+ ~ ".fnSuffix#noteref_"
+ ~ m["num"]) ~ " "
+ ~ m["note"] ~ "』"
+ );
}
+ return object_notes;
+}
#+END_SRC
****** gathered notes
-#+NAME: meta_emitters_endnotes_2
+#+NAME: meta_emitters_endnotes_function_gathered_notes
#+BEGIN_SRC d
- @safe private auto gathered_notes() {
- string[][string] endnotes_;
- if (object_notes.length > 1) {
- endnotes_["notes"] = (object_notes["notes"].split(rgx.break_string))[0..$-1];
- endnotes_["anchor"] = (object_notes["anchor"].split(rgx.break_string))[0..$-1];
- } else {
- endnotes_["notes"] = [];
- endnotes_["anchor"] = [];
- }
- return endnotes_;
+@safe private auto gathered_notes() {
+ string[][string] endnotes_;
+ if (object_notes.length > 1) {
+ endnotes_["notes"] = (object_notes["notes"].split(rgx.break_string))[0..$-1];
+ endnotes_["anchor"] = (object_notes["anchor"].split(rgx.break_string))[0..$-1];
+ } else {
+ endnotes_["notes"] = [];
+ endnotes_["anchor"] = [];
}
+ return endnotes_;
+}
#+END_SRC
****** endnote objects
-#+NAME: meta_emitters_endnotes_3
+#+NAME: meta_emitters_endnotes_function_endnote_objects
#+BEGIN_SRC d
- @safe private auto endnote_objects(N,O)(
- N obj_cite_digits,
- O opt_action,
- ) {
- mixin spineNode;
- ObjGenericComposite[] the_endnotes_section;
- auto endnotes_ = gathered_notes();
- string type_is;
- string lev, lev_markup_number, lev_collapsed_number;
- string attrib;
- int[string] indent;
- 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_.metainfo.is_of_part = "backmatter";
- comp_obj_heading_.metainfo.is_of_section = "endnotes";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- 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 = false;
- comp_obj_heading_.metainfo.object_number_type = 0;
- comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_endnotes";
- comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
- comp_obj_heading_.tags.in_segment_html = "endnotes";
- comp_obj_heading_.tags.anchor_tags = ["section_endnotes"];
- comp_obj_heading_.metainfo.heading_lev_markup = 1;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- the_endnotes_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
- ++mkn;
- }
- {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "backmatter";
- comp_obj_heading_.metainfo.is_of_section = "endnotes";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- 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";
- comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
- comp_obj_heading_.tags.in_segment_html = comp_obj_heading_.tags.anchor_tag_html;
- comp_obj_heading_.metainfo.heading_lev_markup = 4;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.parent_lev_markup = 0;
- comp_obj_heading_.tags.anchor_tags = ["endnotes"];
- the_endnotes_section ~= comp_obj_heading_;
- tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
- tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
- ++mkn;
- }
- } else {
- comp_obj_heading_ = comp_obj_heading_.init;
- comp_obj_heading_.metainfo.is_of_part = "empty";
- comp_obj_heading_.metainfo.is_of_section = "empty";
- comp_obj_heading_.metainfo.is_of_type = "para";
- comp_obj_heading_.metainfo.is_a = "heading";
- 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;
- comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
- comp_obj_heading_.metainfo.parent_ocn = 1;
- comp_obj_heading_.metainfo.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_.metainfo.is_of_part = "backmatter";
- comp_obj_endnote_.metainfo.is_of_section = "endnotes";
- comp_obj_endnote_.metainfo.is_of_type = "para";
- 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;
- comp_obj_heading_.metainfo.object_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["ref"].to!string;
- string anchor_tag = "note_" ~ notenumber;
- comp_obj_endnote_.tags.anchor_tags = [ endnotes_["anchor"][i] ];
- comp_obj_endnote_.has.inline_links = true;
- comp_obj_endnote_.text = endnote.inline_markup_faces.strip;
- the_endnotes_section ~= comp_obj_endnote_;
- }
- }
- auto t = tuple(the_endnotes_section, obj_cite_digits);
- return t;
- }
+@safe private auto endnote_objects(N,O)(
+ N obj_cite_digits,
+ O opt_action,
+) {
+ mixin spineNode;
+ ObjGenericComposite[] the_endnotes_section;
+ auto endnotes_ = gathered_notes();
+ string type_is;
+ string lev, lev_markup_number, lev_collapsed_number;
+ string attrib;
+ int[string] indent;
+ 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_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "endnotes";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ 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 = false;
+ comp_obj_heading_.metainfo.object_number_type = 0;
+ comp_obj_heading_.tags.segment_anchor_tag_epub = "_part_endnotes";
+ comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ comp_obj_heading_.tags.in_segment_html = "endnotes";
+ comp_obj_heading_.tags.anchor_tags = ["section_endnotes"];
+ comp_obj_heading_.metainfo.heading_lev_markup = 1;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ the_endnotes_section ~= comp_obj_heading_;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ ++mkn;
+ }
+ {
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "backmatter";
+ comp_obj_heading_.metainfo.is_of_section = "endnotes";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ 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";
+ comp_obj_heading_.tags.anchor_tag_html = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ comp_obj_heading_.tags.in_segment_html = comp_obj_heading_.tags.anchor_tag_html;
+ comp_obj_heading_.metainfo.heading_lev_markup = 4;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 2;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.parent_lev_markup = 0;
+ comp_obj_heading_.tags.anchor_tags = ["endnotes"];
+ the_endnotes_section ~= comp_obj_heading_;
+ tag_assoc[comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = comp_obj_heading_.tags.segment_anchor_tag_epub;
+ ++mkn;
+ }
+ } else {
+ comp_obj_heading_ = comp_obj_heading_.init;
+ comp_obj_heading_.metainfo.is_of_part = "empty";
+ comp_obj_heading_.metainfo.is_of_section = "empty";
+ comp_obj_heading_.metainfo.is_of_type = "para";
+ comp_obj_heading_.metainfo.is_a = "heading";
+ 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;
+ comp_obj_heading_.metainfo.heading_lev_collapsed = 1;
+ comp_obj_heading_.metainfo.parent_ocn = 1;
+ comp_obj_heading_.metainfo.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_.metainfo.is_of_part = "backmatter";
+ comp_obj_endnote_.metainfo.is_of_section = "endnotes";
+ comp_obj_endnote_.metainfo.is_of_type = "para";
+ 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;
+ comp_obj_heading_.metainfo.object_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["ref"].to!string;
+ string anchor_tag = "note_" ~ notenumber;
+ comp_obj_endnote_.tags.anchor_tags = [ endnotes_["anchor"][i] ];
+ comp_obj_endnote_.has.inline_links = true;
+ comp_obj_endnote_.text = endnote.inline_markup_faces.strip;
+ the_endnotes_section ~= comp_obj_endnote_;
+ }
+ }
+ auto t = tuple(the_endnotes_section, obj_cite_digits);
+ return t;
+}
#+END_SRC
***** }
-#+NAME: meta_emitters_endnotes_4
+#+NAME: meta_emitters_endnotes_function_close
#+BEGIN_SRC d
}
#+END_SRC
@@ -7223,115 +7229,115 @@ struct NotesSection {
**** bibliography :bibliography:
***** { biblio struct
-#+NAME: meta_emitters_bibliography_0
+#+NAME: meta_emitters_bibliography_function_open
#+BEGIN_SRC d
struct Bibliography {
#+END_SRC
****** biblio
-#+NAME: meta_emitters_bibliography_1
+#+NAME: meta_emitters_bibliography_function_biblio_sorted
#+BEGIN_SRC d
@system public JSONValue[] flow_bibliography_()(
- return ref string[] biblio_unsorted_incomplete,
- return ref JSONValue[] bib_arr_json
- ) {
- JSONValue[] biblio_unsorted
- = biblio_make_unsorted_array_of_json_objects(biblio_unsorted_incomplete, bib_arr_json); // TODO lookat returns
- biblio_arr_json = [];
- biblio_unsorted_incomplete = [];
- JSONValue[] biblio_sorted__ = biblio_sort(biblio_unsorted);
- debug(biblio0) {
- biblio_debug(biblio_sorted__);
- writeln("---");
- writeln("unsorted incomplete: ", biblio_unsorted_incomplete.length);
- writeln("json: ", bib_arr_json.length);
- writeln("unsorted: ", biblio_unsorted.length);
- writeln("sorted: ", biblio_sorted__.length);
- int cntr;
- int[7] x;
- while (cntr < x.length) {
- writeln(cntr, ": ", biblio_sorted__[cntr]["fulltitle"]);
- cntr++;
- }
- }
- return biblio_sorted__;
- }
+ return ref string[] biblio_unsorted_incomplete,
+ return ref JSONValue[] bib_arr_json
+) {
+ JSONValue[] biblio_unsorted
+ = biblio_make_unsorted_array_of_json_objects(biblio_unsorted_incomplete, bib_arr_json); // TODO lookat returns
+ biblio_arr_json = [];
+ biblio_unsorted_incomplete = [];
+ JSONValue[] biblio_sorted__ = biblio_sort(biblio_unsorted);
+ debug(biblio0) {
+ biblio_debug(biblio_sorted__);
+ writeln("---");
+ writeln("unsorted incomplete: ", biblio_unsorted_incomplete.length);
+ writeln("json: ", bib_arr_json.length);
+ writeln("unsorted: ", biblio_unsorted.length);
+ writeln("sorted: ", biblio_sorted__.length);
+ int cntr;
+ int[7] x;
+ while (cntr < x.length) {
+ writeln(cntr, ": ", biblio_sorted__[cntr]["fulltitle"]);
+ cntr++;
+ }
+ }
+ return biblio_sorted__;
+}
#+END_SRC
****** biblio unsorted complete
-#+NAME: meta_emitters_bibliography_2
+#+NAME: meta_emitters_bibliography_function_biblio_unsorted_json_object_array
#+BEGIN_SRC d
- @system final private JSONValue[] biblio_make_unsorted_array_of_json_objects()(
- string[] biblio_unordered,
- JSONValue[] bib_arr_json
- ) {
- foreach (bibent; biblio_unordered) {
- /+ update bib to include deemed_author, needed for:
- sort_bibliography_array_by_deemed_author_year_title
- either: sort on multiple fields, or; create such sort field
- +/
- JSONValue j = parseJSON(bibent);
- if (!empty(j["fulltitle"].str)) {
- if (!empty(j["author_raw"].str)) {
- j["deemed_author"] = j["author_arr"][0];
- } else if (!empty(j["editor_raw"].str)) {
- j["deemed_author"] = j["editor_arr"][0];
- }
- j["sortby_deemed_author_year_title"] = (
- j["deemed_author"].str ~
- "; " ~
- j["year"].str ~
- "; " ~
- j["fulltitle"].str
- );
- }
- bib_arr_json ~= j;
+@system final private JSONValue[] biblio_make_unsorted_array_of_json_objects()(
+ string[] biblio_unordered,
+ JSONValue[] bib_arr_json
+) {
+ foreach (bibent; biblio_unordered) {
+ /+ update bib to include deemed_author, needed for:
+ sort_bibliography_array_by_deemed_author_year_title
+ either: sort on multiple fields, or; create such sort field
+ +/
+ JSONValue j = parseJSON(bibent);
+ if (!empty(j["fulltitle"].str)) {
+ if (!empty(j["author_raw"].str)) {
+ j["deemed_author"] = j["author_arr"][0];
+ } else if (!empty(j["editor_raw"].str)) {
+ j["deemed_author"] = j["editor_arr"][0];
+ }
+ j["sortby_deemed_author_year_title"] = (
+ j["deemed_author"].str ~
+ "; " ~
+ j["year"].str ~
+ "; " ~
+ j["fulltitle"].str
+ );
}
- return bib_arr_json.dup;
+ bib_arr_json ~= j;
}
+ return bib_arr_json.dup;
+}
#+END_SRC
****** biblio sort
-#+NAME: meta_emitters_bibliography_3
-#+BEGIN_SRC d
- @system final private JSONValue[] biblio_sort()(JSONValue[] biblio_unordered) {
- JSONValue[] biblio_sorted_;
- biblio_sorted_
- = sort!((a, b){
- return ((a["sortby_deemed_author_year_title"].str) < (b["sortby_deemed_author_year_title"].str));
- })(biblio_unordered).array;
- debug(bibliosorted) {
- foreach (j; biblio_sorted_) {
- if (!empty(j["fulltitle"].str)) {
- writeln(j["sortby_deemed_author_year_title"]);
- }
+#+NAME: meta_emitters_bibliography_function_biblio_sort_json
+#+BEGIN_SRC d
+@system final private JSONValue[] biblio_sort()(JSONValue[] biblio_unordered) {
+ JSONValue[] biblio_sorted_;
+ biblio_sorted_
+ = sort!((a, b){
+ return ((a["sortby_deemed_author_year_title"].str) < (b["sortby_deemed_author_year_title"].str));
+ })(biblio_unordered).array;
+ debug(bibliosorted) {
+ foreach (j; biblio_sorted_) {
+ if (!empty(j["fulltitle"].str)) {
+ writeln(j["sortby_deemed_author_year_title"]);
}
}
- return biblio_sorted_;
}
+ return biblio_sorted_;
+}
#+END_SRC
****** biblio debug
-#+NAME: meta_emitters_bibliography_4
+#+NAME: meta_emitters_bibliography_function_biblio_sorted_json
#+BEGIN_SRC d
- @system void biblio_debug()(JSONValue[] biblio_sorted) {
- debug(biblio0) {
- foreach (j; biblio_sorted) {
- if (!empty(j["fulltitle"].str)) {
- writeln(j["sortby_deemed_author_year_title"]);
- }
+@system void biblio_debug()(JSONValue[] biblio_sorted) {
+ debug(biblio0) {
+ foreach (j; biblio_sorted) {
+ if (!empty(j["fulltitle"].str)) {
+ writeln(j["sortby_deemed_author_year_title"]);
}
}
}
+}
#+END_SRC
***** }
-#+NAME: meta_emitters_bibliography_5
+#+NAME: meta_emitters_bibliography_function_close
#+BEGIN_SRC d
}
#+END_SRC
@@ -7339,7 +7345,7 @@ struct Bibliography {
**** node structure metadata :structure:metadata:node:
***** { metadata node struct
-#+NAME: meta_emitters_metadata_0
+#+NAME: meta_emitters_metadata_function_open
#+BEGIN_SRC d
struct NodeStructureMetadata {
int lv, lv0, lv1, lv2, lv3, lv4, lv5, lv6, lv7;
@@ -7350,269 +7356,269 @@ struct NodeStructureMetadata {
****** node metadata emitter
-#+NAME: meta_emitters_metadata_1
-#+BEGIN_SRC d
- @safe ObjGenericComposite node_location_emitter(La,Ta,N)(
- string lev_markup_number,
- string[string] tag_in_seg,
- La lev_anchor_tag,
- Ta tag_assoc,
- N obj_cite_digits,
- int cntr_,
- int ptr_,
- string is_
- ) {
- debug(asserts) {
- static assert(is(typeof(obj_cite_digits.object_number) == int));
- }
- assert(is_ != "heading");
- assert(obj_cite_digits.object_number.to!int >= 0);
- assert(is_ != "heading"); // should not be necessary
- assert(obj_cite_digits.object_number.to!int >= 0); // should not be necessary
- if (lv7 > eN.bi.off) {
- p_["lev_markup_number"] = DocStructMarkupHeading.h_text_4;
- p_["object_number"] = lv7;
- } else if (lv6 > eN.bi.off) {
- p_["lev_markup_number"] = DocStructMarkupHeading.h_text_3;
- p_["object_number"] = lv6;
- } else if (lv5 > eN.bi.off) {
- p_["lev_markup_number"] = DocStructMarkupHeading.h_text_2;
- p_["object_number"] = lv5;
+#+NAME: meta_emitters_metadata_function_node_location
+#+BEGIN_SRC d
+@safe ObjGenericComposite node_location_emitter(La,Ta,N)(
+ string lev_markup_number,
+ string[string] tag_in_seg,
+ La lev_anchor_tag,
+ Ta tag_assoc,
+ N obj_cite_digits,
+ int cntr_,
+ int ptr_,
+ string is_
+) {
+ debug(asserts) {
+ static assert(is(typeof(obj_cite_digits.object_number) == int));
+ }
+ assert(is_ != "heading");
+ assert(obj_cite_digits.object_number.to!int >= 0);
+ assert(is_ != "heading"); // should not be necessary
+ assert(obj_cite_digits.object_number.to!int >= 0); // should not be necessary
+ if (lv7 > eN.bi.off) {
+ p_["lev_markup_number"] = DocStructMarkupHeading.h_text_4;
+ p_["object_number"] = lv7;
+ } else if (lv6 > eN.bi.off) {
+ p_["lev_markup_number"] = DocStructMarkupHeading.h_text_3;
+ p_["object_number"] = lv6;
+ } else if (lv5 > eN.bi.off) {
+ p_["lev_markup_number"] = DocStructMarkupHeading.h_text_2;
+ p_["object_number"] = lv5;
+ } else {
+ p_["lev_markup_number"] = DocStructMarkupHeading.h_text_1;
+ p_["object_number"] = lv4;
+ }
+ ObjGenericComposite comp_obj_location;
+ comp_obj_location = comp_obj_location.init;
+ comp_obj_location.metainfo.is_a = is_;
+ comp_obj_location.metainfo.ocn = obj_cite_digits.object_number;
+ comp_obj_location.metainfo.identifier = obj_cite_digits.identifier;
+ comp_obj_location.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
+ comp_obj_location.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
+ comp_obj_location.tags.heading_lev_anchor_tag = lev_anchor_tag;
+ comp_obj_location.metainfo.parent_ocn = p_["object_number"];
+ comp_obj_location.metainfo.parent_lev_markup = p_["lev_markup_number"];
+ debug(_node) {
+ if (lev_markup_number.match(rgx.levels_numbered_headings)) {
+ writeln("x ", _node.to!string);
} else {
- p_["lev_markup_number"] = DocStructMarkupHeading.h_text_1;
- p_["object_number"] = lv4;
- }
- ObjGenericComposite comp_obj_location;
- comp_obj_location = comp_obj_location.init;
- comp_obj_location.metainfo.is_a = is_;
- comp_obj_location.metainfo.ocn = obj_cite_digits.object_number;
- comp_obj_location.metainfo.identifier = obj_cite_digits.identifier;
- comp_obj_location.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
- comp_obj_location.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
- comp_obj_location.tags.heading_lev_anchor_tag = lev_anchor_tag;
- comp_obj_location.metainfo.parent_ocn = p_["object_number"];
- comp_obj_location.metainfo.parent_lev_markup = p_["lev_markup_number"];
- debug(_node) {
- if (lev_markup_number.match(rgx.levels_numbered_headings)) {
- writeln("x ", _node.to!string);
- } else {
- writeln("- ", _node.to!string);
- }
+ writeln("- ", _node.to!string);
}
- assert(comp_obj_location.metainfo.parent_lev_markup >= 4);
- assert(comp_obj_location.metainfo.parent_lev_markup <= 7);
- assert(comp_obj_location.metainfo.parent_ocn >= 0);
- return comp_obj_location;
- }
- invariant() {
}
+ assert(comp_obj_location.metainfo.parent_lev_markup >= 4);
+ assert(comp_obj_location.metainfo.parent_lev_markup <= 7);
+ assert(comp_obj_location.metainfo.parent_ocn >= 0);
+ return comp_obj_location;
+}
+invariant() {
+}
#+END_SRC
****** node metadata emitter heading, (including most segnames & their pointers)
-#+NAME: meta_emitters_metadata_2
-#+BEGIN_SRC d
- @safe ObjGenericComposite node_emitter_heading(Hd,TaL,TA,N,fNr,fNs,fL)(
- string _text,
- string lev_markup_number,
- string lev_collapsed_number,
- Hd dummy_heading_status,
- string[string] tag_in_seg,
- TaL lev_anchor_tag,
- TA tag_assoc,
- N obj_cite_digits,
- int cntr_,
- int ptr_,
- string[] lv_ancestors_txt,
- string is_,
- int html_segnames_ptr,
- fNr flag_notes_reg,
- fNs flag_notes_star,
- fL flag_links,
- ) {
- debug(asserts) {
- static assert(is(typeof(lev) == string));
- static assert(is(typeof(obj_cite_digits.object_number) == int));
- }
- assert(is_ == "heading");
- assert((obj_cite_digits.object_number).to!int >= 0);
- assert(
- lev_markup_number.match(rgx.levels_numbered),
- ("not a valid heading level: " ~ lev_markup_number ~ " at " ~ obj_cite_digits.object_number.to!string)
- );
- if (lev_markup_number.match(rgx.levels_numbered)) {
- if (lev_markup_number.to!int == 0) {
- /+ TODO first hit (of two) with this assertion failure, check, fix & reinstate
- assert(obj_cite_digits.object_number.to!int == 1,
- "ERROR header lev markup number is: " ~
- lev_markup_number.to!string ~
- " obj_cite_digits.object_number.to!int should == 1 but is: " ~
- obj_cite_digits.object_number.to!string ~
- "\n" ~ _text);
- +/
- }
- }
- switch (lev_markup_number.to!int) {
- case 0:
- lv = DocStructMarkupHeading.h_sect_A;
- lv0 = obj_cite_digit;
- lv1 = 0; lv2 = 0; lv3 = 0; lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
- p_["lev_markup_number"] = 0;
- p_["object_number"] = 0;
- break;
- case 1:
- lv = DocStructMarkupHeading.h_sect_B;
- lv1 = obj_cite_digit;
- lv2 = 0; lv3 = 0; lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
- p_["lev_markup_number"]
- = DocStructMarkupHeading.h_sect_A;
- p_["object_number"] = lv0;
- break;
- case 2:
- lv = DocStructMarkupHeading.h_sect_C;
- lv2 = obj_cite_digit;
- lv3 = 0; lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
+#+NAME: meta_emitters_metadata_function_heading
+#+BEGIN_SRC d
+@safe ObjGenericComposite node_emitter_heading(Hd,TaL,TA,N,fNr,fNs,fL)(
+ string _text,
+ string lev_markup_number,
+ string lev_collapsed_number,
+ Hd dummy_heading_status,
+ string[string] tag_in_seg,
+ TaL lev_anchor_tag,
+ TA tag_assoc,
+ N obj_cite_digits,
+ int cntr_,
+ int ptr_,
+ string[] lv_ancestors_txt,
+ string is_,
+ int html_segnames_ptr,
+ fNr flag_notes_reg,
+ fNs flag_notes_star,
+ fL flag_links,
+) {
+ debug(asserts) {
+ static assert(is(typeof(lev) == string));
+ static assert(is(typeof(obj_cite_digits.object_number) == int));
+ }
+ assert(is_ == "heading");
+ assert((obj_cite_digits.object_number).to!int >= 0);
+ assert(
+ lev_markup_number.match(rgx.levels_numbered),
+ ("not a valid heading level: " ~ lev_markup_number ~ " at " ~ obj_cite_digits.object_number.to!string)
+ );
+ if (lev_markup_number.match(rgx.levels_numbered)) {
+ if (lev_markup_number.to!int == 0) {
+ /+ TODO first hit (of two) with this assertion failure, check, fix & reinstate
+ assert(obj_cite_digits.object_number.to!int == 1,
+ "ERROR header lev markup number is: " ~
+ lev_markup_number.to!string ~
+ " obj_cite_digits.object_number.to!int should == 1 but is: " ~
+ obj_cite_digits.object_number.to!string ~
+ "\n" ~ _text);
+ +/
+ }
+ }
+ switch (lev_markup_number.to!int) {
+ case 0:
+ lv = DocStructMarkupHeading.h_sect_A;
+ lv0 = obj_cite_digit;
+ lv1 = 0; lv2 = 0; lv3 = 0; lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
+ p_["lev_markup_number"] = 0;
+ p_["object_number"] = 0;
+ break;
+ case 1:
+ lv = DocStructMarkupHeading.h_sect_B;
+ lv1 = obj_cite_digit;
+ lv2 = 0; lv3 = 0; lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
+ p_["lev_markup_number"]
+ = DocStructMarkupHeading.h_sect_A;
+ p_["object_number"] = lv0;
+ break;
+ case 2:
+ lv = DocStructMarkupHeading.h_sect_C;
+ lv2 = obj_cite_digit;
+ lv3 = 0; lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
+ p_["lev_markup_number"]
+ = DocStructMarkupHeading.h_sect_B;
+ p_["object_number"] = lv1;
+ break;
+ case 3:
+ lv = DocStructMarkupHeading.h_sect_D;
+ lv3 = obj_cite_digit;
+ lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
+ p_["lev_markup_number"]
+ = DocStructMarkupHeading.h_sect_C;
+ p_["object_number"] = lv2;
+ break;
+ case 4:
+ lv = DocStructMarkupHeading.h_text_1;
+ lv4 = obj_cite_digit;
+ lv5 = 0; lv6 = 0; lv7 = 0;
+ if (lv3 > eN.bi.off) {
p_["lev_markup_number"]
- = DocStructMarkupHeading.h_sect_B;
- p_["object_number"] = lv1;
- break;
- case 3:
- lv = DocStructMarkupHeading.h_sect_D;
- lv3 = obj_cite_digit;
- lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0;
+ = DocStructMarkupHeading.h_sect_D;
+ p_["object_number"] = lv3;
+ } else if (lv2 > eN.bi.off) {
p_["lev_markup_number"]
= DocStructMarkupHeading.h_sect_C;
p_["object_number"] = lv2;
- break;
- case 4:
- lv = DocStructMarkupHeading.h_text_1;
- lv4 = obj_cite_digit;
- lv5 = 0; lv6 = 0; lv7 = 0;
- if (lv3 > eN.bi.off) {
- p_["lev_markup_number"]
- = DocStructMarkupHeading.h_sect_D;
- p_["object_number"] = lv3;
- } else if (lv2 > eN.bi.off) {
- p_["lev_markup_number"]
- = DocStructMarkupHeading.h_sect_C;
- p_["object_number"] = lv2;
- } else if (lv1 > eN.bi.off) {
- p_["lev_markup_number"]
- = DocStructMarkupHeading.h_sect_B;
- p_["object_number"] = lv1;
- } else {
- p_["lev_markup_number"]
- = DocStructMarkupHeading.h_sect_A;
- p_["object_number"] = lv0;
- }
- break;
- case 5:
- lv = DocStructMarkupHeading.h_text_2;
- lv5 = obj_cite_digit;
- lv6 = 0; lv7 = 0;
- p_["lev_markup_number"]
- = DocStructMarkupHeading.h_text_1;
- p_["object_number"] = lv4;
- break;
- case 6:
- lv = DocStructMarkupHeading.h_text_3;
- lv6 = obj_cite_digit;
- lv7 = 0;
+ } else if (lv1 > eN.bi.off) {
p_["lev_markup_number"]
- = DocStructMarkupHeading.h_text_2;
- p_["object_number"] = lv5;
- break;
- case 7:
- lv = DocStructMarkupHeading.h_text_4;
- lv7 = obj_cite_digit;
+ = DocStructMarkupHeading.h_sect_B;
+ p_["object_number"] = lv1;
+ } else {
p_["lev_markup_number"]
- = DocStructMarkupHeading.h_text_3;
- p_["object_number"] = lv6;
- break;
- default:
- break;
+ = DocStructMarkupHeading.h_sect_A;
+ p_["object_number"] = lv0;
}
- ObjGenericComposite _comp_obj_heading_;
- _comp_obj_heading_ = _comp_obj_heading_.init;
- _comp_obj_heading_.metainfo.is_of_part = "body";
- _comp_obj_heading_.metainfo.is_of_section = "body";
- _comp_obj_heading_.metainfo.is_of_type = "para";
- _comp_obj_heading_.metainfo.is_a = "heading";
- _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;
- _comp_obj_heading_.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
- _comp_obj_heading_.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
- _comp_obj_heading_.tags.in_segment_html = _comp_obj_heading_.tags.anchor_tag_html;
- _comp_obj_heading_.tags.heading_lev_anchor_tag = lev_anchor_tag;
- _comp_obj_heading_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
- _comp_obj_heading_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
- _comp_obj_heading_.metainfo.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
- _comp_obj_heading_.metainfo.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
- _comp_obj_heading_.metainfo.parent_ocn = p_["object_number"];
- _comp_obj_heading_.metainfo.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;
- tag_assoc[_comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = _comp_obj_heading_.tags.in_segment_html;
- tag_assoc[_comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = _comp_obj_heading_.tags.segment_anchor_tag_epub;
- debug(_node) {
- if (lev_markup_number.match(rgx.levels_numbered_headings)) {
- writeln("* ", _node.to!string);
- }
- }
- debug(nodeheading) {
- if (lev_markup_number.match(rgx.levels_numbered_headings)) {
- writeln("* ", _node.to!string);
- }
- }
- assert(_comp_obj_heading_.metainfo.parent_lev_markup <= 7);
- assert(_comp_obj_heading_.metainfo.parent_ocn >= 0);
- if (lev_markup_number.match(rgx.levels_numbered_headings)) {
- assert(_comp_obj_heading_.metainfo.heading_lev_markup <= 7);
- assert(_comp_obj_heading_.metainfo.ocn >= 0);
- if (_comp_obj_heading_.metainfo.parent_lev_markup > 0) {
- assert(_comp_obj_heading_.metainfo.parent_lev_markup < _comp_obj_heading_.metainfo.heading_lev_markup);
- if (_comp_obj_heading_.metainfo.ocn != 0) {
- assert(_comp_obj_heading_.metainfo.parent_ocn < _comp_obj_heading_.metainfo.ocn);
- }
- }
- if (_comp_obj_heading_.metainfo.heading_lev_markup == 0) {
- assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
- } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_sect_B) {
- assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
- } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_sect_C) {
- assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_B);
- } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_sect_D) {
- assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_C);
- } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_1) {
- assert(_comp_obj_heading_.metainfo.parent_lev_markup <= DocStructMarkupHeading.h_sect_D);
- } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_2) {
- assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_text_1);
- } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_3) {
- assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_text_2);
- } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_4) {
- assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_text_3);
- } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_5) {
- }
- }
- return _comp_obj_heading_;
+ break;
+ case 5:
+ lv = DocStructMarkupHeading.h_text_2;
+ lv5 = obj_cite_digit;
+ lv6 = 0; lv7 = 0;
+ p_["lev_markup_number"]
+ = DocStructMarkupHeading.h_text_1;
+ p_["object_number"] = lv4;
+ break;
+ case 6:
+ lv = DocStructMarkupHeading.h_text_3;
+ lv6 = obj_cite_digit;
+ lv7 = 0;
+ p_["lev_markup_number"]
+ = DocStructMarkupHeading.h_text_2;
+ p_["object_number"] = lv5;
+ break;
+ case 7:
+ lv = DocStructMarkupHeading.h_text_4;
+ lv7 = obj_cite_digit;
+ p_["lev_markup_number"]
+ = DocStructMarkupHeading.h_text_3;
+ p_["object_number"] = lv6;
+ break;
+ default:
+ break;
}
- invariant() {
+ ObjGenericComposite _comp_obj_heading_;
+ _comp_obj_heading_ = _comp_obj_heading_.init;
+ _comp_obj_heading_.metainfo.is_of_part = "body";
+ _comp_obj_heading_.metainfo.is_of_section = "body";
+ _comp_obj_heading_.metainfo.is_of_type = "para";
+ _comp_obj_heading_.metainfo.is_a = "heading";
+ _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;
+ _comp_obj_heading_.tags.segment_anchor_tag_epub = tag_in_seg["seg_lv1_to_4"];
+ _comp_obj_heading_.tags.anchor_tag_html = tag_in_seg["seg_lv4"];
+ _comp_obj_heading_.tags.in_segment_html = _comp_obj_heading_.tags.anchor_tag_html;
+ _comp_obj_heading_.tags.heading_lev_anchor_tag = lev_anchor_tag;
+ _comp_obj_heading_.tags.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"];
+ _comp_obj_heading_.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"];
+ _comp_obj_heading_.metainfo.heading_lev_markup = (!(lev_markup_number.empty) ? lev_markup_number.to!int : 0);
+ _comp_obj_heading_.metainfo.heading_lev_collapsed = (!(lev_collapsed_number.empty) ? lev_collapsed_number.to!int : 0);
+ _comp_obj_heading_.metainfo.parent_ocn = p_["object_number"];
+ _comp_obj_heading_.metainfo.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;
+ tag_assoc[_comp_obj_heading_.tags.anchor_tag_html]["seg_lv4"] = _comp_obj_heading_.tags.in_segment_html;
+ tag_assoc[_comp_obj_heading_.tags.segment_anchor_tag_epub]["seg_lv1_to_4"] = _comp_obj_heading_.tags.segment_anchor_tag_epub;
+ debug(_node) {
+ if (lev_markup_number.match(rgx.levels_numbered_headings)) {
+ writeln("* ", _node.to!string);
+ }
}
+ debug(nodeheading) {
+ if (lev_markup_number.match(rgx.levels_numbered_headings)) {
+ writeln("* ", _node.to!string);
+ }
+ }
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup <= 7);
+ assert(_comp_obj_heading_.metainfo.parent_ocn >= 0);
+ if (lev_markup_number.match(rgx.levels_numbered_headings)) {
+ assert(_comp_obj_heading_.metainfo.heading_lev_markup <= 7);
+ assert(_comp_obj_heading_.metainfo.ocn >= 0);
+ if (_comp_obj_heading_.metainfo.parent_lev_markup > 0) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup < _comp_obj_heading_.metainfo.heading_lev_markup);
+ if (_comp_obj_heading_.metainfo.ocn != 0) {
+ assert(_comp_obj_heading_.metainfo.parent_ocn < _comp_obj_heading_.metainfo.ocn);
+ }
+ }
+ if (_comp_obj_heading_.metainfo.heading_lev_markup == 0) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_sect_B) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_A);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_sect_C) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_B);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_sect_D) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_sect_C);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_1) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup <= DocStructMarkupHeading.h_sect_D);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_2) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_text_1);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_3) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_text_2);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_4) {
+ assert(_comp_obj_heading_.metainfo.parent_lev_markup == DocStructMarkupHeading.h_text_3);
+ } else if (_comp_obj_heading_.metainfo.heading_lev_markup == DocStructMarkupHeading.h_text_5) {
+ }
+ }
+ return _comp_obj_heading_;
+}
+invariant() {
+}
#+END_SRC
***** }
-#+NAME: meta_emitters_metadata_3
+#+NAME: meta_emitters_metadata_function_close
#+BEGIN_SRC d
}
#+END_SRC
@@ -7839,16 +7845,16 @@ set abstracted objects for downstream processing
module doc_reform.meta.metadoc_object_setter;
template ObjectSetter() {
/+ structs +/
- <<meta_structs_init_0>>
- <<meta_structs_init_1>>
- <<meta_structs_init_2>>
- <<meta_structs_init_3>>
- <<meta_structs_init_4>>
- <<meta_structs_init_5>>
- <<meta_structs_init_6>>
- <<meta_structs_init_7>>
- <<meta_structs_init_8>>
- <<meta_structs_init_9>>
+ <<meta_structs_init_docObj_metainfo>>
+ <<meta_structs_init_docObj_txtAttrib>>
+ <<meta_structs_init_docObj_has>>
+ <<meta_structs_init_docObj_table>>
+ <<meta_structs_init_docObj_code_block>>
+ <<meta_structs_init_docObj_stow>>
+ <<meta_structs_init_docObj_pointer>>
+ <<meta_structs_init_docObj_tags>>
+ <<meta_structs_init_docObj_composite>>
+ <<meta_structs_init_docObj_theObjects>>
}
#+END_SRC
@@ -7869,7 +7875,7 @@ struct HeadingAttrib {
*** _composite object_ [#A]
-#+NAME: meta_structs_init_0
+#+NAME: meta_structs_init_docObj_metainfo
#+BEGIN_SRC d
struct DocObj_MetaInfo_ {
string is_of_part = ""; // frontmatter, body, backmatter
@@ -7948,7 +7954,7 @@ struct DocObj_MetaInfo_ {
**** object text attributes
-#+NAME: meta_structs_init_1
+#+NAME: meta_structs_init_docObj_txtAttrib
#+BEGIN_SRC d
struct DocObj_TxtAttrib_ {
int indent_base = 0;
@@ -7960,7 +7966,7 @@ struct DocObj_TxtAttrib_ {
**** object has within it
-#+NAME: meta_structs_init_2
+#+NAME: meta_structs_init_docObj_has
#+BEGIN_SRC d
struct DocObj_Has_ {
bool inline_links = false;
@@ -7973,7 +7979,7 @@ struct DocObj_Has_ {
**** table attributes
-#+NAME: meta_structs_init_3
+#+NAME: meta_structs_init_docObj_table
#+BEGIN_SRC d
struct DocObj_Table_ {
int number_of_columns = 0;
@@ -7986,7 +7992,7 @@ struct DocObj_Table_ {
**** code attributes
-#+NAME: meta_structs_init_4
+#+NAME: meta_structs_init_docObj_code_block
#+BEGIN_SRC d
struct DocObj_CodeBlock_ {
string syntax = "";
@@ -7996,7 +8002,7 @@ struct DocObj_CodeBlock_ {
**** stow (things to be protected from regular text transformations, so far links)
-#+NAME: meta_structs_init_5
+#+NAME: meta_structs_init_docObj_stow
#+BEGIN_SRC d
struct DocObj_Stow_ {
string[] link = [];
@@ -8005,7 +8011,7 @@ struct DocObj_Stow_ {
**** pointers
-#+NAME: meta_structs_init_6
+#+NAME: meta_structs_init_docObj_pointer
#+BEGIN_SRC d
struct DocObj_Pointer_ {
int doc_object = 0;
@@ -8016,7 +8022,7 @@ struct DocObj_Pointer_ {
**** tags
-#+NAME: meta_structs_init_7
+#+NAME: meta_structs_init_docObj_tags
#+BEGIN_SRC d
struct DocObj_Tags_ {
string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ];
@@ -8035,7 +8041,7 @@ struct DocObj_Tags_ {
**** composite object the parts
-#+NAME: meta_structs_init_8
+#+NAME: meta_structs_init_docObj_composite
#+BEGIN_SRC d
struct ObjGenericComposite {
string text = "";
@@ -8052,7 +8058,7 @@ struct ObjGenericComposite {
*** The Objects: generic composite object array
-#+NAME: meta_structs_init_9
+#+NAME: meta_structs_init_docObj_theObjects
#+BEGIN_SRC d
struct TheObjects {
ObjGenericComposite[] oca;
diff --git a/org/spine.org b/org/spine.org
index 241279e..ebd5e95 100644
--- a/org/spine.org
+++ b/org/spine.org
@@ -100,13 +100,13 @@ string program_name = "spine";
<<spine_init_0>>
<<spine_init_1>>
<<spine_init_2>>
- <<spine_args_0>>
- <<spine_args_1>>
- <<spine_args_2>>
- <<spine_args_3>>
- <<spine_args_4>>
- <<spine_args_5>>
- <<spine_args_6>>
+ <<spine_args_0_args_init>>
+ <<spine_args_1_args_get_options_aa>>
+ <<spine_args_2_args_get_options_aa2str>>
+ <<spine_args_3_program_info>>
+ <<spine_args_4_get_configuration_details>>
+ <<spine_args_5_call_output_hub>>
+ <<spine_args_6_process_args>>
if (_manifests.length > 1 // _manifests[0] initialized dummy element
&& _opt_action.abstraction) {
if (_opt_action.parallelise) { // see else
@@ -368,7 +368,7 @@ scope(failure) {
- set getopt options
***** initialize
-#+NAME: spine_args_0
+#+NAME: spine_args_0_args_init
#+BEGIN_SRC d
bool[string] opts = [
"abstraction" : false,
@@ -446,7 +446,7 @@ string[string] settings = [
***** set & describe
-#+NAME: spine_args_1
+#+NAME: spine_args_1_args_get_options_aa
#+BEGIN_SRC d
auto helpInfo = getopt(args,
std.getopt.config.passThrough,
@@ -528,7 +528,7 @@ if (helpInfo.helpWanted) {
**** getopt hash to struct
- move getopt options to struct
-#+NAME: spine_args_2
+#+NAME: spine_args_2_args_get_options_aa2str
#+BEGIN_SRC d
enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff }
struct OptActions {
@@ -849,7 +849,7 @@ OptActions _opt_action = OptActions();
**** env
- environmental info
-#+NAME: spine_args_3
+#+NAME: spine_args_3_program_info
#+BEGIN_SRC d
@safe auto program_info() {
struct ProgramInfo {
@@ -881,7 +881,7 @@ auto _env = [
*** get/read site config
-#+NAME: spine_args_4
+#+NAME: spine_args_4_get_configuration_details
#+BEGIN_SRC d
auto _manifested = PathMatters!()(_opt_action, _env, "");
auto _manifests = [ _manifested ];
@@ -916,7 +916,7 @@ if (_opt_action.show_config) {
*** use config for operations that do not require file processing
-#+NAME: spine_args_5
+#+NAME: spine_args_5_call_output_hub
#+BEGIN_SRC d
if (!(_opt_action.skip_output)) {
if ((_opt_action.debug_do)
@@ -935,7 +935,7 @@ if (!(_opt_action.skip_output)) {
*** opt action on processing files (loop args)
-#+NAME: spine_args_6
+#+NAME: spine_args_6_process_args
#+BEGIN_SRC d
ConfComposite _make_and_meta_struct = _config;
destroy(_config);
@@ -1322,15 +1322,15 @@ template spineAbstraction() {
<<spine_each_file_do_read_and_split_dr_markup_file_content_into_header_and_body>>
<<spine_each_file_do_split_dr_markup_file_header_into_make_and_meta_structs>>
<<spine_each_file_do_document_abstraction>>
- <<spine_each_file_do_document_matters>>
- <<spine_each_file_do_document_matters_0>>
- <<spine_each_file_do_document_matters_1>>
- <<spine_each_file_do_document_matters_2>>
- <<spine_each_file_do_document_matters_3>>
- <<spine_each_file_do_document_matters_4>>
- <<spine_each_file_do_document_matters_5>>
- <<spine_each_file_do_document_matters_6>>
- <<spine_each_file_do_document_matters_7>>
+ <<spine_each_file_do_document_matters_msg_step4_start>>
+ <<spine_each_file_do_document_matters_0_struct_open>>
+ <<spine_each_file_do_document_matters_1_detail_program_time>>
+ <<spine_each_file_do_document_matters_2_meta>>
+ <<spine_each_file_do_document_matters_3_env>>
+ <<spine_each_file_do_document_matters_4_opt>>
+ <<spine_each_file_do_document_matters_5_doc>>
+ <<spine_each_file_do_document_matters_6_struct_close_gather>>
+ <<spine_each_file_do_document_matters_msg_step4_end>>
auto t = tuple(doc_abstraction, doc_matters);
return t;
}
@@ -1470,7 +1470,7 @@ if ((_opt_action.debug_do)
**** verbose message
-#+NAME: spine_each_file_do_document_matters
+#+NAME: spine_each_file_do_document_matters_msg_step4_start
#+BEGIN_SRC d
if ((_opt_action.debug_do)
|| (_opt_action.very_verbose)
@@ -1481,14 +1481,14 @@ if ((_opt_action.debug_do)
**** DocumentMatters struct {
-#+NAME: spine_each_file_do_document_matters_0
+#+NAME: spine_each_file_do_document_matters_0_struct_open
#+BEGIN_SRC d
struct DocumentMatters {
#+END_SRC
**** generator related
-#+NAME: spine_each_file_do_document_matters_1
+#+NAME: spine_each_file_do_document_matters_1_detail_program_time
#+BEGIN_SRC d
@safe auto generator_program() {
struct Prog_ {
@@ -1537,7 +1537,7 @@ struct DocumentMatters {
**** config make & meta
-#+NAME: spine_each_file_do_document_matters_2
+#+NAME: spine_each_file_do_document_matters_2_meta
#+BEGIN_SRC d
@safe auto conf_make_meta() {
return _make_and_meta_struct;
@@ -1549,7 +1549,7 @@ struct DocumentMatters {
**** env related
-#+NAME: spine_each_file_do_document_matters_3
+#+NAME: spine_each_file_do_document_matters_3_env
#+BEGIN_SRC d
@safe auto env() {
struct Env_ {
@@ -1566,7 +1566,7 @@ struct DocumentMatters {
**** opt
-#+NAME: spine_each_file_do_document_matters_4
+#+NAME: spine_each_file_do_document_matters_4_opt
#+BEGIN_SRC d
@safe auto opt() {
struct Opt_ {
@@ -1584,7 +1584,7 @@ struct DocumentMatters {
**** output related
-#+NAME: spine_each_file_do_document_matters_5
+#+NAME: spine_each_file_do_document_matters_5_doc
#+BEGIN_SRC d
@safe auto src() {
return _manifest.src;
@@ -1645,7 +1645,7 @@ struct DocumentMatters {
**** } close
-#+NAME: spine_each_file_do_document_matters_6
+#+NAME: spine_each_file_do_document_matters_6_struct_close_gather
#+BEGIN_SRC d
}
auto doc_matters = DocumentMatters();
@@ -1653,7 +1653,7 @@ auto doc_matters = DocumentMatters();
**** step complete message
-#+NAME: spine_each_file_do_document_matters_7
+#+NAME: spine_each_file_do_document_matters_msg_step4_end
#+BEGIN_SRC d
if ((_opt_action.debug_do)
|| (_opt_action.very_verbose)
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org
index 55d74a2..da1d01f 100644
--- a/org/spine_build_scaffold.org
+++ b/org/spine_build_scaffold.org
@@ -22,63 +22,63 @@
** tangle
#+BEGIN_SRC makefile :tangle ../makefile
-<<makefile_var_0>>
-<<makefile_var_1>>
-<<makefile_var_2>>
-<<makefile_var_3>>
-<<makefile_var_4>>
-<<makefile_var_5>>
-<<makefile_a_0>>
-<<makefile_a_1>>
-<<makefile_a_2>>
-<<makefile_b_0>>
-<<makefile_b_1>>
-<<makefile_b_2>>
-<<makefile_b_3>>
-<<makefile_b_4>>
-<<makefile_meson>>
-<<makefile_c_0>>
-<<makefile_c_1>>
-<<makefile_c_2>>
-<<makefile_dmd_0>>
-<<makefile_dmd_1>>
-<<makefile_dmd_2>>
-<<makefile_dmd_3>>
-<<makefile_gdc_0>>
-<<makefile_gdc_1>>
-<<makefile_gdc_2>>
-<<makefile_gdc_3>>
-<<makefile_ldc_0>>
-<<makefile_ldc_1>>
-<<makefile_ldc_2>>
-<<makefile_ldc_3>>
-<<makefile_d_0>>
-<<makefile_d_1>>
-<<makefile_d_2>>
-<<makefile_testrun_0>>
-<<makefile_testrun_1>>
-<<makefile_testrun_2>>
-<<makefile_testrun_3>>
-<<makefile_testrun_4>>
-<<makefile_testrun_5>>
-<<makefile_testrun_6>>
-<<makefile_testrun_7>>
-<<makefile_testrun_8>>
-<<makefile_testrun_9>>
-<<makefile_testrun_10>>
-<<makefile_testrun_11>>
-<<makefile_testrun_12>>
-<<makefile_tangle_0>>
-<<makefile_tangle_1>>
-<<makefile_nix_project_shell>>
-<<makefile_git_snapshot>>
-<<makefile_phony>>
+<<make_set_var_0_git_version>>
+<<make_set_var_1_dub>>
+<<make_set_var_2_project_details>>
+<<make_set_var_3_emacs_org>>
+<<make_set_var_4_markup_samples_pods>>
+<<make_set_var_5_markup_samples_search_dirs>>
+<<make_find_markup_samples_0_pod_and_dir>>
+<<make_find_markup_samples_1_pod>>
+<<make_find_markup_samples_2_dir>>
+<<make_dub_upgrade>>
+<<make_compile_0_compiler_default>>
+<<make_compile_1_compiler_all>>
+<<make_compile_2_compiler_all_versioned>>
+<<make_compile_3_compiler_all_debug>>
+<<make_meson_build>>
+<<make_clean_tangle_compile_0_all_clean>>
+<<make_clean_tangle_compile_1_all_clean_versioned>>
+<<make_clean_tangle_compile_2_all_clean_debug>>
+<<make_dub_compile_dmd_0_default>>
+<<make_dub_compile_dmd_1_debug>>
+<<make_dub_compile_dmd_2_versioned>>
+<<make_dub_compile_dmd_3_release>>
+<<make_dub_compile_gdc_0_default>>
+<<make_dub_compile_gdc_1_debug>>
+<<make_dub_compile_gdc_2_versioned>>
+<<make_dub_compile_gdc_3_release>>
+<<make_dub_compile_ldc_0_default>>
+<<make_dub_compile_ldc_1_debug>>
+<<make_dub_compile_ldc_2_versioned>>
+<<make_dub_compile_ldc_3_release>>
+<<make_initialization_operations_0_parts>>
+<<make_initialization_operations_1_git_version>>
+<<make_initialization_operations_2_assemble>>
+<<make_project_testrun_0_find_pods>>
+<<make_project_testrun_1>>
+<<make_project_testrun_2>>
+<<make_project_testrun_3>>
+<<make_project_testrun_4>>
+<<make_project_testrun_5>>
+<<make_project_testrun_6>>
+<<make_project_testrun_7>>
+<<make_project_testrun_8>>
+<<make_project_testrun_9>>
+<<make_project_testrun_10>>
+<<make_project_testrun_11>>
+<<make_project_testrun_12>>
+<<make_tangle_0>>
+<<make_tangle_1>>
+<<make_nix_project_shell>>
+<<make_git_snapshot>>
+<<make_phony>>
#+END_SRC
** settings [+2] :settings:
*** git version stamp :git:version:
-#+NAME: makefile_var_0
+#+NAME: make_set_var_0_git_version
#+BEGIN_SRC makefile
PROG_VER_GIT :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`)
PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`)
@@ -86,7 +86,7 @@ PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "
*** dub (build tool) :dub:
-#+NAME: makefile_var_1
+#+NAME: make_set_var_1_dub
#+BEGIN_SRC makefile
DUB=dub
DUB_FLAGS=-v --force --compiler=
@@ -94,7 +94,7 @@ DUB_FLAGS=-v --force --compiler=
*** Project Details :project:spine:
-#+NAME: makefile_var_2
+#+NAME: make_set_var_2_project_details
#+BEGIN_SRC makefile
PRG_NAME=doc-reform
PRG_NICKAME=spine
@@ -108,7 +108,7 @@ PRG_DOCDIR=./docs
*** Emacs Org settings :settings:emacs:org:tangle:
-#+NAME: makefile_var_3
+#+NAME: make_set_var_3_emacs_org
#+BEGIN_SRC makefile
EMACSLISP=/usr/share/emacs/site-lisp
ORG_VER_AVAILABLE=$(shell echo `ls -d ~/.emacs.d/elpa/org-???????? | cut -d '-' -f2`)
@@ -123,7 +123,7 @@ ORGDIR :=$(shell echo `pwd`)
*** Markup Samples
**** pods
-#+NAME: makefile_var_4
+#+NAME: make_set_var_4_markup_samples_pods
#+BEGIN_SRC makefile
SiSU_MARKUP_SAMPLES_FIND_PODS= \
find data/pod -maxdepth 2 -name pod.manifest | cut -f 1-3 -d / | sort
@@ -159,7 +159,7 @@ data/pod/viral_spiral.david_bollier
**** dir
-#+NAME: makefile_var_5
+#+NAME: make_set_var_5_markup_samples_search_dirs
#+BEGIN_SRC makefile
SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND = \
find data/sisudir/media/text -name *.ss[tm] | sort | xargs
@@ -195,20 +195,20 @@ data/sisudir/media/text/viral_spiral.david_bollier.sst
******* sample markup file list
-#+NAME: makefile_a_0
+#+NAME: make_find_markup_samples_0_pod_and_dir
#+BEGIN_SRC makefile
markup_samples:
find data/pod -name pod.manifest | cut -f 1-3 -d / | sort; \
find data/sisudir/media/text -name *.ss[tm] | sort
#+END_SRC
-#+NAME: makefile_a_1
+#+NAME: make_find_markup_samples_1_pod
#+BEGIN_SRC makefile
markup_pod_samples:
find data/pod -name pod.manifest | cut -f 1-3 -d / | sort
#+END_SRC
-#+NAME: makefile_a_2
+#+NAME: make_find_markup_samples_2_dir
#+BEGIN_SRC makefile
markup_dir_samples:
find data/sisudir/media/text -name *.ss[tm] | sort
@@ -237,13 +237,13 @@ markup_dir_samples:
****** all builds
******* default
-#+NAME: makefile_b_0
+#+NAME: make_dub_upgrade
#+BEGIN_SRC makefile
dub_upgrade:
$(DUB) upgrade
#+END_SRC
-#+NAME: makefile_b_1
+#+NAME: make_compile_0_compiler_default
#+BEGIN_SRC makefile
default: ldc
#+END_SRC
@@ -251,21 +251,21 @@ default: ldc
******* quick :quick:
******** default :default:
-#+NAME: makefile_b_2
+#+NAME: make_compile_1_compiler_all
#+BEGIN_SRC makefile
all: dmd ldc gdc
#+END_SRC
******** version :version:
-#+NAME: makefile_b_3
+#+NAME: make_compile_2_compiler_all_versioned
#+BEGIN_SRC makefile
all_ver: dmd_ver ldc_ver gdc_ver
#+END_SRC
******** debug :debug:
-#+NAME: makefile_b_4
+#+NAME: make_compile_3_compiler_all_debug
#+BEGIN_SRC makefile
all_debug: dmd_debug gdc_debug ldc_debug
#+END_SRC
@@ -276,14 +276,14 @@ meson using dub
- works & looks pretty clean
- but subprojects built externally & not suitable for debian packaging
-#+NAME: makefile_meson
+#+NAME: make_meson_build
#+BEGIN_SRC makefile
meson_clean_build_dir:
rm -r build; mkdir build
meson_build: meson_clean_build_dir
meson --buildtype=debugoptimized build
ninja -C build
- #notify-send -t 0 'D meson build ldc compiled test release executable ready' 'spine'
+ notify-send -t 0 'D meson build ldc compiled test release executable ready' 'spine'
meson_redo: meson_clean_build_dir meson_build
meson_project_build_clean: clean skel tangle dub_upgrade meson_build
meson: meson_clean_build_dir dub_upgrade meson_build
@@ -292,21 +292,21 @@ meson: meson_clean_build_dir dub_upgrade meson_build
******* clean & tangle :clean:tangle:
******** default :default:
-#+NAME: makefile_c_0
+#+NAME: make_clean_tangle_compile_0_all_clean
#+BEGIN_SRC makefile
all_clean: clean tangle dmd ldc gdc
#+END_SRC
******** version :version:
-#+NAME: makefile_c_1
+#+NAME: make_clean_tangle_compile_1_all_clean_versioned
#+BEGIN_SRC makefile
all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver
#+END_SRC
******** debug :debug:
-#+NAME: makefile_c_2
+#+NAME: make_clean_tangle_compile_2_all_clean_debug
#+BEGIN_SRC makefile
all_debug_ver: dmd_debug_ver gdc_debug_ver ldc_debug_ver
all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver
@@ -317,16 +317,16 @@ all_debug_clean_ver: clean tangle dmd_debug_ver gdc_debug_ver ldc_debug_ver
******* quick :quick:
******** default :default:
-#+NAME: makefile_dmd_0
+#+NAME: make_dub_compile_dmd_0_default
#+BEGIN_SRC makefile
dmd: dub_upgrade
$(DUB) --compiler=dmd --config=dmd --build=release-nobounds
- #notify-send -t 0 'D dmd compiled test release executable ready' 'spine-dmd'
+ notify-send -t 0 'D dmd compiled test release executable ready' 'spine-dmd'
#+END_SRC
******** debug :debug:
-#+NAME: makefile_dmd_1
+#+NAME: make_dub_compile_dmd_1_debug
#+BEGIN_SRC makefile
dmd_debug:
$(DUB) --compiler=dmd --config=dmd --build=debug
@@ -336,18 +336,18 @@ dmd_debug:
- assumes git tags with program version
-#+NAME: makefile_dmd_2
+#+NAME: make_dub_compile_dmd_2_versioned
#+BEGIN_SRC makefile
dmd_ver: dub_upgrade
$(DUB) --compiler=dmd --config=dmd-version
mv bin/spine-dmd-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd
- #notify-send -t 0 'D dmd compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd'
+ notify-send -t 0 'D dmd compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-dmd'
dmd_clean_ver: clean tangle dmd_ver
#+END_SRC
******* clean & tangle :clean:tangle:
-#+NAME: makefile_dmd_3
+#+NAME: make_dub_compile_dmd_3_release
#+BEGIN_SRC makefile
dmd_rel: expunge skel tangle
$(DUB) --compiler=dmd --config=spine-release
@@ -362,16 +362,16 @@ dmd_debug_tangle: tangle
******* quick :quick:
******** default :default:
-#+NAME: makefile_gdc_0
+#+NAME: make_dub_compile_gdc_0_default
#+BEGIN_SRC makefile
gdc: dub_upgrade
$(DUB) --compiler=gdc --config=gdc
- #notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc'
+ notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc'
#+END_SRC
******** debug :debug:
-#+NAME: makefile_gdc_1
+#+NAME: make_dub_compile_gdc_1_debug
#+BEGIN_SRC makefile
gdc_debug:
$(DUB) --compiler=gdc --config=gdc --build=debug
@@ -381,18 +381,18 @@ gdc_debug:
- assumes git tags with program version
-#+NAME: makefile_gdc_2
+#+NAME: make_dub_compile_gdc_2_versioned
#+BEGIN_SRC makefile
gdc_ver: dub_upgrade
$(DUB) --compiler=gdc --config=gdc-version
mv bin/spine-gdc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc
- #notify-send -t 0 'D gdc compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc'
+ notify-send -t 0 'D gdc compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-gdc'
gdc_clean_ver: clean tangle gdc_ver
#+END_SRC
******* clean & tangle :clean:tangle:
-#+NAME: makefile_gdc_3
+#+NAME: make_dub_compile_gdc_3_release
#+BEGIN_SRC makefile
gdc_rel: expunge skel tangle
$(DUB) --compiler=gdc --config=spine-release
@@ -407,16 +407,16 @@ gdc_debug_tangle: tangle
******* quick :quick:
******** default :default:
-#+NAME: makefile_ldc_0
+#+NAME: make_dub_compile_ldc_0_default
#+BEGIN_SRC makefile
ldc: dub_upgrade
$(DUB) --compiler=ldc2 --config=ldc --build=release
- #notify-send -t 0 'D ldc compiled test release executable ready' 'spine-ldc'
+ notify-send -t 0 'D ldc compiled test release executable ready' 'spine-ldc'
#+END_SRC
******** debug :debug:
-#+NAME: makefile_ldc_1
+#+NAME: make_dub_compile_ldc_1_debug
#+BEGIN_SRC makefile
ldc_debug:
$(DUB) --compiler=ldc2 --config=ldc --build=debug
@@ -426,18 +426,18 @@ ldc_debug:
- assumes git tags with program version
-#+NAME: makefile_ldc_2
+#+NAME: make_dub_compile_ldc_2_versioned
#+BEGIN_SRC makefile
ldc_ver: dub_upgrade
$(DUB) --compiler=ldc2 --config=ldc-version
mv bin/spine-ldc-ver bin-archive/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc
- #notify-send -t 0 'D ldc2 compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc'
+ notify-send -t 0 'D ldc2 compiled test release executable ready' 'spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)-ldc'
ldc_clean_ver: clean tangle ldc_ver
#+END_SRC
******* clean & tangle :clean:tangle:
-#+NAME: makefile_ldc_3
+#+NAME: make_dub_compile_ldc_3_release
#+BEGIN_SRC makefile
ldc_rel: expunge skel tangle
$(DUB) --compiler=ldc2 --config=spine-release
@@ -451,7 +451,7 @@ ldc_debug_tangle: tangle
***** generic
****** init clean distclean etc. :clean:
-#+NAME: makefile_d_0
+#+NAME: make_initialization_operations_0_parts
#+BEGIN_SRC makefile
reinit: clean skel tangle
skel:
@@ -509,7 +509,7 @@ distclean_and_init: expunge
****** version :version:
-#+NAME: makefile_d_1
+#+NAME: make_initialization_operations_1_git_version
#+BEGIN_SRC makefile
ver:
echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)
@@ -517,7 +517,7 @@ ver:
****** tangle build rebuild :clean:tangle:build:
-#+NAME: makefile_d_2
+#+NAME: make_initialization_operations_2_assemble
#+BEGIN_SRC makefile
clean_tangle_build: clean tangle build
tangle_build: tangle build
@@ -535,7 +535,7 @@ restart: clean tangle
**** pods
****** find files
-#+NAME: makefile_testrun_0
+#+NAME: make_project_testrun_0_find_pods
#+BEGIN_SRC makefile
find_pods:
$(SiSU_MARKUP_SAMPLES_FIND_PODS)
@@ -544,7 +544,7 @@ find_pods:
***** dmd
****** find files
-#+NAME: makefile_testrun_1
+#+NAME: make_project_testrun_1
#+BEGIN_SRC makefile
dmd_testrun_find:
./bin/spine-dmd -v --source --html --epub --sqlite-discrete \
@@ -576,7 +576,7 @@ dmd_testrun_find_pod_all:
****** path list
-#+NAME: makefile_testrun_2
+#+NAME: make_project_testrun_2
#+BEGIN_SRC makefile
dmd_testrun_paths_pod_source:
./bin/spine-dmd -v --source \
@@ -604,7 +604,7 @@ $(SiSU_MARKUP_SAMPLES_POD)
***** gdc
****** find files
-#+NAME: makefile_testrun_3
+#+NAME: make_project_testrun_3
#+BEGIN_SRC makefile
gdc_testrun_find:
./bin/spine-gdc -v --source --html --epub --sqlite-discrete \
@@ -636,7 +636,7 @@ gdc_testrun_find_pod_all:
****** path list
-#+NAME: makefile_testrun_4
+#+NAME: make_project_testrun_4
#+BEGIN_SRC makefile
gdc_testrun_paths:
./bin/spine-gdc -v --source --html --epub --sqlite-discrete \
@@ -669,7 +669,7 @@ $(SiSU_MARKUP_SAMPLES_POD)
***** ldc
****** find files
-#+NAME: makefile_testrun_5
+#+NAME: make_project_testrun_5
#+BEGIN_SRC makefile
ldc_testrun_find:
./bin/spine-ldc -v --source --html --epub --sqlite-discrete \
@@ -701,7 +701,7 @@ ldc_testrun_find_pod_all:
****** path list
-#+NAME: makefile_testrun_6
+#+NAME: make_project_testrun_6
#+BEGIN_SRC makefile
ldc_testrun_paths:
./bin/spine-ldc -v --source --html --epub --sqlite-discrete \
@@ -735,7 +735,7 @@ $(SiSU_MARKUP_SAMPLES_POD)
***** dmd
****** find files
-#+NAME: makefile_testrun_7
+#+NAME: make_project_testrun_7
#+BEGIN_SRC makefile
dmd_testrun_find_dir_source:
$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
@@ -762,7 +762,7 @@ dmd_testrun_find_dir_all:
****** file list
-#+NAME: makefile_testrun_8
+#+NAME: make_project_testrun_8
#+BEGIN_SRC makefile
dmd_testrun_filelist_dir_source:
./bin/spine-dmd -v --source \
@@ -790,7 +790,7 @@ $(SiSU_MARKUP_SAMPLES_DIR)
***** gdc
****** find files
-#+NAME: makefile_testrun_9
+#+NAME: make_project_testrun_9
#+BEGIN_SRC makefile
gdc_testrun_find_dir_source:
./bin/spine-gdc -v --source \
@@ -817,7 +817,7 @@ gdc_testrun_find_dir_all:
****** file list
-#+NAME: makefile_testrun_10
+#+NAME: make_project_testrun_10
#+BEGIN_SRC makefile
gdc_testrun_filelist_dir_source:
./bin/spine-gdc -v --source \
@@ -845,7 +845,7 @@ $(SiSU_MARKUP_SAMPLES_DIR)
***** ldc
****** find files
-#+NAME: makefile_testrun_11
+#+NAME: make_project_testrun_11
#+BEGIN_SRC makefile
ldc_testrun_find_dir_source:
$(SiSU_MARKUP_SAMPLES_DIR_FILES_FOUND) \
@@ -872,7 +872,7 @@ ldc_testrun_find_dir_all:
****** file list
-#+NAME: makefile_testrun_12
+#+NAME: make_project_testrun_12
#+BEGIN_SRC makefile
ldc_testrun_filelist_dir_source:
./bin/spine-ldc -v --source \
@@ -900,7 +900,7 @@ $(SiSU_MARKUP_SAMPLES_DIR)
*** org babel tangle batch process command :tangle:
**** tangle: org babel tangle *.org
-#+NAME: makefile_tangle_0
+#+NAME: make_tangle_0
#+BEGIN_SRC makefile
tangle: skel
for f in $(ORGFILELIST); do \
@@ -924,7 +924,7 @@ tangle: skel
**** tangle maker: org babel tangle maker.org, makefile new
-#+NAME: makefile_tangle_1
+#+NAME: make_tangle_1
#+BEGIN_SRC makefile
tangle_maker:
for f in $(ORGFILELIST); do \
@@ -946,7 +946,7 @@ tangle_maker:
(kill-buffer)) '($$ORGFILES)))" 2>&1
#+END_SRC
-#+NAME: makefile_nix_project_shell
+#+NAME: make_nix_project_shell
#+BEGIN_SRC makefile
nixsh_dmd_nixpkg:
ln -sf nixDevEnv/shells/shell-dmd-verNix.nix shell.nix; \
@@ -972,7 +972,7 @@ nixsh_ldc_user:
*** git snapshot
-#+NAME: makefile_git_snapshot
+#+NAME: make_git_snapshot
#+BEGIN_SRC makefile
gitsnapshot: distclean tangle
git commit -a
@@ -980,7 +980,7 @@ gitsnapshot: distclean tangle
** phony :phony:
-#+NAME: makefile_phony
+#+NAME: make_phony
#+BEGIN_SRC makefile
.PHONY : all build rebuild debug release \
distclean init \
@@ -1136,7 +1136,7 @@ time (dub --compiler=gdc --build=release)
#+BEGIN_SRC sh :NO-tangle ../dub.sdl
configuration "default" {
targetName "spine"
- #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine'"
+ postGenerateCommands "notify-send -t 0 'D executable ready' 'spine'"
}
#+END_SRC
@@ -1148,7 +1148,7 @@ time (dub --compiler=dmd -color --config=dmd --build=dmd-release)
#+BEGIN_SRC sh :NO-tangle ../dub.sdl
configuration "dmd" {
targetName "spine-dmd"
- #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-dmd'"
+ postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-dmd'"
}
buildType "dmd" {
dflags "-J=views" "-I=src/doc_reform"
@@ -1163,7 +1163,7 @@ configuration "dmd-version" {
dflags "-J=views" "-I=src/doc_reform"
buildOptions "verbose" "optimize"
targetName "spine-dmd-ver"
- #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-dmd-ver'"
+ postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-dmd-ver'"
}
#+END_SRC
@@ -1179,7 +1179,7 @@ time (dub --compiler=ldc2 -color --config=ldc --build=ldc-release)
#+BEGIN_SRC sh :NO-tangle ../dub.sdl
configuration "ldc" {
targetName "spine-ldc"
- #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-ldc'"
+ postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-ldc'"
}
buildType "ldc" {
dflags "-O2" "-J=views" "-I=src/doc_reform"
@@ -1199,7 +1199,7 @@ configuration "ldc-version" {
dflags "-O2" "-J=views" "-I=src/doc_reform"
buildOptions "verbose" "optimize" "inline" "releaseMode"
targetName "spine-ldc-ver"
- #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-ldc-ver'"
+ postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-ldc-ver'"
}
#+END_SRC
@@ -1211,7 +1211,7 @@ time (dub --compiler=gdc --config=gdc --build=gdc-release)
#+BEGIN_SRC sh :NO-tangle ../dub.sdl
configuration "gdc" {
targetName "spine-gdc"
- #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-gdc'"
+ postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-gdc'"
}
buildType "gdc" {
dflags "-O" "-J=views" "-I=src/doc_reform"
@@ -1229,7 +1229,7 @@ configuration "gdc-version" {
lflags "-lz"
buildOptions "verbose" "optimize" "inline" "releaseMode"
targetName "spine-gdc-ver"
- #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-gdc-ver'"
+ postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-gdc-ver'"
}
#+END_SRC
@@ -1244,7 +1244,7 @@ configuration "build" {
targetName "bin/spine"
dflags "-J=views" "-I=src/doc_reform"
buildOptions "verbose" "releaseMode" "optimize" "inline"
- #postGenerateCommands "notify-send -t 0 'D release executable ready' 'spine'"
+ postGenerateCommands "notify-send -t 0 'D release executable ready' 'spine'"
}
#+END_SRC