diff options
Diffstat (limited to 'org/ocda_functions.org')
| -rw-r--r-- | org/ocda_functions.org | 58 |
1 files changed, 48 insertions, 10 deletions
diff --git a/org/ocda_functions.org b/org/ocda_functions.org index baae83e..0b997b7 100644 --- a/org/ocda_functions.org +++ b/org/ocda_functions.org @@ -9,7 +9,7 @@ #+STARTUP: content hideblocks hidestars noindent entitiespretty #+PROPERTY: header-args :noweb yes #+PROPERTY: header-args+ :exports code -#+PROPERTY: header-args+ :results no +#+PROPERTY: header-args+ :results output none #+PROPERTY: header-args+ :cache no #+PROPERTY: header-args+ :padline no #+PROPERTY: header-args+ :mkdirp yes @@ -2747,10 +2747,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_txt["munge"].strip; + obj_txt["munge"] = obj_[obj_key_].dup; + obj_txt["munge"] = (obj_["is"].match(ctRegex!(`verse|code`))) ? obj_txt["munge"] : obj_txt["munge"].strip; if (_new_doc) { anchor_tag = ""; } @@ -2769,8 +2767,8 @@ static struct ObjInlineMarkup { || (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": @@ -3553,8 +3551,8 @@ ubyte[32] obj_digest()( // ↓ - endnotes struct NotesSection { string[string] object_notes; - int previous_count; - int mkn; + int previous_count; + int mkn; static auto rgx = RgxI(); private auto gather_notes_for_endnote_section( ObjGenericComposite[] contents_am, @@ -4455,11 +4453,31 @@ ST_the_section build_the_blurb_section(Opt) ( int html_segnames_ptr_cntr, int html_segnames_ptr, ) { + string[string][string] notes_; + if (the_document_body_section.length > 1) { + string _notes; + foreach (ref obj; the_document_body_section) { + if (obj.has.inline_notes_reg) { + if ((obj.text).matchFirst(rgx.inline_notes_al_gen)) { + foreach (m; (obj.text).matchAll(rgx.inline_notes_al_regular_number_note)) { + _notes ~= "\n\n" ~ m["num"] ~ ". " ~ m["note"]; + notes_[(m["num"])]["ocn"] = obj.metainfo.ocn.to!string; + } + } + } + } + } if (the_document_endnotes_section.length > 1) { segnames["html"] ~= "endnotes"; segnames["epub"] ~= "endnotes"; html_segnames_ptr = html_segnames_ptr_cntr; foreach (ref obj; the_document_endnotes_section) { + auto matches = (obj.text).matchAll(rgx.endnote_section_note); + foreach (m; matches) { + obj.metainfo.parent_ocn = notes_[(m["notenumber"])]["ocn"].to!int; + } + } + foreach (ref obj; the_document_endnotes_section) { if (obj.metainfo.is_a == "heading") { obj.metainfo.parent_ocn = obj.metainfo.markedup_ancestors[obj.metainfo.parent_lev_markup]; } @@ -5652,12 +5670,32 @@ auto docSectKeysSeq(string[][string] document_section_keys_sequenced) { string[] latex() { return document_section_keys_sequenced["latex"]; } + string[] text() { + return document_section_keys_sequenced["text"]; + } } return doc_sect_keys_seq(); } #+END_SRC -* document header including copyright & license +* org includes +** project version + +#+NAME: spine_version +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>> +#+END_SRC + +** year + +#+NAME: year +#+HEADER: :noweb yes +#+BEGIN_SRC emacs-lisp +<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:year()>> +#+END_SRC + +** document header including copyright & license #+NAME: doc_header_including_copyright_and_license #+HEADER: :noweb yes |
