diff options
-rw-r--r-- | org/meta_abstraction.org | 26 | ||||
-rw-r--r-- | src/doc_reform/meta/metadoc_from_src.d | 26 |
2 files changed, 40 insertions, 12 deletions
diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index 8a49598..39bc9eb 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -925,7 +925,7 @@ if there is a blurb section you need to: #+BEGIN_SRC d } else if (obj_type_status["poem"] == TriState.on) { /+ within block object: poem +/ - _poem_block_(line, an_object, obj_type_status, cntr, object_number_poem, conf_make_meta); + _poem_block_(line, an_object, obj_type_status, cntr, object_number_poem, conf_make_meta, segment_anchor_tag_that_object_belongs_to); continue; #+END_SRC @@ -1124,6 +1124,7 @@ _block_flag_line_empty_( obj_type_status, object_number_poem, conf_make_meta, + segment_anchor_tag_that_object_belongs_to, ); #+END_SRC @@ -1282,6 +1283,7 @@ if ((obj_type_status["heading"] == State.on) comp_obj_para.metainfo.is_of_type = "para"; comp_obj_para.metainfo.is_a = "para"; comp_obj_para.text = an_object["substantive"].to!string.strip; + comp_obj_para.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO comp_obj_para.metainfo.ocn = obj_cite_digits.digit; comp_obj_para.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; comp_obj_para.metainfo.o_n_book_index = obj_cite_digits.bkidx; @@ -3708,13 +3710,14 @@ why extra object stuff only in poem/verse? #+name: abs_functions_block_poem #+BEGIN_SRC d -void _poem_block_(L,O,T,C,N,CMM)( +void _poem_block_(L,O,T,C,N,CMM,Ts)( L line, return ref O an_object, return ref T obj_type_status, return ref C cntr, N object_number_poem, CMM conf_make_meta, + Ts segment_anchor_tag_that_object_belongs_to, ) { debug(asserts) { static assert(is(typeof(line) == char[])); @@ -3765,6 +3768,7 @@ void _poem_block_(L,O,T,C,N,CMM)( comp_obj_block.metainfo.is_a = "verse"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -3822,6 +3826,7 @@ void _poem_block_(L,O,T,C,N,CMM)( comp_obj_block.metainfo.is_a = "verse"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -3864,6 +3869,7 @@ void _poem_block_(L,O,T,C,N,CMM)( comp_obj_block.metainfo.is_a = "verse"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -3921,6 +3927,7 @@ void _poem_block_(L,O,T,C,N,CMM)( comp_obj_block.metainfo.is_a = "verse"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -4059,6 +4066,7 @@ void _table_closed_make_special_notation_table_(N,CMM)( an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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 = table_instructions(comp_obj_block, an_object["table_head"]); @@ -4076,7 +4084,7 @@ void _table_closed_make_special_notation_table_(N,CMM)( #+name: abs_functions_block_line_status_empty #+BEGIN_SRC d -void _block_flag_line_empty_(B,N,CMM)( +void _block_flag_line_empty_(B,N,CMM,Ts)( B bookindex_extract_hash, char[] line, return ref string[string] an_object, @@ -4088,6 +4096,7 @@ void _block_flag_line_empty_(B,N,CMM)( return ref int[string] obj_type_status, string[string] object_number_poem, CMM conf_make_meta, + Ts segment_anchor_tag_that_object_belongs_to, ) { assert( line.empty, @@ -4136,6 +4145,7 @@ void _block_flag_line_empty_(B,N,CMM)( comp_obj_block.metainfo.is_a = "quote"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -4185,6 +4195,7 @@ void _block_flag_line_empty_(B,N,CMM)( comp_obj_block.metainfo.is_a = "group"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -4233,6 +4244,7 @@ void _block_flag_line_empty_(B,N,CMM)( comp_obj_block.metainfo.is_a = "block"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -4321,9 +4333,10 @@ void _block_flag_line_empty_(B,N,CMM)( comp_obj_code.metainfo.is_of_type = "block"; comp_obj_code.metainfo.is_a = "code"; comp_obj_code.metainfo.ocn = obj_cite_digits.on; - comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - 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_code.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_code.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; + 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.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]; @@ -4367,6 +4380,7 @@ void _block_flag_line_empty_(B,N,CMM)( comp_obj_block = comp_obj_block.init; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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 = table_instructions(comp_obj_block, an_object["table_head"]); diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d index a78a91a..7643a42 100644 --- a/src/doc_reform/meta/metadoc_from_src.d +++ b/src/doc_reform/meta/metadoc_from_src.d @@ -674,7 +674,7 @@ template DocReformDocAbstraction() { continue; } else if (obj_type_status["poem"] == TriState.on) { /+ within block object: poem +/ - _poem_block_(line, an_object, obj_type_status, cntr, object_number_poem, conf_make_meta); + _poem_block_(line, an_object, obj_type_status, cntr, object_number_poem, conf_make_meta, segment_anchor_tag_that_object_belongs_to); continue; } else if (obj_type_status["table"] == TriState.on) { /+ within block object: table +/ @@ -813,6 +813,7 @@ template DocReformDocAbstraction() { obj_type_status, object_number_poem, conf_make_meta, + segment_anchor_tag_that_object_belongs_to, ); } else { /+ line.empty, post contents, empty variables: +/ @@ -954,6 +955,7 @@ template DocReformDocAbstraction() { comp_obj_para.metainfo.is_of_type = "para"; comp_obj_para.metainfo.is_a = "para"; comp_obj_para.text = an_object["substantive"].to!string.strip; + comp_obj_para.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO comp_obj_para.metainfo.ocn = obj_cite_digits.digit; comp_obj_para.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; comp_obj_para.metainfo.o_n_book_index = obj_cite_digits.bkidx; @@ -2714,13 +2716,14 @@ template DocReformDocAbstraction() { } } } - void _poem_block_(L,O,T,C,N,CMM)( + void _poem_block_(L,O,T,C,N,CMM,Ts)( L line, return ref O an_object, return ref T obj_type_status, return ref C cntr, N object_number_poem, CMM conf_make_meta, + Ts segment_anchor_tag_that_object_belongs_to, ) { debug(asserts) { static assert(is(typeof(line) == char[])); @@ -2771,6 +2774,7 @@ template DocReformDocAbstraction() { comp_obj_block.metainfo.is_a = "verse"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -2828,6 +2832,7 @@ template DocReformDocAbstraction() { comp_obj_block.metainfo.is_a = "verse"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -2870,6 +2875,7 @@ template DocReformDocAbstraction() { comp_obj_block.metainfo.is_a = "verse"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -2927,6 +2933,7 @@ template DocReformDocAbstraction() { comp_obj_block.metainfo.is_a = "verse"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -3222,6 +3229,7 @@ template DocReformDocAbstraction() { an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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 = table_instructions(comp_obj_block, an_object["table_head"]); @@ -3231,7 +3239,7 @@ template DocReformDocAbstraction() { processing.remove("verse"); ++cntr; } - void _block_flag_line_empty_(B,N,CMM)( + void _block_flag_line_empty_(B,N,CMM,Ts)( B bookindex_extract_hash, char[] line, return ref string[string] an_object, @@ -3243,6 +3251,7 @@ template DocReformDocAbstraction() { return ref int[string] obj_type_status, string[string] object_number_poem, CMM conf_make_meta, + Ts segment_anchor_tag_that_object_belongs_to, ) { assert( line.empty, @@ -3285,6 +3294,7 @@ template DocReformDocAbstraction() { comp_obj_block.metainfo.is_a = "quote"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -3328,6 +3338,7 @@ template DocReformDocAbstraction() { comp_obj_block.metainfo.is_a = "group"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -3370,6 +3381,7 @@ template DocReformDocAbstraction() { comp_obj_block.metainfo.is_a = "block"; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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.text = an_object["substantive"]; @@ -3446,9 +3458,10 @@ template DocReformDocAbstraction() { comp_obj_code.metainfo.is_of_type = "block"; comp_obj_code.metainfo.is_a = "code"; comp_obj_code.metainfo.ocn = obj_cite_digits.on; - comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; - 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_code.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_code.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; + 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.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]; @@ -3486,6 +3499,7 @@ template DocReformDocAbstraction() { comp_obj_block = comp_obj_block.init; comp_obj_block.metainfo.ocn = obj_cite_digits.on; comp_obj_block.metainfo.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; + comp_obj_block.tags.segment_anchor_tag = segment_anchor_tag_that_object_belongs_to.to!string; // TODO 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 = table_instructions(comp_obj_block, an_object["table_head"]); |