diff options
Diffstat (limited to 'org')
-rw-r--r-- | org/compile_time_info.org | 2 | ||||
-rw-r--r-- | org/default_misc.org | 8 | ||||
-rw-r--r-- | org/default_paths.org | 24 | ||||
-rw-r--r-- | org/default_regex.org | 48 | ||||
-rw-r--r-- | org/default_shared.org | 4 | ||||
-rw-r--r-- | org/in_source_files.org | 22 | ||||
-rw-r--r-- | org/meta_conf_make_meta.org | 4 | ||||
-rw-r--r-- | org/meta_debugs.org | 38 | ||||
-rw-r--r-- | org/metaverse.org | 2180 | ||||
-rw-r--r-- | org/out_harvest_metadata.org | 4 | ||||
-rw-r--r-- | org/out_latex.org | 12 | ||||
-rw-r--r-- | org/out_metadata.org | 2 | ||||
-rw-r--r-- | org/out_odt.org | 22 | ||||
-rw-r--r-- | org/out_src_pod.org | 6 | ||||
-rw-r--r-- | org/out_xmls.org | 26 | ||||
-rw-r--r-- | org/out_xmls_css.org | 2 | ||||
-rw-r--r-- | org/out_zip.org | 2 | ||||
-rw-r--r-- | org/output_hub.org | 30 | ||||
-rw-r--r-- | org/output_show.org | 4 | ||||
-rw-r--r-- | org/spine.org | 2 | ||||
-rw-r--r-- | org/spine_build_scaffold.org | 102 |
21 files changed, 1272 insertions, 1272 deletions
diff --git a/org/compile_time_info.org b/org/compile_time_info.org index 53470db..e09409e 100644 --- a/org/compile_time_info.org +++ b/org/compile_time_info.org @@ -22,7 +22,7 @@ e.g. do on linux bsd osx not windows: version(Windows) {} else { ... } -** _module template_ :module:compile_time_info: +** _module template_ :module:compile_time_info: #+BEGIN_SRC d :tangle "../src/doc_reform/conf/compile_time_info.d" /++ diff --git a/org/default_misc.org b/org/default_misc.org index 4e0f78e..615f480 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -31,7 +31,7 @@ module doc_reform.meta.defaults; <<defaults_template_language_codes>> #+END_SRC -** template: flags regex initialize :regex_flags: +** template: flags regex initialize :regex_flags: *** node #+NAME: meta_defaults_template_node @@ -119,7 +119,7 @@ template spineHarvest() { } #+END_SRC -** template: bibliography :biblio: +** template: bibliography :biblio: #+NAME: meta_defaults_template_biblio #+BEGIN_SRC d @@ -201,7 +201,7 @@ import #+END_SRC ** defaults shared by meta & output (generic) -*** template: internal markup :markup: +*** template: internal markup :markup: 21 special characters used: @@ -351,7 +351,7 @@ template spineLanguageCodes() { #+END_SRC * __END__ -** +set colors for terminal+ (unused) :colors:terminal: +** +set colors for terminal+ (unused) :colors:terminal: #+NAME: meta_ansi_colors #+BEGIN_SRC d diff --git a/org/default_paths.org b/org/default_paths.org index 6db48af..f0881da 100644 --- a/org/default_paths.org +++ b/org/default_paths.org @@ -16,7 +16,7 @@ [[./spine.org][spine]] [[./][org/]] * 0. source paths -** _module template_ :module:paths_source: +** _module template_ :module:paths_source: #+BEGIN_SRC d :tangle "../src/doc_reform/io_in/paths_source.d" /++ @@ -41,7 +41,7 @@ import <<template_paths_pods>> #+END_SRC -** _manifest_ :manifest: +** _manifest_ :manifest: #+NAME: template_paths_src #+BEGIN_SRC d @@ -100,7 +100,7 @@ template PodManifest() { } #+END_SRC -** _path matters (pod, manifest and source files)_ :manifest: +** _path matters (pod, manifest and source files)_ :manifest: tree pod pod @@ -464,7 +464,7 @@ template PathMatters() { } #+END_SRC -** _config_ (dr_document_make & config_local_site) :config: +** _config_ (dr_document_make & config_local_site) :config: #+NAME: template_paths_src #+BEGIN_SRC d @@ -591,7 +591,7 @@ template configFilePaths() { } #+END_SRC -** _pod_ (including generated bundled source) :pod: +** _pod_ (including generated bundled source) :pod: *** notes tree pod @@ -958,7 +958,7 @@ template spinePathsPods() { #+END_SRC * 1. output paths -** _module template_ :module:paths_output: +** _module template_ :module:paths_output: #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/paths_output.d" /++ @@ -980,7 +980,7 @@ import doc_reform.meta.rgx; <<template_paths_sqlite>> #+END_SRC -** shared out path, base directory :out: +** shared out path, base directory :out: - output paths for content, minimize chance of filename/directory collisions in particular pods can contain markup that is published under a name that may be used elsewere @@ -1089,7 +1089,7 @@ template spineOutPathsFnPd() { } #+END_SRC -** _html_ :html: +** _html_ :html: *** relative #+NAME: template_paths_html @@ -1330,7 +1330,7 @@ template spineUrlsHTML() { } #+END_SRC -** _epub_ :epub: +** _epub_ :epub: #+NAME: template_paths_epub #+BEGIN_SRC d @@ -1441,7 +1441,7 @@ template spinePathsEPUB() { } #+END_SRC -** _odt_ :odt: +** _odt_ :odt: #+NAME: template_paths_odf #+BEGIN_SRC d @@ -1511,7 +1511,7 @@ template spinePathsODT() { } #+END_SRC -** _latex_ :latex: +** _latex_ :latex: #+NAME: template_paths_latex #+BEGIN_SRC d @@ -1550,7 +1550,7 @@ template spinePathsLaTeX() { } #+END_SRC -** _sqlite_ :sqlite: +** _sqlite_ :sqlite: *** discrete #+NAME: template_paths_sqlite diff --git a/org/default_regex.org b/org/default_regex.org index 6e6ee00..d9020d4 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -28,7 +28,7 @@ http://dlang.org/phobos/std_regex.html 【】〖〗┥┝┤├¤░┘┙┚┼┿╂┊┏┚┆■☼ #+END_SRC -** _module template_ :module: +** _module template_ :module: #+BEGIN_SRC d :tangle "../src/doc_reform/meta/rgx.d" /++ @@ -43,7 +43,7 @@ static template spineRgxIn() { } #+END_SRC -** misc :misc: +** misc :misc: #+NAME: meta_rgx #+BEGIN_SRC d @@ -82,7 +82,7 @@ static numeric = ctRegex!(`[ 0-9,.-]+`); static numeric_col = ctRegex!(`^[ 0-9,.%$£₤Є€€¥()-]+$`); #+END_SRC -** comments :comment: +** comments :comment: #+NAME: meta_rgx #+BEGIN_SRC d @@ -98,7 +98,7 @@ static comment = ctRegex!(`^%+ `); #+END_SRC ** native headers -*** native header :native:header: +*** native header :native:header: #+NAME: meta_rgx #+BEGIN_SRC d @@ -110,7 +110,7 @@ static yaml_header_meta_title = ctRegex!(`^\s*title\s*:\ static yaml_config = ctRegex!(`^[a-z]+\s*:\s*(?:"?\w|$)`, "m"); #+END_SRC -** heading & paragraph operators :paragraph:operator: +** heading & paragraph operators :paragraph:operator: #+NAME: meta_rgx #+BEGIN_SRC d @@ -139,7 +139,7 @@ static para_inline_link_anchor = ctRegex!(`\*[~](?P<ancho #+END_SRC ** blocked markup -*** blocked markup curly & tic :block: +*** blocked markup curly & tic :block: #+NAME: meta_rgx #+BEGIN_SRC d @@ -148,7 +148,7 @@ static block_open = ctRegex!("^((code(?:[.][ static block_poem_open = ctRegex!("^((poem(?:[(][ a-zA-Z0-9;:,]*[)])?[{][ ]*$)|`{3} poem(?:[(][ a-zA-Z0-9;:,]*[)])?)"); #+END_SRC -*** blocked markup tic :block:tic: +*** blocked markup tic :block:tic: #+NAME: meta_rgx #+BEGIN_SRC d @@ -162,7 +162,7 @@ static block_tic_table_open = ctRegex!("^`{3} table(?: static block_tic_close = ctRegex!("^(`{3})$","m"); #+END_SRC -*** blocked markup curly :block:curly: +*** blocked markup curly :block:curly: #+NAME: meta_rgx #+BEGIN_SRC d @@ -182,7 +182,7 @@ static block_curly_table_close = ctRegex!(`^([}]table)`); static block_curly_table_special_markup = ctRegex!(`^[{]table[(](?P<attrib>(?:(h);)?(?P<columns>(?:[, ]+[0-9]+)+))[)][}]`, "mg"); #+END_SRC -*** block sub-matches :block: +*** block sub-matches :block: **** code #+NAME: meta_rgx @@ -203,7 +203,7 @@ static table_col_separator = ctRegex!(`┊`); static table_col_separator_nl = ctRegex!(`[┊]$`, "mg"); #+END_SRC -** inline markup :inline:footnote: +** inline markup :inline:footnote: *** footnotes & endnotes #+NAME: meta_rgx @@ -222,7 +222,7 @@ static inline_note_square_delimiters = ctRegex!(`(~\[\s*)(.+?)( static note_ref = ctRegex!(`^\S+?noteref_(?P<ref>[0-9]+)`, "mg"); // {^{73.}^}#noteref_73 #+END_SRC -*** links/ urls :inline:footnote: +*** links/ urls :inline:footnote: #+NAME: meta_rgx #+BEGIN_SRC d @@ -235,7 +235,7 @@ static smid_inline_link_endnote_url_helper_punctuated = ctRegex!(`\{~\^\s+(?P<co static smid_inline_link_endnote_url_helper = ctRegex!(`\{~\^\s+(?P<content>.+?)\}(?P<link>(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+)`, "mg"); #+END_SRC -*** images :images: +*** images :images: #+NAME: meta_rgx #+BEGIN_SRC d @@ -248,7 +248,7 @@ static smid_a_image = ctRegex!(`(?P<pre>(?:^| static smid_image_delimit = ctRegex!(`(?P<pre>^|[ ]|[^\S]?)\{\s*(?P<text>.+?)\s*\}(?:image)(?=[;:!,?.]?([ )\]]|$))`, "mg"); #+END_SRC -*** inline markup book index :inline:bookindex: +*** inline markup book index :inline:bookindex: #+NAME: meta_rgx #+BEGIN_SRC d @@ -274,7 +274,7 @@ static auto_heading_numbering_off_lv3 = ctRegex!(`^3~\S*?-\s`, "m static auto_heading_numbering_off_lv4 = ctRegex!(`^4~\S*?-\s`, "m"); #+END_SRC -** no object_number object :ocn:off:object: +** no object_number object :ocn:off:object: #+NAME: meta_rgx #+BEGIN_SRC d @@ -285,7 +285,7 @@ static object_number_off_all = ctRegex!(`[~-]#$`, "m"); static repeated_character_line_separator = ctRegex!(`^(?:[ ]*(?:(?:[.][ ]*){4,}|(?:[-][ ]*|[~][ ]*|[*][ ]*|[$][ ]*|[#][ ]*|[\\][ ]*|[/][ ]*){2,})\s*?)+$`); #+END_SRC -** no object_number block :ocn:off:block: +** no object_number block :ocn:off:block: #+NAME: meta_rgx #+BEGIN_SRC d @@ -296,7 +296,7 @@ static object_number_off_block_close = ctRegex!(`^--\+#$`); static object_number_block_marks = ctRegex!(`^--[+~-]#$`); #+END_SRC -** ignore outside code blocks :block:code: +** ignore outside code blocks :block:code: #+NAME: meta_rgx #+BEGIN_SRC d @@ -304,7 +304,7 @@ static object_number_block_marks = ctRegex!(`^--[+~-]#$`); static skip_from_regular_parse = ctRegex!(`^(--[+~-]#|-[\\]{2}-|=[.\\]{2}=)$`); #+END_SRC -** line & page breaks :break: +** line & page breaks :break: #+NAME: meta_rgx #+BEGIN_SRC d @@ -312,7 +312,7 @@ static skip_from_regular_parse = ctRegex!(`^(--[+~-]#|-[\\]{2}-|=[.\\]{2}=)$` static break_string = ctRegex!(`』`); #+END_SRC -** biblio tags :biblio:tags: +** biblio tags :biblio:tags: #+NAME: meta_rgx #+BEGIN_SRC d @@ -321,7 +321,7 @@ static biblio_tags = ctRegex!(`^(is|au|author static biblio_abbreviations = ctRegex!(`^(au|ed|ti|lng|jo|vol|edn|yr|pl|pb|pub|pg|pgs|sn)$`); #+END_SRC -** bookindex split :bookindex:split: +** bookindex split :bookindex:split: #+NAME: meta_rgx #+BEGIN_SRC d @@ -342,7 +342,7 @@ static topic_register_sub_terms_split = ctRegex!(`\s*\|\s*`); static topic_register_multiple_sub_terms_split = ctRegex!(`␣([^|␣]+(?:\|[^|␣]+)+)`); #+END_SRC -** language codes :language:codes: +** language codes :language:codes: #+NAME: meta_rgx #+BEGIN_SRC d @@ -358,7 +358,7 @@ http://dlang.org/phobos/std_regex.html - Regex!char (wchar/dchar) that contains a pattern in the form of compiled bytecode. - StaticRegex!char (wchar/dchar) that contains a pattern in the form of compiled native machine code. -** _module template_ :module:output: +** _module template_ :module:output: #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/rgx.d" /++ @@ -413,7 +413,7 @@ static spaces_line_start = ctRegex!(`^(?P<opening_s static nbsp_char = ctRegex!(`░`, "mg"); #+END_SRC -** filename (& path) (including insert file) :insert:file:path:filename: +** filename (& path) (including insert file) :insert:file:path:filename: #+NAME: prgmkup_rgx #+BEGIN_SRC d @@ -445,7 +445,7 @@ static br_line = ctRegex!(`┘`, "mg"); static br_nl = ctRegex!(`┙`, "mg"); #+END_SRC -*** inline (internal program) markup footnotes endnotes :inline:footnote: +*** inline (internal program) markup footnotes endnotes :inline:footnote: #+NAME: prgmkup_rgx #+BEGIN_SRC d @@ -493,7 +493,7 @@ static mark_internal_site_lnk = ctRegex!(`¤`, "mg"); static quotation_mark_sql_insert_delimiter = ctRegex!("[']", "mg"); #+END_SRC -*** inline markup font face mod :inline:font:face: +*** inline markup font face mod :inline:font:face: #+NAME: prgmkup_rgx #+BEGIN_SRC d diff --git a/org/default_shared.org b/org/default_shared.org index daff731..c776725 100644 --- a/org/default_shared.org +++ b/org/default_shared.org @@ -16,7 +16,7 @@ [[./spine.org][spine]] [[./][org/]] * shared -** _module template_ :module:shared: +** _module template_ :module:shared: #+BEGIN_SRC d :tangle "../src/doc_reform/share/defaults.d" /++ @@ -26,7 +26,7 @@ module doc_reform.share.defaults; <<shared_messages>> #+END_SRC -** template: messages :messages: +** template: messages :messages: #+NAME: shared_messages #+BEGIN_SRC d diff --git a/org/in_source_files.org b/org/in_source_files.org index 84702fe..a4e2812 100644 --- a/org/in_source_files.org +++ b/org/in_source_files.org @@ -33,7 +33,7 @@ doc_reform.io_in.paths_source #+END_SRC * A. get _config file_ (read in) -** _module template_ :module:config_files: +** _module template_ :module:config_files: #+BEGIN_SRC d :tangle "../src/doc_reform/io_in/read_config_files.d" /++ @@ -50,7 +50,7 @@ import <<meta_config_file_hub>> #+END_SRC -*** 0. read config files (config_local_site & dr_document_make) (yaml) +*** 0. read config files (config local site & dr document make) (yaml) **** 1. site configuration #+NAME: meta_config_file_hub @@ -221,7 +221,7 @@ static template readConfigDoc() { } #+END_SRC -*** YAML config (config_local_site & dr_document_make) :file:config:hub: +*** YAML config (config local site & dr document make) :file:config:hub: #+NAME: meta_config_file_hub #+BEGIN_SRC d @@ -377,8 +377,8 @@ template spineRawMarkupContent() { } #+END_SRC -** get markup source, read file :source:markup: -*** read file, source string [#A] :string: +** get markup source, read file :source:markup: +*** read file, source string [#A] :string: #+NAME: meta_markup_source_raw_read_file_source_string #+BEGIN_SRC d @@ -407,7 +407,7 @@ template spineRawMarkupContent() { } #+END_SRC -*** document header & content, array.length == 2 [#A] :array: +*** document header & content, array.length == 2 [#A] :array: here you split document header and body, an array.length == 2 split is on first match of level A~ (which is required) @@ -429,7 +429,7 @@ split is on first match of level A~ (which is required) } #+END_SRC -*** source line array :array: +*** source line array :array: #+NAME: meta_markup_source_raw_source_line_array #+BEGIN_SRC d @@ -440,7 +440,7 @@ split is on first match of level A~ (which is required) } #+END_SRC -*** source content raw line array :array: +*** source content raw line array :array: - used for regular .sst files; master .ssm files and; .ssi inserts - regex is passed for relevant enforce match @@ -505,10 +505,10 @@ split is on first match of level A~ (which is required) } #+END_SRC -** get markup source, master file & inserts :masterfile:inserts: +** get markup source, master file & inserts :masterfile:inserts: [[./spine.org][spine]] [[./][org/]] -*** scan inserts (sub-document) source :scan_insert_src: +*** scan inserts (sub-document) source :scan_insert_src: **** scan subdoc source #+NAME: meta_inserts_scan @@ -592,7 +592,7 @@ ContentsAndImages t = tuple( return t; #+END_SRC -*** scan document source :scan_src: +*** scan document source :scan_src: **** scan doc source #+NAME: meta_master_doc_scan_for_insert_filenames diff --git a/org/meta_conf_make_meta.org b/org/meta_conf_make_meta.org index de0080b..61e702f 100644 --- a/org/meta_conf_make_meta.org +++ b/org/meta_conf_make_meta.org @@ -386,7 +386,7 @@ JSONValue config_jsonstr = `{ }`; #+END_SRC -* 1. YAML to spineStruct :module:conf_make_meta:yaml: +* 1. YAML to spineStruct :module:conf_make_meta:yaml: ** _module template_ #+BEGIN_SRC d :tangle "../src/doc_reform/meta/conf_make_meta_yaml.d" @@ -1407,7 +1407,7 @@ if ("rights" in _yaml } #+END_SRC -* 1. JSON to spineStruct :module:conf_make_meta:json: +* 1. JSON to spineStruct :module:conf_make_meta:json: ** _module template_ #+BEGIN_SRC d :tangle "../src/doc_reform/meta/conf_make_meta_json.d" diff --git a/org/meta_debugs.org b/org/meta_debugs.org index b94d5b2..6dc2ecf 100644 --- a/org/meta_debugs.org +++ b/org/meta_debugs.org @@ -67,7 +67,7 @@ import std.conv : to; #+END_SRC -** initialize :report: +** initialize :report: #+NAME: initialize #+BEGIN_SRC d @@ -76,7 +76,7 @@ auto markup = InlineMarkup(); string key; #+END_SRC -** (parent) :parent: +** (parent) :parent: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -104,7 +104,7 @@ debug(parent) { } #+END_SRC -** (dumpdoc) :objects: +** (dumpdoc) :objects: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -117,7 +117,7 @@ debug(dumpdoc) { } #+END_SRC -** (segnames) :objects: +** (segnames) :objects: #+NAME: meta_output_debugs_checkdoc #+BEGIN_SRC d @@ -164,7 +164,7 @@ debug(checkdoc) { } #+END_SRC -*** out endnotes :endnotes: +*** out endnotes :endnotes: #+NAME: meta_output_debugs_checkdoc #+BEGIN_SRC d @@ -186,7 +186,7 @@ debug(checkdoc) { } #+END_SRC -*** out bookindex :bookindex: +*** out bookindex :bookindex: #+NAME: meta_output_debugs_checkdoc #+BEGIN_SRC d @@ -210,7 +210,7 @@ debug(checkdoc) { #+END_SRC ** sections -*** heading_section :heading: +*** heading_section :heading: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -260,7 +260,7 @@ debug(section_toc) { } #+END_SRC -*** body_section :body: +*** body_section :body: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -279,7 +279,7 @@ debug(section_body) { } #+END_SRC -*** dom structure :body: +*** dom structure :body: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -356,7 +356,7 @@ debug(decendants) { } #+END_SRC -*** endnotes_section (seg & scroll) :endnotes: +*** endnotes_section (seg & scroll) :endnotes: **** endnotes #+NAME: meta_output_debugs @@ -377,7 +377,7 @@ debug(section_endnotes_seg) { } #+END_SRC -*** glossary_section :glossary: +*** glossary_section :glossary: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -396,7 +396,7 @@ debug(section_glossary) { } #+END_SRC -*** bibliography_section (seg & scroll) :bibliography: +*** bibliography_section (seg & scroll) :bibliography: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -415,7 +415,7 @@ debug(section_bibliography) { } #+END_SRC -*** bookindex_section (seg & scroll) :bookindex: +*** bookindex_section (seg & scroll) :bookindex: **** bookindex #+NAME: meta_output_debugs @@ -446,7 +446,7 @@ debug(section_bookindex_scroll) { } #+END_SRC -*** section_blurb :blurb: +*** section_blurb :blurb: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -465,7 +465,7 @@ debug(blurb_section) { } #+END_SRC -** (objects) :objects: +** (objects) :objects: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -488,7 +488,7 @@ debug(objects) { } #+END_SRC -** (headermakejson) :json:header: +** (headermakejson) :json:header: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -520,7 +520,7 @@ debug(headermakejson) { } #+END_SRC -** (headermetadatajson) :json:header: +** (headermetadatajson) :json:header: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -674,7 +674,7 @@ debug(anchor) { } #+END_SRC -** (headings) :headings: +** (headings) :headings: #+NAME: meta_output_debugs #+BEGIN_SRC d @@ -695,7 +695,7 @@ debug(heading) { // heading } #+END_SRC -** (summary) [+1] :summary: +** (summary) [+1] :summary: #+NAME: meta_output_debugs #+BEGIN_SRC d diff --git a/org/metaverse.org b/org/metaverse.org index 683ed86..697dd5e 100644 --- a/org/metaverse.org +++ b/org/metaverse.org @@ -19,7 +19,7 @@ * 1. Document Abstraction Process markup document, create document abstraction. -** _module template_ :module:metadoc_from_src: +** _module template_ :module:metadoc_from_src: #+BEGIN_SRC d :tangle "../src/doc_reform/meta/metadoc_from_src.d" /++ @@ -139,8 +139,8 @@ template docAbstraction() { <<template_doc_sect_keys_seq>> #+END_SRC -** 1. _pre loop processing_ :pre: -*** imports :imports: +** 1. _pre loop process ing_ :pre: +*** imports :imports: [[./meta_defaults.org][meta_defaults]] #+NAME: abs_top_imports @@ -158,7 +158,7 @@ import doc_reform.meta.rgx; #+END_SRC -*** mixins :mixins: +*** mixins :mixins: #+NAME: abs_top_mixins #+BEGIN_SRC d @@ -167,7 +167,7 @@ mixin InternalMarkup; mixin spineRgxIn; #+END_SRC -*** initialize :initialize: +*** initialize :initialize: **** declare enum #+NAME: abs_top_init_struct @@ -266,10 +266,10 @@ JSONValue[] bib_arr_json; int bib_entry; /+ counters +/ int cntr, previous_count, previous_length; -bool reset_note_numbers=true; +bool reset_note_numbers = true; int[string] line_occur; -int html_segnames_ptr=0; -int html_segnames_ptr_cntr=0; +int html_segnames_ptr = 0; +int html_segnames_ptr_cntr = 0; int verse_line, heading_ptr; /+ paragraph attributes +/ int[string] indent; @@ -582,8 +582,8 @@ scope(exit) { destroy(an_object); destroy(processing); destroy(biblio_arr_json); - previous_length=0; - reset_note_numbers=true; + previous_length = 0; + reset_note_numbers = true; } #+END_SRC @@ -744,8 +744,8 @@ debug (substitutions) { } #+END_SRC -** 2. ↻ *LOOP* _loop: process document body_ [+6] :loop: -*** Loop scope :scope: +** 2. ↻ *LOOP* _loop: process document body_ [+6] :loop: +*** Loop scope :scope: #+NAME: abs_in_loop_body_00 #+BEGIN_SRC d @@ -773,7 +773,7 @@ debug(srclines) { } #+END_SRC -*** check whether object_number is on or turned off :ocn: +*** check whether object number is on or turned off :ocn: #+NAME: abs_in_loop_body_00 #+BEGIN_SRC d @@ -783,7 +783,7 @@ if (!line.empty) { #+END_SRC *** separate _code blocks_ from _other markup text_ [+5] [#A] -**** _code blocks_ :block:code: +**** _code blocks_ :block:code: #+NAME: abs_in_loop_body_00_code_block #+BEGIN_SRC d @@ -800,8 +800,8 @@ continue; line = line.inline_markup_faces; // by text line (rather than by text object), linebreaks in para problematic #+END_SRC -***** in section (biblio, glossary, blurb) +(block group)+ [+1] :block:active: -****** in section: biblio :biblio: +***** in section (biblio, glossary, blurb) +(block group)+ [+1] :block:active: +****** in section: biblio :biblio: #+NAME: abs_in_loop_body_non_code_obj #+BEGIN_SRC d @@ -823,7 +823,7 @@ if (line.matchFirst(rgx.heading_biblio) continue; #+END_SRC -****** in section: glossary :glossary: +****** in section: glossary :glossary: if there is a glossary section you need to: - extract it @@ -848,14 +848,14 @@ if there is a glossary section you need to: } pith["section"] = eN.sect.glossary; if (opt_action.backmatter && opt_action.section_glossary) { - indent=[ + indent = [ "hang_position" : 0, "base_position" : 0, ]; bullet = false; pith["txt_is"] = eN.txt_is.para; line_occur["para"] = eN.bi.off; - an_object_key="glossary_nugget"; + an_object_key = "glossary_nugget"; if (line.matchFirst(rgx.heading_glossary)) { { comp_obj_heading_ = comp_obj_heading_.init; @@ -931,7 +931,7 @@ if there is a glossary section you need to: continue; #+END_SRC -****** in section: blurb :blurb: +****** in section: blurb :blurb: if there is a blurb section you need to: - extract it @@ -955,7 +955,7 @@ if there is a blurb section you need to: writeln(line); } if (opt_action.backmatter && opt_action.section_blurb) { - indent=[ + indent = [ "hang_position" : 0, "base_position" : 0, ]; @@ -975,7 +975,7 @@ if there is a blurb section you need to: debug(paraindenthang) { writeln(line); } - indent=[ + indent = [ "hang_position" : (m["hang"]).to!int, "base_position" : (m["indent"]).to!int, ]; @@ -983,7 +983,7 @@ if there is a blurb section you need to: debug(parabulletindent) { writeln(line); } - indent=[ + indent = [ "hang_position" : (m["indent"]).to!int, "base_position" : (m["indent"]).to!int, ]; @@ -991,7 +991,7 @@ if there is a blurb section you need to: } pith["txt_is"] = eN.txt_is.para; line_occur["para"] = eN.bi.off; - an_object_key="blurb_nugget"; + an_object_key = "blurb_nugget"; if (line.matchFirst(rgx.heading_blurb)) { { comp_obj_heading_ = comp_obj_heading_.init; @@ -1091,14 +1091,14 @@ if there is a blurb section you need to: continue; #+END_SRC -***** in blocks [+1] :block:active: +***** in blocks [+1] :block:active: #+NAME: abs_in_loop_body_non_code_obj #+BEGIN_SRC d } else if (pith["block_state"] == eN.blk_state.on) { #+END_SRC -****** in block: quote :quote: +****** in block: quote :quote: #+NAME: abs_in_loop_body_non_code_obj #+BEGIN_SRC d @@ -1110,7 +1110,7 @@ if there is a blurb section you need to: continue; #+END_SRC -****** in block: group :group: +****** in block: group :group: #+NAME: abs_in_loop_body_non_code_obj #+BEGIN_SRC d @@ -1123,7 +1123,7 @@ if there is a blurb section you need to: continue; #+END_SRC -****** in block: block :block: +****** in block: block :block: #+NAME: abs_in_loop_body_non_code_obj #+BEGIN_SRC d @@ -1139,7 +1139,7 @@ if there is a blurb section you need to: continue; #+END_SRC -****** in block: poem :poem: +****** in block: poem :poem: #+NAME: abs_in_loop_body_non_code_obj #+BEGIN_SRC d @@ -1148,7 +1148,7 @@ if there is a blurb section you need to: continue; #+END_SRC -****** in block: table :table: +****** in block: table :table: #+NAME: abs_in_loop_body_non_code_obj #+BEGIN_SRC d @@ -1184,7 +1184,7 @@ continue; #+END_SRC ****** line not empty [+2] -******* asserts :assert: +******* asserts :assert: #+NAME: abs_in_loop_body_not_block_obj #+BEGIN_SRC d @@ -1212,7 +1212,7 @@ if (pith["block_state"] == eN.blk_state.closing) { } #+END_SRC -******* book index :bookindex: +******* book index :bookindex: #+NAME: abs_in_loop_body_not_block_obj #+BEGIN_SRC d @@ -1229,11 +1229,11 @@ if (line.matchFirst(rgx.book_index_item) } else { /+ not book_index +/ #+END_SRC -******** matched: comment :comment:match: +******** matched: comment :comment:match: #+NAME: abs_in_loop_body_not_block_obj #+BEGIN_SRC d - an_object_key="body_nugget"; + an_object_key = "body_nugget"; if (auto m = line.matchFirst(rgx.comment)) { /+ matched comment +/ debug(comment) { writeln(line); @@ -1251,7 +1251,7 @@ if (line.matchFirst(rgx.book_index_item) ++cntr; #+END_SRC -******** flag !set & line !exist: heading or para :heading:paragraph: +******** flag !set & line !exist: heading or para :heading:paragraph: #+NAME: abs_in_loop_body_not_block_obj #+BEGIN_SRC d @@ -1288,7 +1288,7 @@ if (line.matchFirst(rgx.book_index_item) conf_make_meta, ); } else if (line_occur["para"] == eN.bi.off) { /+ para match +/ - an_object_key="body_nugget"; + an_object_key = "body_nugget"; line = line ._doc_header_and_make_substitutions_(conf_make_meta) ._doc_header_and_make_substitutions_fontface_(conf_make_meta); @@ -1296,7 +1296,7 @@ if (line.matchFirst(rgx.book_index_item) } #+END_SRC -******** line exist: heading :heading: +******** line exist: heading :heading: #+NAME: abs_in_loop_body_not_block_obj #+BEGIN_SRC d @@ -1308,7 +1308,7 @@ if (line.matchFirst(rgx.book_index_item) ++line_occur["heading"]; #+END_SRC -******** line exist: para :para: +******** line exist: para :para: #+NAME: abs_in_loop_body_not_block_obj #+BEGIN_SRC d @@ -1345,7 +1345,7 @@ an_object = line.flow_block_flag_line_empty_( #+END_SRC ****** line empty [+1] -******* assert line empty :assert: +******* assert line empty :assert: #+NAME: abs_in_loop_body_not_block_obj_line_empty #+BEGIN_SRC d @@ -1360,7 +1360,7 @@ assert( ); #+END_SRC -******* heading object :heading:object: +******* heading object :heading:object: #+NAME: abs_in_loop_body_not_block_obj_line_empty #+BEGIN_SRC d @@ -1376,7 +1376,7 @@ if (pith["txt_is"] == eN.txt_is.heading ? ocn_emit(eN.ocn.reset) : ocn_emit(pith["ocn"]); an_object["is"] = "heading"; - an_object_key="body_nugget"; + an_object_key = "body_nugget"; TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_object_and_anchor_tags_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta, ((_new_doc) ? Yes._new_doc : No._new_doc)); an_object["substantive"] = substantive_object_and_anchor_tags_tuple[sObj.content]; @@ -1494,7 +1494,7 @@ if (pith["txt_is"] == eN.txt_is.heading ++cntr; #+END_SRC -******* paragraph object :paragraph:object: +******* paragraph object :paragraph:object: #+NAME: abs_in_loop_body_not_block_obj_line_empty #+BEGIN_SRC d @@ -1527,31 +1527,31 @@ if (pith["txt_is"] == eN.txt_is.heading = 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_para = comp_obj_para.init; - comp_obj_para.metainfo.is_of_part = "body"; - comp_obj_para.metainfo.is_of_section = "body"; - 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.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; - comp_obj_para.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"]; - comp_obj_para.metainfo.ocn = obj_cite_digits.object_number; - comp_obj_para.metainfo.identifier = obj_cite_digits.identifier; - comp_obj_para.metainfo.object_number_off = (obj_cite_digits.off==0) ? true : false; // TODO - comp_obj_para.metainfo.o_n_book_index = obj_cite_digits.bkidx; - comp_obj_para.metainfo.object_number_type = obj_cite_digits.type; - comp_obj_para.attrib.indent_hang = indent["hang_position"]; - comp_obj_para.attrib.indent_base = indent["base_position"]; - comp_obj_para.attrib.bullet = bullet; - comp_obj_para.tags.anchor_tags = [anchor_tag]; - comp_obj_para.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; - comp_obj_para.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; - comp_obj_para.has.inline_links = substantive_obj_misc_tuple[sObj.links]; - comp_obj_para.has.image_without_dimensions = substantive_obj_misc_tuple[sObj.image_no_dimensions]; - the_document_body_section ~= comp_obj_para; - tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); + comp_obj_para = comp_obj_para.init; + comp_obj_para.metainfo.is_of_part = "body"; + comp_obj_para.metainfo.is_of_section = "body"; + 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.html_segment_anchor_tag_is = tag_in_seg["seg_lv4"]; + comp_obj_para.tags.epub_segment_anchor_tag_is = tag_in_seg["seg_lv1_to_4"]; + comp_obj_para.metainfo.ocn = obj_cite_digits.object_number; + comp_obj_para.metainfo.identifier = obj_cite_digits.identifier; + comp_obj_para.metainfo.object_number_off = (obj_cite_digits.off == 0) ? true : false; // TODO + comp_obj_para.metainfo.o_n_book_index = obj_cite_digits.bkidx; + comp_obj_para.metainfo.object_number_type = obj_cite_digits.type; + comp_obj_para.attrib.indent_hang = indent["hang_position"]; + comp_obj_para.attrib.indent_base = indent["base_position"]; + comp_obj_para.attrib.bullet = bullet; + comp_obj_para.tags.anchor_tags = [anchor_tag]; + comp_obj_para.has.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg]; + comp_obj_para.has.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star]; + comp_obj_para.has.inline_links = substantive_obj_misc_tuple[sObj.links]; + comp_obj_para.has.image_without_dimensions = substantive_obj_misc_tuple[sObj.image_no_dimensions]; + the_document_body_section ~= comp_obj_para; + tag_assoc = an_object.inline_para_link_anchor(tag_in_seg, tag_assoc); flow_common_reset_(line_occur, an_object, pith); - indent=[ + indent = [ "hang_position" : 0, "base_position" : 0, ]; @@ -1563,7 +1563,7 @@ if (pith["txt_is"] == eN.txt_is.heading } #+END_SRC -*** regular _text objects_ identified :text:paragraph: +*** regular _text objects_ identified :text:paragraph: #+NAME: abs_in_loop_body_01 #+BEGIN_SRC d @@ -1599,7 +1599,7 @@ if (the_document_body_section.length > 0) { if ((the_document_body_section[$-1].text).match( rgx.inline_notes_al_all_note )) { - previous_count=(the_document_body_section.length -1).to!int; + previous_count = (the_document_body_section.length -1).to!int; note_section.gather_notes_for_endnote_section( the_document_body_section, tag_in_seg, @@ -1612,7 +1612,7 @@ if (the_document_body_section.length > 0) { } #+END_SRC -** 3. _post main-loop processing_ :post: +** 3. _post main-loop processing_ :post: *** misc /+ @@ -1625,7 +1625,7 @@ if (the_document_body_section.length > 0) { +/ *** tie up preparation of document sections -**** endnotes section (scroll & seg) :endnotes: +**** endnotes section (scroll & seg) :endnotes: #+NAME: abs_post #+BEGIN_SRC d @@ -1645,27 +1645,27 @@ debug(endnotes) { } #+END_SRC -**** no glossary section? :glossary: +**** no glossary section? :glossary: #+NAME: abs_post #+BEGIN_SRC d if (an_object["glossary_nugget"].length == 0) { - 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 is no Glossary section"; - comp_obj_heading_.metainfo.ocn = 0; - comp_obj_heading_.metainfo.identifier = ""; - comp_obj_heading_.metainfo.dummy_heading = true; - comp_obj_heading_.metainfo.object_number_off = true; - comp_obj_heading_.metainfo.object_number_type = 0; - comp_obj_heading_.metainfo.heading_lev_markup = 1; - comp_obj_heading_.metainfo.heading_lev_collapsed = 1; - comp_obj_heading_.metainfo.parent_ocn = 1; - comp_obj_heading_.metainfo.parent_lev_markup = 0; - the_glossary_section ~= comp_obj_heading_; + 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 is no Glossary section"; + comp_obj_heading_.metainfo.ocn = 0; + comp_obj_heading_.metainfo.identifier = ""; + comp_obj_heading_.metainfo.dummy_heading = true; + comp_obj_heading_.metainfo.object_number_off = true; + comp_obj_heading_.metainfo.object_number_type = 0; + comp_obj_heading_.metainfo.heading_lev_markup = 1; + comp_obj_heading_.metainfo.heading_lev_collapsed = 1; + comp_obj_heading_.metainfo.parent_ocn = 1; + comp_obj_heading_.metainfo.parent_lev_markup = 0; + the_glossary_section ~= comp_obj_heading_; } debug(glossary) { foreach (gloss; the_glossary_section) { @@ -1674,7 +1674,7 @@ debug(glossary) { } #+END_SRC -**** bibliography section (objects) :bibliography: +**** bibliography section (objects) :bibliography: #+NAME: abs_post #+BEGIN_SRC d @@ -1755,40 +1755,40 @@ if (biblio_ordered.length > 0) { ((entry["place"].str.empty) ? "" : ", " ~ entry["place"].str), ((entry["url"].str.empty) ? "" : ", [" ~ entry["url"].str ~ "]"), ); - comp_obj_para = comp_obj_para.init; - comp_obj_para.metainfo.is_of_part = "backmatter"; - comp_obj_para.metainfo.is_of_section = "bibliography"; - comp_obj_para.metainfo.is_of_type = "para"; - comp_obj_para.metainfo.is_a = "bibliography"; - comp_obj_para.text = out_.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.attrib.indent_hang = 0; - comp_obj_para.attrib.indent_base = 1; - comp_obj_para.attrib.bullet = bullet; - comp_obj_para.tags.anchor_tags = [anchor_tag]; - the_bibliography_section ~= comp_obj_para; + comp_obj_para = comp_obj_para.init; + comp_obj_para.metainfo.is_of_part = "backmatter"; + comp_obj_para.metainfo.is_of_section = "bibliography"; + comp_obj_para.metainfo.is_of_type = "para"; + comp_obj_para.metainfo.is_a = "bibliography"; + comp_obj_para.text = out_.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.attrib.indent_hang = 0; + comp_obj_para.attrib.indent_base = 1; + comp_obj_para.attrib.bullet = bullet; + comp_obj_para.tags.anchor_tags = [anchor_tag]; + the_bibliography_section ~= comp_obj_para; } } } 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 is no Bibliography"; - comp_obj_heading_.metainfo.ocn = 0; - comp_obj_heading_.metainfo.identifier = ""; - comp_obj_heading_.metainfo.dummy_heading = true; - comp_obj_heading_.metainfo.object_number_off = true; - comp_obj_heading_.metainfo.object_number_type = 0; - comp_obj_heading_.metainfo.heading_lev_markup = 1; - comp_obj_heading_.metainfo.heading_lev_collapsed = 1; - comp_obj_heading_.metainfo.parent_ocn = 1; - comp_obj_heading_.metainfo.parent_lev_markup = 0; - the_bibliography_section ~= comp_obj_heading_; + 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 is no Bibliography"; + comp_obj_heading_.metainfo.ocn = 0; + comp_obj_heading_.metainfo.identifier = ""; + comp_obj_heading_.metainfo.dummy_heading = true; + comp_obj_heading_.metainfo.object_number_off = true; + comp_obj_heading_.metainfo.object_number_type = 0; + comp_obj_heading_.metainfo.heading_lev_markup = 1; + comp_obj_heading_.metainfo.heading_lev_collapsed = 1; + comp_obj_heading_.metainfo.parent_ocn = 1; + comp_obj_heading_.metainfo.parent_lev_markup = 0; + the_bibliography_section ~= comp_obj_heading_; } #+END_SRC @@ -1835,7 +1835,7 @@ JSONValue biblio_entry_tags_jsonstr = `{ }`; // is: book, article, magazine, newspaper, blog, other #+END_SRC -**** bookindex section (scroll & seg) :book:index: +**** bookindex section (scroll & seg) :book:index: #+NAME: abs_post #+BEGIN_SRC d @@ -1856,29 +1856,29 @@ debug(bookindex) { } #+END_SRC -**** no blurb section? :blurb: +**** no blurb section? :blurb: #+NAME: abs_post #+BEGIN_SRC d if (an_object["blurb_nugget"].length == 0) { - 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 is no Blurb section"; - comp_obj_heading_.metainfo.ocn = 0; - comp_obj_heading_.metainfo.identifier = ""; - comp_obj_para.metainfo.object_number_off = true; - comp_obj_para.metainfo.object_number_type = 0; - comp_obj_heading_.tags.segment_anchor_tag_epub = ""; - comp_obj_heading_.tags.anchor_tag_html = ""; - comp_obj_heading_.tags.in_segment_html = ""; - 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_blurb_section ~= comp_obj_heading_; + 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 is no Blurb section"; + comp_obj_heading_.metainfo.ocn = 0; + comp_obj_heading_.metainfo.identifier = ""; + comp_obj_para.metainfo.object_number_off = true; + comp_obj_para.metainfo.object_number_type = 0; + comp_obj_heading_.tags.segment_anchor_tag_epub = ""; + comp_obj_heading_.tags.anchor_tag_html = ""; + comp_obj_heading_.tags.in_segment_html = ""; + 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_blurb_section ~= comp_obj_heading_; } debug(blurb) { foreach (blurb; the_blurb_section) { @@ -1887,26 +1887,26 @@ debug(blurb) { } #+END_SRC -**** toc backmatter, table of contents backmatter (scroll & seg) :contents: +**** toc backmatter, table of contents backmatter (scroll & seg) :contents: #+NAME: abs_post #+BEGIN_SRC d -indent=[ +indent = [ "hang_position" : 1, "base_position" : 1, ]; -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.attrib.indent_hang = indent["hang_position"]; -comp_obj_toc.attrib.indent_base = indent["base_position"]; -comp_obj_toc.attrib.bullet = false; +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.attrib.indent_hang = indent["hang_position"]; +comp_obj_toc.attrib.indent_base = indent["base_position"]; +comp_obj_toc.attrib.bullet = false; if (the_endnotes_section.length > 1) { toc_txt_ = format("%s%s%s%s#%s%s", mkup.lnk_o, @@ -1917,9 +1917,9 @@ if (the_endnotes_section.length > 1) { mkup.url_c, ); toc_txt_= toc_txt_.links_and_images; - 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.text = toc_txt_.to!string.strip; + comp_obj_toc.has.inline_links = true; + the_table_of_contents_section ~= comp_obj_toc; } if (the_glossary_section.length > 1) { toc_txt_ = format("%s%s%s%s#%s%s", @@ -1931,9 +1931,9 @@ if (the_glossary_section.length > 1) { mkup.url_c, ); toc_txt_= toc_txt_.links_and_images; - 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.text = toc_txt_.to!string.strip; + comp_obj_toc.has.inline_links = true; + the_table_of_contents_section ~= comp_obj_toc; } if (the_bibliography_section.length > 1){ toc_txt_ = format("%s%s%s%s#%s%s", @@ -1945,9 +1945,9 @@ if (the_bibliography_section.length > 1){ mkup.url_c, ); toc_txt_= toc_txt_.links_and_images; - 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.text = toc_txt_.to!string.strip; + comp_obj_toc.has.inline_links = true; + the_table_of_contents_section ~= comp_obj_toc; } if (the_bookindex_section.length > 1) { toc_txt_ = format("%s%s%s%s#%s%s", @@ -1959,9 +1959,9 @@ if (the_bookindex_section.length > 1) { mkup.url_c, ); toc_txt_= toc_txt_.links_and_images; - 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.text = toc_txt_.to!string.strip; + comp_obj_toc.has.inline_links = true; + the_table_of_contents_section ~= comp_obj_toc; } if (the_blurb_section.length > 1) { toc_txt_ = format("%s%s%s%s#%s%s", @@ -1973,9 +1973,9 @@ if (the_blurb_section.length > 1) { mkup.url_c, ); toc_txt_= toc_txt_.links_and_images; - comp_obj_toc.has.inline_links = true; - comp_obj_toc.text = toc_txt_.to!string.strip; - the_table_of_contents_section ~= comp_obj_toc; + comp_obj_toc.has.inline_links = true; + comp_obj_toc.text = toc_txt_.to!string.strip; + the_table_of_contents_section ~= comp_obj_toc; } debug(toc) { writefln( @@ -1993,11 +1993,11 @@ debug(toc) { #+NAME: abs_post #+BEGIN_SRC d the_document_head_section ~= the_document_body_section[0]; -the_document_body_section=the_document_body_section[1..$]; +the_document_body_section = the_document_body_section[1..$]; #+END_SRC -*** ↻ *LOOPs* _post main-loop loops_ :loop:post: -**** 1. ↻ _Loop as required_ (e.g. backmatter): loop up to lev4, extract html_segnames, set pointers +*** ↻ *LOOPs* _post main-loop loops_ :loop:post: +**** 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 @@ -2502,7 +2502,7 @@ string[] segnames_0_to_4; writeln("links to stow: ", (obj.text.match(rgx.inline_link_stow_uri))); } int _n_matches = (obj.text.match(rgx.inline_link_stow_uri)).count.to!int; - for(int i=0; i < _n_matches; ++i) { + for(int i = 0; i < _n_matches; ++i) { if (obj.text.match(rgx.inline_link_stow_uri)) { obj.stow.link ~= obj.text.matchFirst(rgx.inline_link_stow_uri)[2]; obj.text = obj.text.replaceFirst( @@ -2635,19 +2635,19 @@ auto image_list = (_images.sort()).uniq; #+BEGIN_SRC d /+ optional only one 1~ level +/ if (the_endnotes_section.length > 1) { - dom_structure_markedup_tags_status_buffer = dom_structure_markedup_tags_status.dup; - dom_structure_collapsed_tags_status_buffer = dom_structure_collapsed_tags_status.dup; - dom_structure_markedup_tags_status = dom_structure_markedup_tags_status_buffer.dup; - dom_structure_collapsed_tags_status = dom_structure_collapsed_tags_status_buffer.dup; + dom_structure_markedup_tags_status_buffer = dom_structure_markedup_tags_status.dup; + dom_structure_collapsed_tags_status_buffer = dom_structure_collapsed_tags_status.dup; + dom_structure_markedup_tags_status = dom_structure_markedup_tags_status_buffer.dup; + dom_structure_collapsed_tags_status = dom_structure_collapsed_tags_status_buffer.dup; foreach (ref obj; the_endnotes_section) { if (obj.metainfo.is_a == "heading") { debug(dom) { writeln(obj.text); } if (obj.metainfo.heading_lev_markup == 1) { - obj_cite_digits = ocn_emit(eN.ocn.on); - obj.metainfo.ocn = obj_cite_digits.object_number; - obj.metainfo.identifier = obj_cite_digits.identifier; + obj_cite_digits = ocn_emit(eN.ocn.on); + obj.metainfo.ocn = obj_cite_digits.object_number; + obj.metainfo.identifier = obj_cite_digits.identifier; } if (obj.metainfo.heading_lev_markup <= 4) { segnames_0_to_4 ~= obj.tags.segment_anchor_tag_epub; @@ -2686,9 +2686,9 @@ if (the_glossary_section.length > 1) { writeln(obj.text); } if (obj.metainfo.heading_lev_markup == 1) { - obj_cite_digits = ocn_emit(eN.ocn.on); - obj.metainfo.ocn = obj_cite_digits.object_number; - obj.metainfo.identifier = obj_cite_digits.identifier; + obj_cite_digits = ocn_emit(eN.ocn.on); + obj.metainfo.ocn = obj_cite_digits.object_number; + obj.metainfo.identifier = obj_cite_digits.identifier; } if (obj.metainfo.heading_lev_markup <= 4) { segnames_0_to_4 ~= obj.tags.segment_anchor_tag_epub; @@ -2731,9 +2731,9 @@ if (the_bibliography_section.length > 1) { writeln(obj.text); } if (obj.metainfo.heading_lev_markup == 1) { - obj_cite_digits = ocn_emit(eN.ocn.on); - obj.metainfo.ocn = obj_cite_digits.object_number; - obj.metainfo.identifier = obj_cite_digits.identifier; + obj_cite_digits = ocn_emit(eN.ocn.on); + obj.metainfo.ocn = obj_cite_digits.object_number; + obj.metainfo.identifier = obj_cite_digits.identifier; } if (obj.metainfo.heading_lev_markup <= 4) { segnames_0_to_4 ~= obj.tags.segment_anchor_tag_epub; @@ -2753,9 +2753,9 @@ if (the_bibliography_section.length > 1) { } obj = obj.obj_heading_ancestors(lv_ancestors_txt); } else if (obj.metainfo.is_a == "bibliography") { - obj_cite_digits = ocn_emit(eN.ocn.on); - obj.metainfo.ocn = obj_cite_digits.object_number; - obj.metainfo.identifier = obj_cite_digits.identifier; + obj_cite_digits = ocn_emit(eN.ocn.on); + obj.metainfo.ocn = obj_cite_digits.object_number; + obj.metainfo.identifier = obj_cite_digits.identifier; } obj = _links(obj); } @@ -2783,9 +2783,9 @@ if (the_bookindex_section.length > 1) { / segnames_0_to_4 ~= obj.tags.segment_anchor_tag_epub; } if (obj.metainfo.heading_lev_markup == 1) { - obj_cite_digits = ocn_emit(eN.ocn.on); - obj.metainfo.ocn = obj_cite_digits.object_number; - obj.metainfo.identifier = obj_cite_digits.identifier; + obj_cite_digits = ocn_emit(eN.ocn.on); + obj.metainfo.ocn = obj_cite_digits.object_number; + obj.metainfo.identifier = obj_cite_digits.identifier; } if (obj.metainfo.heading_lev_markup <= 4) { if (obj.metainfo.heading_lev_markup == 4) { @@ -2804,11 +2804,11 @@ if (the_bookindex_section.length > 1) { / } obj = obj.obj_heading_ancestors(lv_ancestors_txt); } else if (obj.metainfo.is_a == "bookindex") { - obj_cite_digits = ocn_emit(eN.ocn.bkidx); - obj.metainfo.ocn = obj_cite_digits.object_number; - obj.metainfo.identifier = obj_cite_digits.identifier; - obj.metainfo.o_n_book_index = obj_cite_digits.bkidx; - obj.metainfo.object_number_type = OCNtype.bkidx; + obj_cite_digits = ocn_emit(eN.ocn.bkidx); + obj.metainfo.ocn = obj_cite_digits.object_number; + obj.metainfo.identifier = obj_cite_digits.identifier; + obj.metainfo.o_n_book_index = obj_cite_digits.bkidx; + obj.metainfo.object_number_type = OCNtype.bkidx; } obj = _links(obj); } @@ -2831,9 +2831,9 @@ if (the_blurb_section.length > 1) { writeln(obj.text); } if (obj.metainfo.heading_lev_markup == 1) { - obj_cite_digits = ocn_emit(eN.ocn.on); - obj.metainfo.ocn = obj_cite_digits.object_number; - obj.metainfo.identifier = obj_cite_digits.identifier; + obj_cite_digits = ocn_emit(eN.ocn.on); + obj.metainfo.ocn = obj_cite_digits.object_number; + obj.metainfo.identifier = obj_cite_digits.identifier; } if (obj.metainfo.heading_lev_markup <= 4) { segnames_0_to_4 ~= obj.tags.segment_anchor_tag_epub; @@ -2853,9 +2853,9 @@ if (the_blurb_section.length > 1) { } obj = obj.obj_heading_ancestors(lv_ancestors_txt); } else if (obj.metainfo.is_a == "blurb") { - obj_cite_digits = ocn_emit(eN.ocn.off); - obj.metainfo.object_number_off = obj_cite_digits.off; - obj.metainfo.object_number_type = OCNtype.non; + obj_cite_digits = ocn_emit(eN.ocn.off); + obj.metainfo.object_number_off = obj_cite_digits.off; + obj.metainfo.object_number_type = OCNtype.non; } obj = _links(obj); } @@ -2970,35 +2970,35 @@ if (the_document_body_section.length > 1) { - obj.metainfo.dom_structure_markedup_tags_status = dom_structure_markedup_tags_status; - obj.metainfo.dom_structure_collapsed_tags_status = dom_structure_collapsed_tags_status; +/ -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_.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 = ""; -comp_obj_heading_.tags.anchor_tag_html = ""; -comp_obj_heading_.tags.in_segment_html = ""; -comp_obj_heading_.tags.html_segment_anchor_tag_is = ""; -comp_obj_heading_.tags.epub_segment_anchor_tag_is = ""; -comp_obj_heading_.metainfo.heading_lev_markup = 9; -comp_obj_heading_.metainfo.heading_lev_collapsed = 9; -comp_obj_heading_.metainfo.parent_ocn = 0; -comp_obj_heading_.metainfo.parent_lev_markup = 0; -comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = dom_structure_markedup_tags_status.dup; -comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = dom_structure_collapsed_tags_status.dup; +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_.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 = ""; +comp_obj_heading_.tags.anchor_tag_html = ""; +comp_obj_heading_.tags.in_segment_html = ""; +comp_obj_heading_.tags.html_segment_anchor_tag_is = ""; +comp_obj_heading_.tags.epub_segment_anchor_tag_is = ""; +comp_obj_heading_.metainfo.heading_lev_markup = 9; +comp_obj_heading_.metainfo.heading_lev_collapsed = 9; +comp_obj_heading_.metainfo.parent_ocn = 0; +comp_obj_heading_.metainfo.parent_lev_markup = 0; +comp_obj_heading_.metainfo.dom_structure_markedup_tags_status = dom_structure_markedup_tags_status.dup; +comp_obj_heading_.metainfo.dom_structure_collapsed_tags_status = dom_structure_collapsed_tags_status.dup; comp_obj_heading_ = comp_obj_heading_.obj_dom_structure_set_markup_tags(dom_structure_markedup_tags_status, 0); comp_obj_heading_ = comp_obj_heading_.obj_dom_set_collapsed_tags(dom_structure_collapsed_tags_status, 0); comp_obj_heading_ = comp_obj_heading_.obj_heading_ancestors(lv_ancestors_txt); // the_dom_tail_section ~= comp_obj_heading_; // remove tail for now, decide on later #+END_SRC -** 4. _return document tuple_ :post: -*** _the document_ :document: +** 4. _return document tuple_ :post: +*** _the document_ :document: #+NAME: abs_post #+BEGIN_SRC d @@ -3070,8 +3070,8 @@ if ((opt_action.html) #+NAME: abs_post #+BEGIN_SRC d -string[] segnames_4 = segnames["html"].dup; -string[] segnames_lv1_to_4 = segnames["epub"].dup; +string[] segnames_4 = segnames["html"].dup; +string[] segnames_lv1_to_4 = segnames["epub"].dup; debug(segnames) { writeln("segnames_lv4: ", segnames_4); writeln("segnames_lv1_to_4: ", segnames_lv1_to_4); @@ -3093,19 +3093,19 @@ destroy(the_blurb_section); destroy(segnames); destroy(bookindex_unordered_hashes); destroy(an_object); -obj_cite_digits = ocn_emit(eN.ocn.reset); -biblio_arr_json = []; -obj_cite_digit_ = 0; -html_segnames_ptr = 0; -html_segnames_ptr_cntr = 0; -content_non_header = "8"; -dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; -dom_structure_markedup_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; -dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; -dom_structure_collapsed_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; +obj_cite_digits = ocn_emit(eN.ocn.reset); +biblio_arr_json = []; +obj_cite_digit_ = 0; +html_segnames_ptr = 0; +html_segnames_ptr_cntr = 0; +content_non_header = "8"; +dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; +dom_structure_markedup_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; +dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; +dom_structure_collapsed_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; #+END_SRC -*** doc_has struct +*** doc has struct #+NAME: abs_struct_doc_has #+BEGIN_SRC d @@ -3161,7 +3161,7 @@ dom_structure_collapsed_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; } #+END_SRC -*** _return the document tuple_ [#A] :return:tuple: +*** _return the document tuple_ [#A] :return:tuple: #+NAME: abs_return_tuple #+BEGIN_SRC d @@ -3172,12 +3172,12 @@ auto t = tuple( return t; #+END_SRC -** 5. Functions :abstract:function: +** 5. Functions :abstract:function: functions used in document abstraction -*** set & resets :reset: -**** object reset: remove (clean) :object:remove: +*** set & resets :reset: +**** object reset: remove (clean) :object:remove: #+NAME: abs_functions_object_reset #+BEGIN_SRC d @@ -3191,7 +3191,7 @@ functions used in document abstraction } #+END_SRC -**** set, initialize or re-initialize :set: +**** set, initialize or re-initialize :set: #+NAME: abs_functions_header_set_common #+BEGIN_SRC d @@ -3200,14 +3200,14 @@ functions used in document abstraction return ref string[string] an_object, return ref uint[string] pith, ) { - line_occur["heading"] = eN.bi.off; - line_occur["para"] = eN.bi.off; - pith["txt_is"] = eN.txt_is.off; - an_object = an_object.object_reset; + line_occur["heading"] = eN.bi.off; + line_occur["para"] = eN.bi.off; + pith["txt_is"] = eN.txt_is.off; + an_object = an_object.object_reset; } #+END_SRC -*** check object_number status in document :ocn: +*** check object_number status in document :ocn: #+NAME: abs_functions_ocn_status #+BEGIN_SRC d @@ -3236,27 +3236,27 @@ functions used in document abstraction } } } else if (pith["no_ocn_multiple_objects"] == eN.bi.off) { - pith["dummy_heading_status"] = eN.bi.off; + pith["dummy_heading_status"] = eN.bi.off; if (pith["dummy_heading_multiple_objects"]) { - pith["dummy_heading_status"] = eN.bi.on; + pith["dummy_heading_status"] = eN.bi.on; } if (line.matchFirst(rgx.object_number_off)) { - pith["ocn"] = eN.ocn.off; + pith["ocn"] = eN.ocn.off; } else if (line.matchFirst(rgx.object_number_off_dummy_heading)) { - pith["ocn"] = eN.ocn.off; - pith["dummy_heading_status"] = eN.bi.on; + pith["ocn"] = eN.ocn.off; + pith["dummy_heading_status"] = eN.bi.on; } else { - pith["ocn"] = eN.ocn.on; - pith["dummy_heading_status"] = eN.bi.off; + pith["ocn"] = eN.ocn.on; + pith["dummy_heading_status"] = eN.bi.off; } } else { pith["ocn"] = pith["no_ocn_multiple_objects"]; } } else if (pith["no_ocn_multiple_objects"] == eN.bi.on) { if (line.matchFirst(rgx.object_number_off_block_close)) { - pith["no_ocn_multiple_objects"] = eN.bi.off; - pith["ocn"] = eN.ocn.on; - pith["dummy_heading_status"] = eN.bi.off; + pith["no_ocn_multiple_objects"] = eN.bi.off; + pith["ocn"] = eN.ocn.on; + pith["dummy_heading_status"] = eN.bi.off; debug(ocnoff) { writeln(line); } @@ -3320,8 +3320,8 @@ functions used in document abstraction } #+END_SRC -*** block :block: -**** block start (open) block :start: +*** block :block: +**** block start (open) block :start: ***** { block starts function #+NAME: abs_functions_block @@ -3334,7 +3334,7 @@ functions used in document abstraction ) { #+END_SRC -****** block (various) curly open :curly: +****** block (various) curly open :curly: #+NAME: abs_functions_block #+BEGIN_SRC d @@ -3347,18 +3347,18 @@ functions used in document abstraction #+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 : ""; + 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; + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.curly; #+END_SRC ******* poem @@ -3367,20 +3367,20 @@ functions used in document abstraction #+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 : ""; + 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; + 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 @@ -3389,18 +3389,18 @@ functions used in document abstraction #+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 : ""; + 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; + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.curly; #+END_SRC ******* block @@ -3409,18 +3409,18 @@ functions used in document abstraction #+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 : ""; + 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; + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.curly; #+END_SRC ******* quote @@ -3429,18 +3429,18 @@ functions used in document abstraction #+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; + 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; + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.curly; #+END_SRC ******* table @@ -3455,11 +3455,11 @@ functions used in document abstraction ); } 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; + 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 @@ -3468,32 +3468,32 @@ functions used in document abstraction #+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; + 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: +****** block (various) tic open :tic: ******* code #+NAME: abs_functions_block #+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 : ""; + 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; + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.tic; #+END_SRC ******* poem @@ -3502,20 +3502,20 @@ functions used in document abstraction #+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 : ""; + 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; + 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 @@ -3524,18 +3524,18 @@ functions used in document abstraction #+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 : ""; + 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; + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.tic; #+END_SRC ******* block @@ -3544,18 +3544,18 @@ functions used in document abstraction #+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 : ""; + 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; + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.tic; #+END_SRC ******* quote @@ -3564,18 +3564,18 @@ functions used in document abstraction #+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) { + 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; + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.on; + pith["block_delim"] = eN.blk_delim.tic; #+END_SRC ******* table @@ -3590,11 +3590,11 @@ functions used in document abstraction ); } 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; + 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 @@ -3605,8 +3605,8 @@ functions used in document abstraction } #+END_SRC -**** block continue (an open block) :continue: -***** _code block_ (special status, deal with first) :code: +**** block continue (an open block) :continue: +***** _code block_ (special status, deal with first) :code: #+NAME: abs_functions_block_code #+BEGIN_SRC d @@ -3625,9 +3625,9 @@ functions used in document abstraction an_object[an_object_key] = an_object[an_object_key] .replaceFirst(rgx.newline_eol_delimiter_only, "") .stripRight; - pith["block_is"] = eN.blk_is.code; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { debug(codecurly) { writeln(line); @@ -3642,9 +3642,9 @@ functions used in document abstraction an_object[an_object_key] = an_object[an_object_key] .replaceFirst(rgx.newline_eol_delimiter_only, "") .stripRight; - pith["block_is"] = eN.blk_is.code; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + pith["block_is"] = eN.blk_is.code; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { debug(codetic) { writeln(line); @@ -3656,27 +3656,27 @@ functions used in document abstraction } #+END_SRC -***** biblio block :biblio: +***** biblio block :biblio: ****** biblio tag map #+NAME: abs_functions_block_biblio #+BEGIN_SRC d @safe final string biblio_tag_map()(string abr) { auto btm = [ - "au" : "author_raw", - "ed" : "editor_raw", - "ti" : "fulltitle", - "lng" : "language", - "jo" : "journal", - "vol" : "volume", - "edn" : "edition", - "yr" : "year", - "pl" : "place", - "pb" : "publisher", - "pub" : "publisher", - "pg" : "pages", - "pgs" : "pages", - "sn" : "short_name" + "au" : "author_raw", + "ed" : "editor_raw", + "ti" : "fulltitle", + "lng" : "language", + "jo" : "journal", + "vol" : "volume", + "edn" : "edition", + "yr" : "year", + "pl" : "place", + "pb" : "publisher", + "pub" : "publisher", + "pg" : "pages", + "pgs" : "pages", + "sn" : "short_name" ]; return btm[abr]; } @@ -3689,21 +3689,21 @@ functions used in document abstraction final string biblio_tag_map_()(string 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; } @@ -3763,7 +3763,7 @@ final string biblio_tag_map_()(string abr) { auto bt = line.match(rgx.biblio_tags); bib_entry = eN.bi.off; st = bt.captures[1].to!string; - auto header_tag_value=(bt.captures[2]).to!string; + auto header_tag_value = (bt.captures[2]).to!string; JSONValue j = parseJSON(biblio_entry_str_json); biblio_tag_name = (st.match(rgx.biblio_abbreviations)) ? (biblio_tag_map(st)) @@ -3830,12 +3830,12 @@ final string biblio_tag_map_()(string abr) { } else { biblio_entry_str_json = ""; } - header_tag_value=""; + header_tag_value = ""; } } #+END_SRC -***** quote block :quote: +***** quote block :quote: #+NAME: abs_functions_block_quote #+BEGIN_SRC d @@ -3851,10 +3851,10 @@ final string biblio_tag_map_()(string abr) { debug(quote) { writeln(line); } - an_object[an_object_key] = an_object[an_object_key].stripRight; - pith["block_is"] = eN.blk_is.quote; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { debug(quote) { writeln(line); @@ -3866,10 +3866,10 @@ final string biblio_tag_map_()(string abr) { debug(quote) { writeln(line); } - an_object[an_object_key] = an_object[an_object_key].stripRight; - pith["block_is"] = eN.blk_is.quote; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.quote; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { debug(quote) { writeln(line); @@ -3882,7 +3882,7 @@ final string biblio_tag_map_()(string abr) { } #+END_SRC -***** group block :group: +***** group block :group: - apply inline markup - discard leading and newline whitespace @@ -3901,10 +3901,10 @@ final string biblio_tag_map_()(string abr) { debug(group) { writeln(line); } - an_object[an_object_key] = an_object[an_object_key].stripRight; - pith["block_is"] = eN.blk_is.group; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { debug(group) { writeln(line); @@ -3916,10 +3916,10 @@ final string biblio_tag_map_()(string abr) { debug(group) { writeln(line); } - an_object[an_object_key] = an_object[an_object_key].stripRight; - pith["block_is"] = eN.blk_is.group; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.group; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { debug(group) { writeln(line); @@ -3932,7 +3932,7 @@ final string biblio_tag_map_()(string abr) { } #+END_SRC -***** block block :block: +***** block block :block: - apply inline markup - keep whitespace indentation @@ -3952,10 +3952,10 @@ final string biblio_tag_map_()(string abr) { debug(block) { writeln(line); } - an_object[an_object_key] = an_object[an_object_key].stripRight; - pith["block_is"] = eN.blk_is.block; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { debug(block) { writeln(line); @@ -3967,10 +3967,10 @@ final string biblio_tag_map_()(string abr) { debug(block) { writeln(line); } - an_object[an_object_key] = an_object[an_object_key].stripRight; - pith["block_is"] = eN.blk_is.block; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + an_object[an_object_key] = an_object[an_object_key].stripRight; + pith["block_is"] = eN.blk_is.block; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { debug(block) { writeln(line); @@ -3983,7 +3983,7 @@ final string biblio_tag_map_()(string abr) { } #+END_SRC -***** poem block, verse objects :poem:verse: +***** poem block, verse objects :poem:verse: why extra object stuff only in poem/verse? @@ -4004,7 +4004,7 @@ why extra object stuff only in poem/verse? if (line.matchFirst(rgx.block_curly_poem_close)) { if (an_object_key in an_object || processing.length > 0) { - an_object[an_object_key] = ""; + an_object[an_object_key] = ""; debug(poem) { writefln( "* [poem curly] %s", @@ -4012,7 +4012,7 @@ why extra object stuff only in poem/verse? ); } if (processing.length > 0) { - an_object[an_object_key] = processing["verse"]; + an_object[an_object_key] = processing["verse"]; } debug(poem) { writeln(__LINE__); @@ -4029,51 +4029,51 @@ why extra object stuff only in poem/verse? an_object[an_object_key] ); } - an_object["is"] = "verse"; + an_object["is"] = "verse"; 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 = "verse"; - 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.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); + 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 = "verse"; + 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.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); } object_reset(an_object); processing.remove("verse"); ++cntr; } - object_number_poem["end"] = obj_cite_digits.object_number.to!string; - pith["block_is"] = eN.blk_is.poem; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + object_number_poem["end"] = obj_cite_digits.object_number.to!string; + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { processing["verse"] ~= line ~= "\n"; if (pith["verse_new"] == eN.bi.on) { obj_cite_digits = ocn_emit(pith["ocn"]); - pith["verse_new"] = eN.bi.off; + pith["verse_new"] = eN.bi.off; } else if (line.matchFirst(rgx.newline_eol_delimiter_only)) { - processing["verse"] = processing["verse"].stripRight; - verse_line = eN.bi.off; - pith["verse_new"] = eN.bi.on; + processing["verse"] = processing["verse"].stripRight; + verse_line = eN.bi.off; + pith["verse_new"] = eN.bi.on; } if (pith["verse_new"] == eN.bi.on) { - verse_line=1; - an_object[an_object_key] = processing["verse"]; + verse_line = 1; + an_object[an_object_key] = processing["verse"]; debug(poem) { writefln( "* %s curly\n%s", @@ -4082,7 +4082,7 @@ why extra object stuff only in poem/verse? ); } processing.remove("verse"); - an_object["is"] = "verse"; + an_object["is"] = "verse"; auto comp_obj_location = node_construct.node_location_emitter( content_non_header, tag_in_seg, @@ -4095,26 +4095,26 @@ why extra object stuff only in poem/verse? ); 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 = "verse"; - 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.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); + 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 = "verse"; + 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.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); object_reset(an_object); processing.remove("verse"); ++cntr; @@ -4122,7 +4122,7 @@ why extra object stuff only in poem/verse? } } else if (pith["block_delim"] == eN.blk_delim.tic) { if (auto m = line.matchFirst(rgx.block_tic_close)) { - an_object[an_object_key]="verse"; + an_object[an_object_key] = "verse"; debug(poem) { writefln( "* [poem tic] %s", @@ -4130,7 +4130,7 @@ why extra object stuff only in poem/verse? ); } if (processing.length > 0) { - an_object[an_object_key] = processing["verse"]; + an_object[an_object_key] = processing["verse"]; } if (an_object.length > 0) { debug(poem) { @@ -4138,50 +4138,50 @@ why extra object stuff only in poem/verse? writeln(obj_cite_digits.object_number, line); } processing.remove("verse"); - an_object["is"] = "verse"; + an_object["is"] = "verse"; 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 = "verse"; - 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.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); - object_number_poem["end"] = obj_cite_digits.object_number.to!string; + 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 = "verse"; + 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.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); + object_number_poem["end"] = obj_cite_digits.object_number.to!string; object_reset(an_object); processing.remove("verse"); ++cntr; } - pith["block_is"] = eN.blk_is.poem; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + pith["block_is"] = eN.blk_is.poem; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { - processing["verse"] ~= line ~= "\n"; + processing["verse"] ~= line ~= "\n"; if (pith["verse_new"] == eN.bi.on) { - obj_cite_digits = ocn_emit(pith["ocn"]); - pith["verse_new"] = eN.bi.off; + obj_cite_digits = ocn_emit(pith["ocn"]); + pith["verse_new"] = eN.bi.off; } else if (line.matchFirst(rgx.newline_eol_delimiter_only)) { - processing["verse"] = processing["verse"].stripRight; - pith["verse_new"] = eN.bi.on; - verse_line = eN.bi.off; + processing["verse"] = processing["verse"].stripRight; + pith["verse_new"] = eN.bi.on; + verse_line = eN.bi.off; } if (pith["verse_new"] == eN.bi.on) { - verse_line=1; - an_object[an_object_key] = processing["verse"]; + verse_line = 1; + an_object[an_object_key] = processing["verse"]; debug(poem) { writefln( "* %s tic\n%s", @@ -4190,7 +4190,7 @@ why extra object stuff only in poem/verse? ); } processing.remove("verse"); - an_object["is"] = "verse"; + an_object["is"] = "verse"; auto comp_obj_location = node_construct.node_location_emitter( content_non_header, @@ -4204,26 +4204,26 @@ why extra object stuff only in poem/verse? ); 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 = "verse"; - 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.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); + 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 = "verse"; + 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.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); object_reset(an_object); processing.remove("verse"); ++cntr; @@ -4235,7 +4235,7 @@ why extra object stuff only in poem/verse? } #+END_SRC -***** table block :table: +***** table block :table: there are 3 types of table markup that need to be nomalized (given a single representation) here @@ -4268,9 +4268,9 @@ you need: debug(table) { writeln(line); } - pith["block_is"] = eN.blk_is.table; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { debug(table) { writeln(line); @@ -4279,9 +4279,9 @@ you need: } } else if (pith["block_delim"] == eN.blk_delim.curly_special) { if (line.empty) { - pith["block_is"] = eN.blk_is.table; - pith["block_state"] = eN.blk_state.off; - pith["block_delim"] = eN.blk_delim.off; + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.off; + pith["block_delim"] = eN.blk_delim.off; line.flow_table_closed_make_special_notation_table_( an_object, the_document_body_section, @@ -4302,9 +4302,9 @@ you need: debug(table) { writeln(line); } - pith["block_is"] = eN.blk_is.table; - pith["block_state"] = eN.blk_state.closing; - pith["block_delim"] = eN.blk_delim.off; + pith["block_is"] = eN.blk_is.table; + pith["block_state"] = eN.blk_state.closing; + pith["block_delim"] = eN.blk_delim.off; } else { debug(table) { writeln(line); @@ -4350,27 +4350,27 @@ process and use an_object["table_head"] (then empty it) heading_ptr-1, "table" ); - an_object["is"] = "table"; + an_object["is"] = "table"; TxtAndAnchorTagPlusHasFootnotesUrlsImages substantive_obj_misc_tuple = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, "body_nugget", conf_make_meta, No._new_doc); - an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; - 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_special(an_object["substantive"]); - the_document_body_section ~= comp_obj_block; + an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; + 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_special(an_object["substantive"]); + the_document_body_section ~= comp_obj_block; object_reset(an_object); processing.remove("verse"); ++cntr; } #+END_SRC -**** block end (close an open block): line empty, block flag _makes_ :close: +**** block end (close an open block): line empty, block flag _makes_ :close: ***** { line empty, _make block_ @@ -4417,7 +4417,7 @@ process and use an_object["table_head"] (then empty it) obj_cite_digits, tag_in_seg ); - an_object["is"] = "quote"; + an_object["is"] = "quote"; auto comp_obj_location = node_construct.node_location_emitter( content_non_header, @@ -4431,31 +4431,31 @@ process and use an_object["table_head"] (then empty it) ); 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; + 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; @@ -4475,7 +4475,7 @@ process and use an_object["table_head"] (then empty it) obj_cite_digits, tag_in_seg ); - an_object["is"] = "group"; + an_object["is"] = "group"; auto comp_obj_location = node_construct.node_location_emitter( content_non_header, @@ -4489,31 +4489,31 @@ process and use an_object["table_head"] (then empty it) ); 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; + 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; @@ -4533,7 +4533,7 @@ process and use an_object["table_head"] (then empty it) obj_cite_digits, tag_in_seg ); - an_object["is"] = "block"; + an_object["is"] = "block"; auto comp_obj_location = node_construct.node_location_emitter( content_non_header, @@ -4547,30 +4547,30 @@ process and use an_object["table_head"] (then empty it) ); 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; + 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; @@ -4589,7 +4589,7 @@ process and use an_object["table_head"] (then empty it) obj_cite_digits, tag_in_seg ); - an_object["is"] = "verse"; + an_object["is"] = "verse"; auto comp_obj_location = node_construct.node_location_emitter( content_non_header, @@ -4601,21 +4601,21 @@ process and use an_object["table_head"] (then empty it) 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; + 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 @@ -4634,7 +4634,7 @@ process and use an_object["table_head"] (then empty it) obj_cite_digits, tag_in_seg ); - an_object["is"] = "code"; + an_object["is"] = "code"; auto comp_obj_location = node_construct.node_location_emitter( content_non_header, @@ -4648,31 +4648,31 @@ process and use an_object["table_head"] (then empty it) ); 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; + 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; @@ -4693,7 +4693,7 @@ process and use an_object["table_head"] (then empty it) obj_cite_digits, tag_in_seg ); - an_object["is"] = "table"; + an_object["is"] = "table"; auto comp_obj_location = node_construct.node_location_emitter( content_non_header, @@ -4707,21 +4707,21 @@ process and use an_object["table_head"] (then empty it) ); 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; + 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; @@ -4737,7 +4737,7 @@ process and use an_object["table_head"] (then empty it) } #+END_SRC -*** book index :bookindex: +*** book index :bookindex: #+NAME: abs_functions_book_index #+BEGIN_SRC d @@ -4793,8 +4793,8 @@ process and use an_object["table_head"] (then empty it) } #+END_SRC -*** heading or paragraph :heading:paragraph: -**** heading found :heading: +*** heading or paragraph :heading:paragraph: +**** heading found :heading: #+NAME: abs_functions_heading #+BEGIN_SRC d @@ -4881,7 +4881,7 @@ process and use an_object["table_head"] (then empty it) } #+END_SRC -**** heading make set :heading: +**** heading make set :heading: #+NAME: abs_functions_heading #+BEGIN_SRC d @@ -4943,7 +4943,7 @@ process and use an_object["table_head"] (then empty it) } #+END_SRC -**** heading match :heading: +**** heading match :heading: #+NAME: abs_functions_heading #+BEGIN_SRC d @@ -5099,7 +5099,7 @@ process and use an_object["table_head"] (then empty it) } #+END_SRC -**** para match :para: +**** para match :para: #+NAME: abs_functions_para #+BEGIN_SRC d @@ -5118,7 +5118,7 @@ process and use an_object["table_head"] (then empty it) /+ para matches +/ pith["txt_is"] = eN.txt_is.para; an_object[an_object_key] ~= line; - indent=[ + indent = [ "hang_position" : 0, "base_position" : 0, ]; @@ -5204,13 +5204,13 @@ process and use an_object["table_head"] (then empty it) H table_head, ) { static auto rgx = RgxI(); - table_object.metainfo.is_of_part = "body"; - table_object.metainfo.is_of_section = "body"; - table_object.metainfo.is_of_type = "block"; - table_object.metainfo.is_a = "table"; - table_object.has.inline_notes_reg = false; - table_object.has.inline_notes_star = false; - table_object.has.inline_links = false; + table_object.metainfo.is_of_part = "body"; + table_object.metainfo.is_of_section = "body"; + table_object.metainfo.is_of_type = "block"; + table_object.metainfo.is_a = "table"; + table_object.has.inline_notes_reg = false; + table_object.has.inline_notes_star = false; + table_object.has.inline_links = false; if (auto m = table_head.matchFirst(rgx.table_head_instructions)) { table_object.table.heading = ((m["c_heading"].length > 0) && (m["c_heading"] == "h")) ? true : false; @@ -5400,9 +5400,9 @@ process and use an_object["table_head"] (then empty it) } #+END_SRC -*** function emitters :emitters: -**** object :object: -***** ocn :ocn: +*** function emitters :emitters: +**** object :object: +***** ocn :ocn: #+NAME: meta_emitters_ocn #+BEGIN_SRC d @@ -5413,42 +5413,42 @@ process and use an_object["table_head"] (then empty it) @safe auto ocn_emitter(int ocn_status_flag) { OCNset ocn; assert(ocn_status_flag <= eN.ocn.reset); - ocn_object_number = ocn_bkidx = 0; - object_identifier = ""; - ocn_is_off = false; + ocn_object_number = ocn_bkidx = 0; + object_identifier = ""; + ocn_is_off = false; switch(ocn_status_flag) with (eN.ocn) { case reset: - ocn_digit = ocn_on_ = 1; - object_identifier = "1"; - ocn_is_off = false; - ocn_off_ = ocn_bkidx_ = 0; + ocn_digit = ocn_on_ = 1; + object_identifier = "1"; + ocn_is_off = false; + ocn_off_ = ocn_bkidx_ = 0; break; case on: - ocn_digit = ocn_object_number = ++ocn_on_; - object_identifier = ocn_digit.to!string; - ocn_is_off = false; + ocn_digit = ocn_object_number = ++ocn_on_; + object_identifier = ocn_digit.to!string; + ocn_is_off = false; break; case off: - ocn_digit = 0; - ocn_off_ = ++ocn_off_; - object_identifier = "a" ~ ocn_off_.to!string; - ocn_is_off = true; + ocn_digit = 0; + ocn_off_ = ++ocn_off_; + object_identifier = "a" ~ ocn_off_.to!string; + ocn_is_off = true; break; case bkidx: - ocn_bkidx = ++ocn_bkidx_; + ocn_bkidx = ++ocn_bkidx_; break; case closing: // unused? break; default: - ocn_digit = 0; + ocn_digit = 0; } assert(ocn_digit >= 0); - ocn.digit = ocn_digit; - ocn.object_number = ocn_object_number; // difference between .object_number and .digit? - ocn.identifier = object_identifier; - ocn.off = ocn_is_off; - ocn.bkidx = ocn_bkidx; - ocn.type = ocn_status_flag; + ocn.digit = ocn_digit; + ocn.object_number = ocn_object_number; // difference between .object_number and .digit? + ocn.identifier = object_identifier; + ocn.off = ocn_is_off; + ocn.bkidx = ocn_bkidx; + ocn.type = ocn_status_flag; return ocn; } invariant() { @@ -5456,7 +5456,7 @@ process and use an_object["table_head"] (then empty it) } #+END_SRC -***** object inline markup munge :markup:inline: +***** object inline markup munge :markup:inline: ****** { struct, inline markup munge @@ -5471,10 +5471,10 @@ process and use an_object["table_head"] (then empty it) static auto mkup = InlineMarkup(); int stage_reset_note_numbers = true; private auto initialize_note_numbers() { - n_foot = 0; - n_foot_reg = 0; - n_foot_sp_asterisk = 0; - n_foot_sp_plus = 0; + n_foot = 0; + n_foot_reg = 0; + n_foot_sp_asterisk = 0; + n_foot_sp_plus = 0; } #+END_SRC @@ -5534,10 +5534,10 @@ process and use an_object["table_head"] (then empty it) 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; + 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) { @@ -5545,7 +5545,7 @@ process and use an_object["table_head"] (then empty it) flg_notes_star = true; ++n_foot_sp_asterisk; asterisks_ = "*"; - n_foot=n_foot_sp_asterisk; + 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) ~ " ") @@ -5554,7 +5554,7 @@ process and use an_object["table_head"] (then empty it) flg_notes_plus = true; ++n_foot_sp_plus; plus_ = "*"; - n_foot=n_foot_sp_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) ~ " ") @@ -5564,7 +5564,7 @@ process and use an_object["table_head"] (then empty it) 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; + 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); } @@ -5595,7 +5595,7 @@ process and use an_object["table_head"] (then empty it) #+BEGIN_SRC d @safe private TxtPlusHasFootnotesUrlsImages object_notes_and_links_()( string obj_txt_in, - bool reset_note_numbers=false + bool reset_note_numbers = false ) { obj_txt_out = ""; bool urls = false; @@ -5666,7 +5666,7 @@ process and use an_object["table_head"] (then empty it) #+BEGIN_SRC d @safe auto munge_heading()( string obj_txt_in, - bool reset_note_numbers=false + bool reset_note_numbers = false ) { obj_txt["munge"] = obj_txt_in .replaceFirst(rgx.headings, "") @@ -5696,7 +5696,7 @@ process and use an_object["table_head"] (then empty it) #+NAME: meta_emitters_obj_inline_markup_munge #+BEGIN_SRC d @safe auto munge_para()(string obj_txt_in) { - obj_txt["munge"]=(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"]); @@ -5715,7 +5715,7 @@ process and use an_object["table_head"] (then empty it) #+NAME: meta_emitters_obj_inline_markup_munge #+BEGIN_SRC d @safe string munge_quote()(string obj_txt_in) { - obj_txt["munge"]=obj_txt_in; + obj_txt["munge"] = obj_txt_in; return obj_txt["munge"]; } invariant() { @@ -5808,7 +5808,7 @@ process and use an_object["table_head"] (then empty it) #+NAME: meta_emitters_obj_inline_markup_munge #+BEGIN_SRC d @safe string munge_table()(string obj_txt_in) { - obj_txt["munge"]=obj_txt_in; + obj_txt["munge"] = obj_txt_in; return obj_txt["munge"]; } invariant() { @@ -5820,7 +5820,7 @@ process and use an_object["table_head"] (then empty it) #+NAME: meta_emitters_obj_inline_markup_munge #+BEGIN_SRC d @safe string munge_comment()(string obj_txt_in) { - obj_txt["munge"]=obj_txt_in; + obj_txt["munge"] = obj_txt_in; return obj_txt["munge"]; } invariant() { @@ -5834,7 +5834,7 @@ process and use an_object["table_head"] (then empty it) } #+END_SRC -***** toc, tags, object inline markup :markup:inline: +***** toc, tags, object inline markup :markup:inline: ****** { #+NAME: meta_emitters_obj_inline_markup @@ -5846,7 +5846,7 @@ static struct ObjInlineMarkup { static string anchor_tag = ""; #+END_SRC -******* object inline markup and anchor tags :markup:inline: +******* object inline markup and anchor tags :markup:inline: #+NAME: meta_emitters_obj_inline_markup_and_anchor_tags_and_misc #+BEGIN_SRC d @@ -5856,8 +5856,8 @@ static struct ObjInlineMarkup { 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_[obj_key_].dup; + obj_txt["munge"] = (obj_["is"].match(ctRegex!(`verse|code`))) ? obj_txt["munge"] : obj_txt["munge"].strip; if (_new_doc) { @@ -5865,69 +5865,69 @@ static struct ObjInlineMarkup { } 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; + 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; + 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 = ""; + 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]; + 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; + 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"]); + x = munge.munge_para(obj_txt["munge"]); goto default; case "group": - x = munge.munge_group(obj_txt["munge"]); + x = munge.munge_group(obj_txt["munge"]); goto default; case "block": - x = munge.munge_block(obj_txt["munge"]); + x = munge.munge_block(obj_txt["munge"]); goto default; case "verse": - x = munge.munge_verse(obj_txt["munge"]); + x = munge.munge_verse(obj_txt["munge"]); goto default; case "code": - obj_txt["munge"] = munge.munge_code(obj_txt["munge"]); + obj_txt["munge"] = munge.munge_code(obj_txt["munge"]); break; case "table": - obj_txt["munge"] = munge.munge_table(obj_txt["munge"]); + obj_txt["munge"] = munge.munge_table(obj_txt["munge"]); break; case "quote": - obj_txt["munge"] = munge.munge_quote(obj_txt["munge"]); + obj_txt["munge"] = munge.munge_quote(obj_txt["munge"]); break; case "comment": - obj_txt["munge"] = munge.munge_comment(obj_txt["munge"]); + 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]; + 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( @@ -5945,7 +5945,7 @@ static struct ObjInlineMarkup { } #+END_SRC -******* toc (table of contents), build, gather headings :markup:inline: +******* toc (table of contents), build, gather headings :markup:inline: #+NAME: meta_emitters_obj_inline_markup_table_of_contents #+BEGIN_SRC d @@ -5967,14 +5967,14 @@ static struct ObjInlineMarkup { ObjGenericComposite comp_obj_toc; mixin InternalMarkup; static auto mkup = InlineMarkup(); - char[] heading_toc_ = (obj_["substantive"].dup.strip.to!(char[])) + char[] heading_toc_ = (obj_["substantive"].dup.strip.to!(char[])) .replaceAll(rgx.inline_notes_al, ""); - heading_toc_ = _clean_heading_toc_(heading_toc_); - auto attrib=""; + 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=[ + indent = [ "hang_position" : obj_["lev_markup_number"].to!int, "base_position" : obj_["lev_markup_number"].to!int, ]; @@ -5987,35 +5987,35 @@ static struct ObjInlineMarkup { 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; + 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; @@ -6067,17 +6067,17 @@ private: bool _new_doc, ) { if (_new_doc) { - heading_num = [ 0, 0, 0, 0 ]; - heading_number_auto_composite = ""; - auto_heading_numbering = [ true, true, true, true]; + 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 = ""; + 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 +/ @@ -6085,9 +6085,9 @@ private: 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; + 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 @@ -6097,9 +6097,9 @@ private: if (auto_heading_numbering[0]) { heading_num[0] ++; } - heading_num[1] = 0; - heading_num[2] = 0; - heading_num[3] = 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) @@ -6110,8 +6110,8 @@ private: && auto_heading_numbering[1]) { heading_num[1] ++; } - heading_num[2] = 0; - heading_num[3] = 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 - 2) @@ -6123,7 +6123,7 @@ private: && auto_heading_numbering[2]) { heading_num[2] ++; } - heading_num[3] = 0; + heading_num[3] = 0; } else if ( conf_make_meta.make.auto_num_top_lv == (obj_["lev_markup_number"].to!uint - 3) @@ -6231,7 +6231,7 @@ private: 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" + } else if (lev_ == "1") { // (if not successful) manufacture a unique anchor tag for lev == "1" if (_new_doc) { heading_num_lev1 = 0; } @@ -6252,7 +6252,7 @@ private: } #+END_SRC -***** object attrib :attributes: +***** object attrib :attributes: ****** { attributes structure open, public #+NAME: meta_emitters_obj_attributes @@ -6311,8 +6311,8 @@ struct ObjAttributes { _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); + _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"]); @@ -6506,15 +6506,15 @@ struct ObjAttributes { (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(); + 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 @@ -6526,8 +6526,8 @@ struct ObjAttributes { } #+END_SRC -**** book index :book:index: -***** book index nugget hash :hash:nugget: +**** book index :book:index: +***** book index nugget hash :hash:nugget: #+NAME: meta_emitters_book_index_nugget #+BEGIN_SRC d @@ -6595,7 +6595,7 @@ struct BookIndexNuggetHash { if (!empty(sub_term)) { bi_hash_nugget[main_term][sub_term] ~= object_numbers; } - object_numbers=null; + object_numbers = null; } } } @@ -6607,7 +6607,7 @@ struct BookIndexNuggetHash { } #+END_SRC -***** book index (sort &) report indented :report:indented: +***** book index (sort &) report indented :report:indented: #+NAME: meta_emitters_book_index_report_indented #+BEGIN_SRC d @@ -6639,7 +6639,7 @@ struct BookIndexReportIndent { } #+END_SRC -***** book index (sort &) report section :report:section: +***** book index (sort &) report section :report:section: ****** { book index struct open #+NAME: meta_emitters_book_index_report_section @@ -6685,7 +6685,7 @@ struct BookIndexReportSection { } #+END_SRC -******* book index (sort &) build section :report:section: +******* book index (sort &) build section :report:section: #+NAME: meta_emitters_book_index_report_section #+BEGIN_SRC d @@ -6718,53 +6718,53 @@ struct BookIndexReportSection { 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_; + 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_; + 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; @@ -6806,39 +6806,39 @@ struct BookIndexReportSection { 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; + 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_; + 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, @@ -6855,7 +6855,7 @@ struct BookIndexReportSection { } #+END_SRC -**** (end)notes section :endnotes:section: +**** (end)notes section :endnotes:section: #+NAME: meta_emitters_endnotes #+BEGIN_SRC d @@ -6887,7 +6887,7 @@ struct NotesSection { rgx.inline_notes_al_all_note) ); mixin InternalMarkup; - previous_count=cntr; + previous_count = cntr; static auto mkup = InlineMarkup(); static auto munge = ObjInlineMarkupMunge(); foreach(m; @@ -6988,96 +6988,96 @@ struct NotesSection { 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_; + 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_; + 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_; + 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; + 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 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); @@ -7092,7 +7092,7 @@ struct NotesSection { } #+END_SRC -**** bibliography :bibliography: +**** bibliography :bibliography: ***** { biblio struct #+NAME: meta_emitters_bibliography @@ -7147,9 +7147,9 @@ struct Bibliography { JSONValue j = parseJSON(bibent); if (!empty(j["fulltitle"].str)) { if (!empty(j["author_raw"].str)) { - j["deemed_author"]=j["author_arr"][0]; + j["deemed_author"] = j["author_arr"][0]; } else if (!empty(j["editor_raw"].str)) { - j["deemed_author"]=j["editor_arr"][0]; + j["deemed_author"] = j["editor_arr"][0]; } j["sortby_deemed_author_year_title"] = ( j["deemed_author"].str ~ @@ -7208,7 +7208,7 @@ struct Bibliography { } #+END_SRC -**** node structure metadata :structure:metadata:node: +**** node structure metadata :structure:metadata:node: ***** { metadata node struct #+NAME: meta_emitters_metadata @@ -7242,28 +7242,28 @@ struct NodeStructureMetadata { 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; + 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; + 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; + 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; + 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"]; + 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); @@ -7328,14 +7328,14 @@ struct NodeStructureMetadata { 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; + 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; + lv2 = 0; lv3 = 0; lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0; p_["lev_markup_number"] = DocStructMarkupHeading.h_sect_A; p_["object_number"] = lv0; @@ -7343,15 +7343,15 @@ struct NodeStructureMetadata { case 2: lv = DocStructMarkupHeading.h_sect_C; lv2 = obj_cite_digit; - lv3=0; lv4=0; lv5=0; lv6=0; lv7=0; + 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; + lv3 = obj_cite_digit; + lv4 = 0; lv5 = 0; lv6 = 0; lv7 = 0; p_["lev_markup_number"] = DocStructMarkupHeading.h_sect_C; p_["object_number"] = lv2; @@ -7359,7 +7359,7 @@ struct NodeStructureMetadata { case 4: lv = DocStructMarkupHeading.h_text_1; lv4 = obj_cite_digit; - lv5=0; lv6=0; lv7=0; + lv5 = 0; lv6 = 0; lv7 = 0; if (lv3 > eN.bi.off) { p_["lev_markup_number"] = DocStructMarkupHeading.h_sect_D; @@ -7381,7 +7381,7 @@ struct NodeStructureMetadata { case 5: lv = DocStructMarkupHeading.h_text_2; lv5 = obj_cite_digit; - lv6=0; lv7=0; + lv6 = 0; lv7 = 0; p_["lev_markup_number"] = DocStructMarkupHeading.h_text_1; p_["object_number"] = lv4; @@ -7389,7 +7389,7 @@ struct NodeStructureMetadata { case 6: lv = DocStructMarkupHeading.h_text_3; lv6 = obj_cite_digit; - lv7=0; + lv7 = 0; p_["lev_markup_number"] = DocStructMarkupHeading.h_text_2; p_["object_number"] = lv5; @@ -7405,35 +7405,35 @@ struct NodeStructureMetadata { break; } 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; + _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) { @@ -7489,8 +7489,8 @@ struct NodeStructureMetadata { } #+END_SRC -*** function assertions :assertions: -**** assertions on markup document structure :doc_structure: +*** function assertions :assertions: +**** assertions on markup document structure :doc_structure: #+NAME: abs_functions_assertions #+BEGIN_SRC d @@ -7715,18 +7715,18 @@ template ObjectSetter() { } #+END_SRC -** 1. initialize structs :struct: +** 1. initialize structs :struct: *** heading attribute #+BEGIN_SRC d struct HeadingAttrib { - string lev = "9"; - int heading_lev_markup = 9; - int heading_lev_collapsed = 9; - int[] closes_lev_collapsed = []; - int[] closes_lev_markup = []; - int array_ptr = 0; - int heading_array_ptr_segments = 0; + string lev = "9"; + int heading_lev_markup = 9; + int heading_lev_collapsed = 9; + int[] closes_lev_collapsed = []; + int[] closes_lev_markup = []; + int array_ptr = 0; + int heading_array_ptr_segments = 0; } #+END_SRC @@ -7735,54 +7735,54 @@ struct HeadingAttrib { #+NAME: meta_structs_init #+BEGIN_SRC d struct DocObj_MetaInfo_ { - string is_of_part = ""; // frontmatter, body, backmatter - string is_of_section = ""; // toc, body, glossary, biography, book index, blurb - string is_of_type = ""; // para, block ? - string is_a = ""; // heading, para, table, code block, group, verse/poem ... - alias of_part = is_of_part; - alias of_section = is_of_section; - alias is_of = is_of_type; - string attrib = ""; - string lang = ""; // blocks: group, block, quote; not codeblock; - string syntax = ""; // codeblock only + string is_of_part = ""; // frontmatter, body, backmatter + string is_of_section = ""; // toc, body, glossary, biography, book index, blurb + string is_of_type = ""; // para, block ? + string is_a = ""; // heading, para, table, code block, group, verse/poem ... + alias of_part = is_of_part; + alias of_section = is_of_section; + alias is_of = is_of_type; + string attrib = ""; + string lang = ""; // blocks: group, block, quote; not codeblock; + string syntax = ""; // codeblock only /+ o_n +/ - int o_n_substantive = 0; - int o_n_non_substantive = 0; - int o_n_glossary = 0; - int o_n_bibliography = 0; - int o_n_book_index = 0; - int o_n_blurb = 0; + int o_n_substantive = 0; + int o_n_non_substantive = 0; + int o_n_glossary = 0; + int o_n_bibliography = 0; + int o_n_book_index = 0; + int o_n_blurb = 0; @safe 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; } @safe 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; } @safe 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; } @safe 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; } @safe 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; } @safe 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; } - bool object_number_off = false; - bool visible_object_number = false; - int object_number_type = 0; // { ocn, non, bkidx } + bool object_number_off = false; + bool visible_object_number = false; + int object_number_type = 0; // { ocn, non, bkidx } /+ node +/ string[string][string] node; - int ocn = 0; - string identifier = ""; + int ocn = 0; + string identifier = ""; @safe 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; - int heading_lev_collapsed = 9; + int o_n_type = 0; + int heading_lev_markup = 9; + int heading_lev_collapsed = 9; @safe string marked_up_level() const @property { string _out; switch (heading_lev_markup) { @@ -7798,14 +7798,14 @@ struct DocObj_MetaInfo_ { } return _out; } - bool dummy_heading = false; - int[] markedup_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,]; - int[] collapsed_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,]; - int[] dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,]; - int[] dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,]; - int parent_lev_markup = 0; - int parent_ocn = 0; - int last_decendant_ocn = 0; + bool dummy_heading = false; + int[] markedup_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,]; + int[] collapsed_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,]; + int[] dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,]; + int[] dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,]; + int parent_lev_markup = 0; + int parent_ocn = 0; + int last_decendant_ocn = 0; } #+END_SRC diff --git a/org/out_harvest_metadata.org b/org/out_harvest_metadata.org index b9d7296..424803f 100644 --- a/org/out_harvest_metadata.org +++ b/org/out_harvest_metadata.org @@ -14,7 +14,7 @@ #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no -* document harvest _summary_ :module:spine:metadoc_show_summary: +* document harvest _summary_ :module:spine:metadoc_show_summary: - html ~dr/bin/spine-ldc -v --html --html-link-harvest --harvest \ @@ -58,7 +58,7 @@ import std.conv : to; #+END_SRC -*** initialize :report: +*** initialize :report: #+NAME: metadoc_harvest_initialize #+BEGIN_SRC d diff --git a/org/out_latex.org b/org/out_latex.org index d1ad211..c9610c3 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -18,7 +18,7 @@ - [[./output_hub.org][output_hub]] * latex -** _module template_ :latex:pdf:module: +** _module template_ :latex:pdf:module: #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/latex.d" :noweb yes module doc_reform.io_out.latex; @@ -46,7 +46,7 @@ template outputLaTeX() { } #+END_SRC -** write latex output :latex:out: +** write latex output :latex:out: #+NAME: output_latex #+BEGIN_SRC d @@ -88,7 +88,7 @@ void writeOutputLaTeX(T,M)( } #+END_SRC -** latex output hub [#A] :latex:pdf:out: +** latex output hub [#A] :latex:pdf:out: #+NAME: output_latex #+BEGIN_SRC d @@ -1000,7 +1000,7 @@ string table(O,M)( #+END_SRC ** latex parts -*** latex head :head: +*** latex head :head: **** latex head function #+NAME: output_latex_head @@ -1616,7 +1616,7 @@ string latex_head(M)( } #+END_SRC -*** ↻ latex body :content:body: +*** ↻ latex body :content:body: **** latex body function #+NAME: output_latex_body @@ -1823,7 +1823,7 @@ string latex_body(D,M)( } #+END_SRC -*** latex tail :tail: +*** latex tail :tail: **** latex tail function #+NAME: output_latex_tail diff --git a/org/out_metadata.org b/org/out_metadata.org index 13d6708..3b5bbc5 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -14,7 +14,7 @@ #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no -* document harvest _summary_ :module:spine:metadoc_show_summary: +* document harvest _summary_ :module:spine:metadoc_show_summary: ** _module template_ metadoc document metadata diff --git a/org/out_odt.org b/org/out_odt.org index d7d1100..027816d 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -43,7 +43,7 @@ | doc meta * (timestamp) | meta.xml | odt_metadata | | | |---------------------------------+-----------------------+-------------------+------------------------+------------------| -** _module template_ :odf:odt:module: +** _module template_ :odf:odt:module: #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/odt.d" :noweb yes module doc_reform.io_out.odt; @@ -840,7 +840,7 @@ int _table_number = 0; } #+END_SRC -** write odt output :odf:odt:out: +** write odt output :odf:odt:out: #+NAME: output_odt #+BEGIN_SRC d @@ -929,7 +929,7 @@ void writeOutputODT(W,I)( } #+END_SRC -** odt output hub [#A] :odf:odt:out: +** odt output hub [#A] :odf:odt:out: #+NAME: output_odt #+BEGIN_SRC d @@ -1007,7 +1007,7 @@ void dirtree(I)( #+END_SRC ** fixed items -*** mimetype :mimetype: +*** mimetype :mimetype: #+NAME: output_odt_fixed_mimetype #+BEGIN_SRC d @@ -1017,7 +1017,7 @@ void dirtree(I)( } #+END_SRC -*** manifest.rdf :manifest_rdf: +*** manifest.rdf :manifest_rdf: #+NAME: output_odt_fixed_manifest_rdf #+BEGIN_SRC d @@ -1053,7 +1053,7 @@ void dirtree(I)( } #+END_SRC -*** settings.xml :settings: +*** settings.xml :settings: #+NAME: output_odt_fixed_settings_xml #+BEGIN_SRC d @@ -1167,7 +1167,7 @@ void dirtree(I)( } #+END_SRC -*** styles.xml :styles_xml: +*** styles.xml :styles_xml: #+NAME: output_odt_fixed_styles_xml #+BEGIN_SRC d @@ -2078,7 +2078,7 @@ void dirtree(I)( #+END_SRC ** moving parts -*** ↻ content.xml TODO :content_xml: +*** ↻ content.xml TODO :content_xml: **** content head ***** head open @@ -2416,7 +2416,7 @@ void dirtree(I)( } #+END_SRC -*** manifest.xml (images list changes) :manifest_xml: +*** manifest.xml (images list changes) :manifest_xml: - META-INF/manifest.xml - image list changes @@ -2456,7 +2456,7 @@ _images.join("\n"), } #+END_SRC -*** meta.xml (time stamp) :meta_xml: +*** meta.xml (time stamp) :meta_xml: #+NAME: output_odt_variable_meta_xml #+BEGIN_SRC d @@ -2490,7 +2490,7 @@ doc_matters.generated_time, } #+END_SRC -*** copy images :images: +*** copy images :images: #+NAME: output_odt_variable_copy_odt_images #+BEGIN_SRC d diff --git a/org/out_src_pod.org b/org/out_src_pod.org index a9f4d7b..071f1d7 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -18,7 +18,7 @@ - [[./output_hub.org][output_hub]] * pod -** _module template_ :module: +** _module template_ :module: #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/source_pod.d" module doc_reform.io_out.source_pod; @@ -104,7 +104,7 @@ assert (doc_matters.src.filename.match(rgx.src_fn)); } #+END_SRC -** mkdir :mkdir: +** mkdir :mkdir: #+NAME: source_pod_mkdirs #+BEGIN_SRC d @@ -138,7 +138,7 @@ if (doc_matters.opt.action.source) { } #+END_SRC -** copy :copy: +** copy :copy: #+NAME: source_pod_copy #+BEGIN_SRC d diff --git a/org/out_xmls.org b/org/out_xmls.org index db1b2a0..c76e44b 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -18,8 +18,8 @@ - [[./output_hub.org][output_hub]] * xml offspring (xhtml html epub) -** format xhtml objects :format: -*** _module template_ :module: +** format xhtml objects :format: +*** _module template_ :module: #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/xmls.d" module doc_reform.io_out.xmls; @@ -1524,7 +1524,7 @@ align="left|right|center" #+END_SRC * _html_ [#A] :html: -** _module template_ :module: +** _module template_ :module: #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/html.d" module doc_reform.io_out.html; @@ -1538,7 +1538,7 @@ template outputHTML() { } #+END_SRC -** scroll :scroll: +** scroll :scroll: *** ↻ loop & switch (sections & objects) format html output #+NAME: output_html_scroll @@ -1774,7 +1774,7 @@ template outputHTML() { } #+END_SRC -** seg :seg: +** seg :seg: *** ↻ loop & switch (sections & objects) format html output #+NAME: output_html_seg @@ -2116,7 +2116,7 @@ template outputHTML() { } #+END_SRC -** css :css: +** css :css: #+NAME: output_html_css #+BEGIN_SRC d @@ -2137,7 +2137,7 @@ template outputHTML() { } #+END_SRC -** images :images: +** images :images: #+NAME: copy_html_images #+BEGIN_SRC d @@ -2168,7 +2168,7 @@ template outputHTML() { } #+END_SRC -* _epub_ [#B] :epub: +* _epub_ [#B] :epub: |-----------------------+--------------------------+---------------------------+----------------------------------| | function | filename | module | variable | @@ -2186,7 +2186,7 @@ template outputHTML() { | | | | doc_epub3_endnotes[seg_filename] | |-----------------------+--------------------------+---------------------------+----------------------------------| -** _module template_ :module: +** _module template_ :module: #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/epub3.d" module doc_reform.io_out.epub3; @@ -2202,7 +2202,7 @@ template outputEPub3() { } #+END_SRC -** special (epub) files :format: +** special (epub) files :format: *** static **** _identify doc filetype_ (mimetype) [static] @@ -2530,7 +2530,7 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> } #+END_SRC -** the document contents :seg: +** the document contents :seg: *** ↻ loop & switch (sections & objects) format epub3 xhtml output #+NAME: output_epub3_xhtml_seg @@ -2888,7 +2888,7 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> } #+END_SRC -** write output files :write:zip: +** write output files :write:zip: #+NAME: output_epub3_xhtml_seg #+BEGIN_SRC d @@ -3084,7 +3084,7 @@ xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> } #+END_SRC -** zip debug, read zip archive :zip: +** zip debug, read zip archive :zip: #+NAME: output_epub3_xhtml_seg #+BEGIN_SRC d diff --git a/org/out_xmls_css.org b/org/out_xmls_css.org index fa06ebf..be358a6 100644 --- a/org/out_xmls_css.org +++ b/org/out_xmls_css.org @@ -17,7 +17,7 @@ - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] -* 0. output css defaults :module:spine:output_xmls_css: +* 0. output css defaults :module:spine:output_xmls_css: ** _module template_ #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/xmls_css.d" diff --git a/org/out_zip.org b/org/out_zip.org index d9f89a1..8a98638 100644 --- a/org/out_zip.org +++ b/org/out_zip.org @@ -16,7 +16,7 @@ - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] -* _zip_ :module:spine:create_zip_file: +* _zip_ :module:spine:create_zip_file: ** module template #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/create_zip_file.d" diff --git a/org/output_hub.org b/org/output_hub.org index 3e66b29..5116c7c 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -17,7 +17,7 @@ - [[./spine.org][spine]] [[./][org/]] * output hub [#A] -** _module template_ :module: +** _module template_ :module: #+BEGIN_SRC d :tangle "../src/doc_reform/io_out/hub.d" /++ @@ -79,7 +79,7 @@ import doc_reform.io_out, ** outputs *** files -**** source: _dr_src_ &/or _pod_ :source:pod: +**** source: _dr_src_ &/or _pod_ :source:pod: - [[./output_pod.org][output_pod]] #+NAME: output_scheduled_task @@ -102,7 +102,7 @@ if (sched == outTask.source_or_pod) { } #+END_SRC -**** epub :epub: +**** epub :epub: #+NAME: output_scheduled_task #+BEGIN_SRC d @@ -114,8 +114,8 @@ if (sched == outTask.epub) { } #+END_SRC -**** html :html: -***** metadata :metadata: +**** html :html: +***** metadata :metadata: #+NAME: output_scheduled_task #+BEGIN_SRC d @@ -125,7 +125,7 @@ if (sched == outTask.html_stuff) { } #+END_SRC -***** scroll :scroll: +***** scroll :scroll: #+NAME: output_scheduled_task #+BEGIN_SRC d @@ -137,7 +137,7 @@ if (sched == outTask.html_scroll) { } #+END_SRC -***** seg :seg: +***** seg :seg: #+NAME: output_scheduled_task #+BEGIN_SRC d @@ -149,7 +149,7 @@ if (sched == outTask.html_seg) { } #+END_SRC -***** css, images etc :css:images: +***** css, images etc :css:images: #+NAME: output_scheduled_task #+BEGIN_SRC d @@ -161,7 +161,7 @@ if (sched == outTask.html_stuff) { } #+END_SRC -**** latex / pdf :latex:pdf: +**** latex / pdf :latex:pdf: #+NAME: output_scheduled_task #+BEGIN_SRC d @@ -173,7 +173,7 @@ if (sched == outTask.latex) { } #+END_SRC -**** odf / odt :odf:odt: +**** odf / odt :odf:odt: #+NAME: output_scheduled_task #+BEGIN_SRC d @@ -185,7 +185,7 @@ if (sched == outTask.odt) { } #+END_SRC -**** sqlite discrete :sqlite: +**** sqlite discrete :sqlite: #+NAME: output_scheduled_task #+BEGIN_SRC d @@ -198,8 +198,8 @@ if (sched == outTask.sqlite) { #+END_SRC *** db:sql -**** sqlite collection :sqlite: -***** update / populate :update: +**** sqlite collection :sqlite: +***** update / populate :update: #+NAME: output_shared_sqlite_db #+BEGIN_SRC d @@ -217,7 +217,7 @@ if (doc_matters.opt.action.sqlite_update) { #+END_SRC ***** no markup source files to process -****** drop :drop: +****** drop :drop: #+NAME: output_options_op #+BEGIN_SRC d @@ -233,7 +233,7 @@ if ((opt_action.sqlite_db_drop)) { } #+END_SRC -****** create :create: +****** create :create: #+NAME: output_options_op #+BEGIN_SRC d diff --git a/org/output_show.org b/org/output_show.org index e473c92..ff33803 100644 --- a/org/output_show.org +++ b/org/output_show.org @@ -14,7 +14,7 @@ #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no -* document abstraction _summary_ :module:spine:metadoc_show_summary: +* document abstraction _summary_ :module:spine:metadoc_show_summary: ** _module template_ metadoc summary - document summary from abstraction @@ -526,7 +526,7 @@ import doc_reform.meta.rgx; #+END_SRC -*** initialize :report: +*** initialize :report: #+NAME: metadoc_show_initialize #+BEGIN_SRC d diff --git a/org/spine.org b/org/spine.org index bb2cb6e..ed575f0 100644 --- a/org/spine.org +++ b/org/spine.org @@ -241,7 +241,7 @@ import doc_reform.io_out.hub; #+END_SRC -***** spine__metadoc :spine: +***** spine metadoc :spine: #+NAME: imports_spine_metadoc #+BEGIN_SRC d diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index 1da132c..22e156e 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -17,22 +17,22 @@ [[./org/spine.org][spine.org]] [[./org/][org/]] * makefile :makefile: -** settings [+2] :settings: -*** git version stamp :git:version: +** settings [+2] :settings: +*** git version stamp :git:version: #+BEGIN_SRC makefile :tangle ../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'`) #+END_SRC -*** dub (build tool) :dub: +*** dub (build tool) :dub: #+BEGIN_SRC makefile :tangle ../makefile DUB=dub DUB_FLAGS=-v --force --compiler= #+END_SRC -*** Project Details :project:spine: +*** Project Details :project:spine: #+BEGIN_SRC makefile :tangle ../makefile PRG_NAME=doc-reform @@ -45,7 +45,7 @@ PRG_BINDIR=./bin PRG_DOCDIR=./docs #+END_SRC -*** Emacs Org settings :settings:emacs:org:tangle: +*** Emacs Org settings :settings:emacs:org:tangle: #+BEGIN_SRC makefile :tangle ../makefile EMACSLISP=/usr/share/emacs/site-lisp @@ -129,7 +129,7 @@ data/sisudir/media/text/un_contracts_international_sale_of_goods_convention_1980 data/sisudir/media/text/viral_spiral.david_bollier.sst #+END_SRC -** _make_ commands [+2] :make:commands: +** _make_ commands [+2] :make:commands: - build commands - build @@ -146,9 +146,9 @@ data/sisudir/media/text/viral_spiral.david_bollier.sst - git snapshot - gitsnapshot -*** build commands [+1] :build:compile: -**** _dub_ build rebuild :dub: -***** all compiler builds :all:dmd:gdc:ldc: +*** build commands [+1] :build:compile: +**** _dub_ build rebuild :dub: +***** all compiler builds :all:dmd:gdc:ldc: ****** all builds ******* default @@ -179,26 +179,26 @@ markup_dir_samples: find data/sisudir/media/text -name *.ss[tm] | sort #+END_SRC -******* quick :quick: -******** default :default: +******* quick :quick: +******** default :default: #+BEGIN_SRC makefile :tangle ../makefile all: dmd ldc gdc #+END_SRC -******** version :version: +******** version :version: #+BEGIN_SRC makefile :tangle ../makefile all_ver: dmd_ver ldc_ver gdc_ver #+END_SRC -******** debug :debug: +******** debug :debug: #+BEGIN_SRC makefile :tangle ../makefile all_debug: dmd_debug gdc_debug ldc_debug #+END_SRC -******** _meson_ build :meson: +******** _meson_ build :meson: meson using dub - works & looks pretty clean @@ -216,30 +216,30 @@ meson_project_build_clean: clean skel tangle dub_upgrade meson_build meson: meson_clean_build_dir dub_upgrade meson_build #+END_SRC -******* clean & tangle :clean:tangle: -******** default :default: +******* clean & tangle :clean:tangle: +******** default :default: #+BEGIN_SRC makefile :tangle ../makefile all_clean: clean tangle dmd ldc gdc #+END_SRC -******** version :version: +******** version :version: #+BEGIN_SRC makefile :tangle ../makefile all_ver_clean: clean tangle dmd_ver ldc_ver gdc_ver #+END_SRC -******** debug :debug: +******** debug :debug: #+BEGIN_SRC makefile :tangle ../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 #+END_SRC -***** individual compiler builds :each: -****** dmd :dmd: -******* quick :quick: -******** default :default: +***** individual compiler builds :each: +****** dmd :dmd: +******* quick :quick: +******** default :default: #+BEGIN_SRC makefile :tangle ../makefile dmd: dub_upgrade @@ -247,14 +247,14 @@ dmd: dub_upgrade notify-send -t 0 'D dmd compiled test release executable ready' 'spine-dmd' #+END_SRC -******** debug :debug: +******** debug :debug: #+BEGIN_SRC makefile :tangle ../makefile dmd_debug: $(DUB) --compiler=dmd --config=dmd -b debug #+END_SRC -******** version :version: +******** version :version: - assumes git tags with program version @@ -266,7 +266,7 @@ dmd_ver: dub_upgrade dmd_clean_ver: clean tangle dmd_ver #+END_SRC -******* clean & tangle :clean:tangle: +******* clean & tangle :clean:tangle: #+BEGIN_SRC makefile :tangle ../makefile dmd_rel: expunge skel tangle @@ -278,9 +278,9 @@ dmd_debug_tangle: tangle $(DUB) --compiler=dmd --config=spine-dmd-debug #+END_SRC -****** gdc :gdc: -******* quick :quick: -******** default :default: +****** gdc :gdc: +******* quick :quick: +******** default :default: #+BEGIN_SRC makefile :tangle ../makefile gdc: dub_upgrade @@ -288,14 +288,14 @@ gdc: dub_upgrade notify-send -t 0 'D gdc compiled test release executable ready' 'spine-gdc' #+END_SRC -******** debug :debug: +******** debug :debug: #+BEGIN_SRC makefile :tangle ../makefile gdc_debug: $(DUB) --compiler=gdc --config=gdc -b debug #+END_SRC -******** version :version: +******** version :version: - assumes git tags with program version @@ -307,7 +307,7 @@ gdc_ver: dub_upgrade gdc_clean_ver: clean tangle gdc_ver #+END_SRC -******* clean & tangle :clean:tangle: +******* clean & tangle :clean:tangle: #+BEGIN_SRC makefile :tangle ../makefile gdc_rel: expunge skel tangle @@ -319,9 +319,9 @@ gdc_debug_tangle: tangle $(DUB) --compiler=gdc --config=spine-gdc-debug #+END_SRC -****** ldc :ldc: -******* quick :quick: -******** default :default: +****** ldc :ldc: +******* quick :quick: +******** default :default: #+BEGIN_SRC makefile :tangle ../makefile ldc: dub_upgrade @@ -329,14 +329,14 @@ ldc: dub_upgrade notify-send -t 0 'D ldc compiled test release executable ready' 'spine-ldc' #+END_SRC -******** debug :debug: +******** debug :debug: #+BEGIN_SRC makefile :tangle ../makefile ldc_debug: $(DUB) --compiler=ldc2 --config=ldc -b debug #+END_SRC -******** version :version: +******** version :version: - assumes git tags with program version @@ -348,7 +348,7 @@ ldc_ver: dub_upgrade ldc_clean_ver: clean tangle ldc_ver #+END_SRC -******* clean & tangle :clean:tangle: +******* clean & tangle :clean:tangle: #+BEGIN_SRC makefile :tangle ../makefile ldc_rel: expunge skel tangle @@ -361,7 +361,7 @@ ldc_debug_tangle: tangle #+END_SRC ***** generic -****** init clean distclean etc. :clean: +****** init clean distclean etc. :clean: #+BEGIN_SRC makefile :tangle ../makefile reinit: clean skel tangle @@ -418,14 +418,14 @@ distclean_and_init: expunge mkdir -p $(PRG_BINDIR); #+END_SRC -****** version :version: +****** version :version: #+BEGIN_SRC makefile :tangle ../makefile ver: echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT) #+END_SRC -****** tangle build rebuild :clean:tangle:build: +****** tangle build rebuild :clean:tangle:build: #+BEGIN_SRC makefile :tangle ../makefile clean_tangle_build: clean tangle build @@ -793,7 +793,7 @@ ldc_testrun_filelist_dir_all: $(SiSU_MARKUP_SAMPLES_DIR) #+END_SRC -*** org babel tangle batch process command :tangle: +*** org babel tangle batch process command :tangle: **** tangle: org babel tangle *.org #+BEGIN_SRC makefile :tangle ../makefile @@ -847,7 +847,7 @@ gitsnapshot: distclean tangle git commit -a #+END_SRC -** phony :phony: +** phony :phony: #+BEGIN_SRC makefile :tangle ../makefile .PHONY : all build rebuild debug release \ @@ -857,7 +857,7 @@ gitsnapshot: distclean tangle * dub.sdl :dub:sdl:config: Every DUB package should contain a [[http://code.dlang.org/package-format?lang=json][dub.json]] (or [[http://code.dlang.org/package-format?lang=sdl][dub.sdl]]) -** header (including dependencies) :header: +** header (including dependencies) :header: #+BEGIN_SRC sh :tangle ../dub.sdl name "spine" @@ -980,8 +980,8 @@ configuration "gdc-version" { } #+END_SRC -*** generic :generic: -**** build (sdp) :release: +*** generic :generic: +**** build (sdp) :release: #+BEGIN_SRC sh configuration "build" { @@ -1197,7 +1197,7 @@ tmp/** #.reggae/** #+END_SRC -* sh script to batch process _emacs org babel tangle_ :shell_script:tangle: +* sh script to batch process _emacs org babel tangle_ :shell_script:tangle: [[http://orgmode.org/manual/Batch-execution.html]] creates a shell batch script called "tangle", that will tangle (emacs org babel tangle) org files in ./org/ to create .d source files in ./src/doc_reform/ @@ -1531,20 +1531,20 @@ time make tangle ldc time make ldc_testrun_find_pod_epub #+END_SRC -** dub zfunc :zfunc: -*** ,dubdmd :dmd: +** dub zfunc :zfunc: +*** ,dubdmd :dmd: #+BEGIN_SRC sh :tangle no time dub --compiler=dmd -v --force #+END_SRC -*** ,dubldc :ldc: +*** ,dubldc :ldc: #+BEGIN_SRC sh :tangle no time dub --compiler=ldc2 -v --force #+END_SRC -*** ,dubgdc :gdc: +*** ,dubgdc :gdc: #+BEGIN_SRC sh :tangle no time dub --compiler=gdc -v --force @@ -1605,7 +1605,7 @@ time make ldc_testrun_filelist_dir_pod [[http://wiki.dlang.org/Compilers][D Compilers wiki https://wiki.dlang.org/Compilers]] [[http://dlang.org/download.html][D Compilers download http://dlang.org/download.html]] -*** dub :dub: +*** dub :dub: https://github.com/dlang/dub/ http://code.dlang.org/getting_started |