diff options
author | Ralph Amissah <ralph@amissah.com> | 2018-07-02 15:14:32 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:15 -0400 |
commit | ffc3747ff10f260a7ff3705681fdbaefc055e120 (patch) | |
tree | 64a98332894efdea4abead09512a48fd1af3c6f1 /org | |
parent | obj.metainfo node type info, ancestors (diff) |
cosmetic
Diffstat (limited to 'org')
-rw-r--r-- | org/meta_abstraction.org | 138 | ||||
-rw-r--r-- | org/meta_conf_make_meta.org | 21 |
2 files changed, 45 insertions, 114 deletions
diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index feaf5ea..384c8db 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -1759,7 +1759,7 @@ the_document_body_section=the_document_body_section[1..$]; #+END_SRC *** ↻ *LOOPs* _post main-loop loops_ :post: -**** 1. ↻ _Loop backmatter:_ loop up to lev4, extract html_segnames, set pointers +**** 1. ↻ _Loop as required_ (e.g. backmatter): loop up to lev4, extract html_segnames, set pointers this extra loop is used/needed to determine pre and (in particular) next segment for html, that is then used in a subsequent loop @@ -1986,7 +1986,7 @@ if (the_document_body_section.length > 1) { } #+END_SRC -***** ↻ Loop section: endnotes +***** ↻ Loop section: endnotes [en] #+name: abs_post #+BEGIN_SRC d @@ -2003,7 +2003,7 @@ if (the_endnotes_section.length > 1) { } #+END_SRC -***** ↻ Loop section: glossary +***** ↻ Loop section: glossary [gl] #+name: abs_post #+BEGIN_SRC d @@ -2020,7 +2020,7 @@ if (the_glossary_section.length > 1) { } #+END_SRC -***** ↻ Loop section: bibliography +***** ↻ Loop section: bibliography [bb] #+name: abs_post #+BEGIN_SRC d @@ -2037,7 +2037,7 @@ if (the_bibliography_section.length > 1) { } #+END_SRC -***** ↻ Loop section: book index +***** ↻ Loop section: book index [bi] #+name: abs_post #+BEGIN_SRC d @@ -2060,7 +2060,7 @@ if (the_bookindex_section["scroll"].length > 1) { } #+END_SRC -***** ↻ Loop section: blurb +***** ↻ Loop section: blurb [bl] #+name: abs_post #+BEGIN_SRC d @@ -3234,51 +3234,21 @@ final string biblio_tag_map_(A)(A abr) { } string name; switch (abr) { - case "au": - name="author_raw"; - break; - case "ed": - name="editor_raw"; - break; - case "ti": - name="fulltitle"; - break; - case "lng": - name="language"; - break; - case "jo": - name="journal"; - break; - case "vol": - name="volume"; - break; - case "edn": - name="edition"; - break; - case "yr": - name="year"; - break; - case "pl": - name="place"; - break; - case "pb": - name="publisher"; - break; - case "pub": - name="publisher"; - break; - case "pg": - name="pages"; - break; - case "pgs": - name="pages"; - break; - case "sn": - name="short_name"; - break; - default: - name=abr; - break; + case "au": name="author_raw"; break; + case "ed": name="editor_raw"; break; + case "ti": name="fulltitle"; break; + case "lng": name="language"; break; + case "jo": name="journal"; break; + case "vol": name="volume"; break; + case "edn": name="edition"; break; + case "yr": name="year"; break; + case "pl": name="place"; break; + case "pb": name="publisher"; break; + case "pub": name="publisher"; break; + case "pg": name="pages"; break; + case "pgs": name="pages"; break; + case "sn": name="short_name"; break; + default: name=abr; break; } return name; } @@ -6710,7 +6680,6 @@ struct NotesSection { || (contents_am[cntr].metainfo.is_a == "block") || (contents_am[cntr].metainfo.is_a == "verse")); assert(cntr >= previous_count); - previous_count=cntr; assert( (contents_am[cntr].text).match( rgx.inline_notes_delimiter_al_regular_number_note) @@ -6718,6 +6687,7 @@ struct NotesSection { } body { mixin InternalMarkup; + previous_count=cntr; static auto mkup = InlineMarkup(); static auto munge = ObjInlineMarkupMunge(); foreach( @@ -7592,34 +7562,22 @@ struct DocObj_MetaInfo_ { // metainfo int o_n_book_index = 0; int o_n_blurb = 0; string object_number_substantive() const @property { - return (o_n_substantive==0) - ? "" - : o_n_substantive.to!string; + return (o_n_substantive==0) ? "" : o_n_substantive.to!string; } string object_number_non_substantive() const @property { - return (o_n_non_substantive==0) - ? "" - : o_n_non_substantive.to!string; + return (o_n_non_substantive==0) ? "" : o_n_non_substantive.to!string; } string object_number_glossary() const @property { - return (o_n_glossary==0) - ? "" - : o_n_glossary.to!string; + return (o_n_glossary==0) ? "" : o_n_glossary.to!string; } string object_number_bibliography() const @property { - return (o_n_bibliography==0) - ? "" - : o_n_bibliography.to!string; + return (o_n_bibliography==0) ? "" : o_n_bibliography.to!string; } string object_number_book_index() const @property { - return (o_n_book_index==0) - ? "" - : o_n_book_index.to!string; + return (o_n_book_index==0) ? "" : o_n_book_index.to!string; } string object_number_blurb() const @property { - return (o_n_blurb==0) - ? "" - : o_n_blurb.to!string; + return (o_n_blurb==0) ? "" : o_n_blurb.to!string; } string object_number_off = ""; bool visible_object_number = false; @@ -7629,9 +7587,7 @@ struct DocObj_MetaInfo_ { // metainfo string[string][string] node; int ocn = 0; string object_number() const @property { - return (ocn==0) - ? "" - : ocn.to!string; + return (ocn==0) ? "" : ocn.to!string; } int o_n_type = 0; int heading_lev_markup = 9; @@ -7639,33 +7595,15 @@ struct DocObj_MetaInfo_ { // metainfo string marked_up_level() const @property { string _out; switch (heading_lev_markup) { - case 0: - _out = "A"; - break; - case 1: - _out = "B"; - break; - case 2: - _out = "C"; - break; - case 3: - _out = "D"; - break; - case 4: - _out = "1"; - break; - case 5: - _out = "2"; - break; - case 6: - _out = "3"; - break; - case 7: - _out = "4"; - break; - default: - _out = ""; - break; + case 0: _out = "A"; break; + case 1: _out = "B"; break; + case 2: _out = "C"; break; + case 3: _out = "D"; break; + case 4: _out = "1"; break; + case 5: _out = "2"; break; + case 6: _out = "3"; break; + case 7: _out = "4"; break; + default: _out = ""; break; } return _out; } diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index 7c27496..cb8200e 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -569,26 +569,19 @@ if ("make" in _json.object) { switch (_json.object["make"]["auto_num_top_at_level"].str) { case "A": break; - case "B": - _struct_composite.make_str.auto_num_top_lv = 1; + case "B": _struct_composite.make_str.auto_num_top_lv = 1; break; - case "C": - _struct_composite.make_str.auto_num_top_lv = 2; + case "C": _struct_composite.make_str.auto_num_top_lv = 2; break; - case "D": - _struct_composite.make_str.auto_num_top_lv = 3; + case "D": _struct_composite.make_str.auto_num_top_lv = 3; break; - case "1": - _struct_composite.make_str.auto_num_top_lv = 4; + case "1": _struct_composite.make_str.auto_num_top_lv = 4; break; - case "2": - _struct_composite.make_str.auto_num_top_lv = 5; + case "2": _struct_composite.make_str.auto_num_top_lv = 5; break; - case "3": - _struct_composite.make_str.auto_num_top_lv = 6; + case "3": _struct_composite.make_str.auto_num_top_lv = 6; break; - case "4": - _struct_composite.make_str.auto_num_top_lv = 7; + case "4": _struct_composite.make_str.auto_num_top_lv = 7; break; default: break; |