From 52049eb825cca32a2d2e6596fe5160b3f33ba74d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 24 Jan 2020 15:42:37 -0500 Subject: update headers and year --- org/out_odt.org | 139 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 70 insertions(+), 69 deletions(-) (limited to 'org/out_odt.org') diff --git a/org/out_odt.org b/org/out_odt.org index 224f303..c2ec6e0 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -4,14 +4,15 @@ #+FILETAGS: :spine:output:xml:odt: #+AUTHOR: Ralph Amissah #+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]] -#+COPYRIGHT: Copyright (C) 2015 - 2019 Ralph Amissah +#+COPYRIGHT: Copyright (C) 2015 - 2020 Ralph Amissah #+LANGUAGE: en -#+STARTUP: indent content hideblocks hidestars -#+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil _:nil -:t f:t *:t <:t -#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc -#+OPTIONS: author:nil email:nil creator:nil timestamp:nil -#+PROPERTY: header-args :results silent :padline no :exports code :cache no :noweb yes -#+EXPORT_SELECT_TAGS: export +#+STARTUP: content hideblocks hidestars noindent entitiespretty +#+PROPERTY: header-args :exports code +#+PROPERTY: header-args+ :noweb yes +#+PROPERTY: header-args+ :eval no +#+PROPERTY: header-args+ :results no +#+PROPERTY: header-args+ :cache no +#+PROPERTY: header-args+ :padline no - [[./spine.org][spine]] [[./][org/]] - [[./output_hub.org][output_hub]] @@ -87,7 +88,7 @@ template outputODT() { **** object attrib ***** tags -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _tags(O)(const O obj) { string _tags = ""; @@ -111,7 +112,7 @@ template outputODT() { ****** anchor tags -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _xhtml_anchor_tags(O)(O obj) { const(string[]) anchor_tags = obj.tags.anchor_tags; @@ -129,7 +130,7 @@ template outputODT() { ***** ocn object number display -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string obj_num(O)(const O obj) { // TODO string _on; @@ -145,8 +146,8 @@ template outputODT() { ***** footnotes -#+name: odt_format_objects -#+begin_src d +#+NAME: odt_format_objects +#+BEGIN_SRC d @safe string _footnotes()(string _txt) { static auto rgx = Rgx(); _txt = _txt.replaceAll( @@ -166,11 +167,11 @@ template outputODT() { ); return _txt; } -#+end_src +#+END_SRC ***** bullet -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _bullet(O)(const O obj) { string _b = ""; @@ -183,7 +184,7 @@ template outputODT() { ***** para (with bullet, indent levels, footnotes extracted) -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _indent(O)(string _txt, const O obj) { // TODO // if (obj.attrib.indent_base > 0 || @@ -297,7 +298,7 @@ template outputODT() { ***** block type -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _block_type_delimiters(O)(string[] _block_lines, const O obj) { // TODO string _block = ""; @@ -338,7 +339,7 @@ template outputODT() { ***** special characters -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _special_characters(O)(string _txt, const O obj) { _txt = _txt @@ -353,7 +354,7 @@ template outputODT() { ***** preserve white space -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _preserve_white_spaces(O)(string _txt, const O obj) { if (obj.metainfo.is_a == "code" || obj.metainfo.is_a == "verse" || obj.metainfo.is_a == "block") { @@ -366,7 +367,7 @@ template outputODT() { ***** font_face -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d string _font_face(string _txt){ _txt = _txt @@ -386,7 +387,7 @@ string _font_face(string _txt){ ***** object number -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe auto _obj_num(O)(O obj) { // NOT USED YET struct objNum { @@ -415,7 +416,7 @@ string _font_face(string _txt){ ***** break page -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _break_page()() { return format(q"┃ @@ -436,7 +437,7 @@ string _font_face(string _txt){ ***** empty lines break -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _empty_line_break(O)(string _txt, const O obj) { if (obj.metainfo.is_a == "code" || obj.metainfo.is_a == "verse" || obj.metainfo.is_a == "block") { @@ -449,7 +450,7 @@ string _font_face(string _txt){ ***** links: url, mail -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _links(O)(string _txt, const O obj) { if (obj.metainfo.is_a != "code") { @@ -495,7 +496,7 @@ string _font_face(string _txt){ ***** image -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string _images(O)(string _txt, const O obj) { if (_txt.match(rgx.inline_image)) { @@ -512,7 +513,7 @@ string _font_face(string _txt){ **** markup hub (including font face) -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string markup(O)(const O obj) { /+ markup TODO +/ @@ -534,7 +535,7 @@ string _font_face(string _txt){ **** para type ***** heading -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string heading(O,M)( const O obj, @@ -584,7 +585,7 @@ string _font_face(string _txt){ ***** para -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string para(O,M)( const O obj, @@ -610,7 +611,7 @@ string _font_face(string _txt){ **** block type ***** quote -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string quote(O,M)( const O obj, @@ -631,7 +632,7 @@ string _font_face(string _txt){ - preserves double newlines (paragraph delimiter) - the "group" delimiter is different from the "block" delimiter in that groups do not preserve whitespace, the "block" mark does -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string group(O,M)( const O obj, @@ -666,7 +667,7 @@ string _font_face(string _txt){ - "^[ ]"   - count number only at beginning of line and replace each -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string block(O,M)( const O obj, @@ -689,7 +690,7 @@ string _font_face(string _txt){ - preserves spaces - preserves newlines -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string verse(O,M)( const O obj, @@ -708,7 +709,7 @@ string _font_face(string _txt){ ***** code -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe string code(O,M)( const O obj, @@ -762,7 +763,7 @@ string _font_face(string _txt){ ***** table ****** tablarize -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d @safe Tuple!(string, string) tablarize(O)( const O obj, @@ -802,7 +803,7 @@ string _font_face(string _txt){ ****** table -#+name: odt_format_objects +#+NAME: odt_format_objects #+BEGIN_SRC d int _table_number = 0; @safe string table(O,M)( @@ -842,7 +843,7 @@ int _table_number = 0; ** write odt output :odf:odt:out: -#+name: output_odt +#+NAME: output_odt #+BEGIN_SRC d void writeOutputODT(W,I)( const W odt_content, @@ -931,7 +932,7 @@ void writeOutputODT(W,I)( ** odt output hub [#A] :odf:odt:out: -#+name: output_odt +#+NAME: output_odt #+BEGIN_SRC d void outputODT(D,I)( const D doc_abstraction, @@ -967,7 +968,7 @@ void outputODT(D,I)( ** shared *** output imports -#+name: output_imports +#+NAME: output_imports #+BEGIN_SRC d import doc_reform.io_out; import @@ -985,7 +986,7 @@ import *** make directory tree -#+name: output_odt_fixed_dirtree +#+NAME: output_odt_fixed_dirtree #+BEGIN_SRC d void dirtree(I)( I doc_matters, @@ -1009,7 +1010,7 @@ void dirtree(I)( ** fixed items *** mimetype :mimetype: -#+name: output_odt_fixed_mimetype +#+NAME: output_odt_fixed_mimetype #+BEGIN_SRC d @safe string mimetype() { string mimetype_ = format(q"┃application/vnd.oasis.opendocument.text┃"); @@ -1019,13 +1020,13 @@ void dirtree(I)( *** manifest.rdf :manifest_rdf: -#+name: output_odt_fixed_manifest_rdf +#+NAME: output_odt_fixed_manifest_rdf #+BEGIN_SRC d @safe string manifest_rdf() { string _manifest_rdf = format(q"┃ #+END_SRC -#+name: output_odt_fixed_manifest_rdf +#+NAME: output_odt_fixed_manifest_rdf #+BEGIN_SRC xml @@ -1046,7 +1047,7 @@ void dirtree(I)( #+END_SRC -#+name: output_odt_fixed_manifest_rdf +#+NAME: output_odt_fixed_manifest_rdf #+BEGIN_SRC d ┃"); return _manifest_rdf; @@ -1055,13 +1056,13 @@ void dirtree(I)( *** settings.xml :settings: -#+name: output_odt_fixed_settings_xml +#+NAME: output_odt_fixed_settings_xml #+BEGIN_SRC d @safe string settings_xml() { string _settings_xml = format(q"┃ #+END_SRC -#+name: output_odt_fixed_settings_xml +#+NAME: output_odt_fixed_settings_xml #+BEGIN_SRC xml @@ -1160,7 +1161,7 @@ void dirtree(I)( #+END_SRC -#+name: output_odt_fixed_settings_xml +#+NAME: output_odt_fixed_settings_xml #+BEGIN_SRC d ┃"); return _settings_xml; @@ -1169,13 +1170,13 @@ void dirtree(I)( *** styles.xml :styles_xml: -#+name: output_odt_fixed_styles_xml +#+NAME: output_odt_fixed_styles_xml #+BEGIN_SRC d @safe string styles_xml() { string _styles_xml = format(q"┃ #+END_SRC -#+name: output_odt_fixed_styles_xml +#+NAME: output_odt_fixed_styles_xml #+BEGIN_SRC xml @@ -2070,7 +2071,7 @@ void dirtree(I)( #+END_SRC -#+name: output_odt_fixed_styles_xml +#+NAME: output_odt_fixed_styles_xml #+BEGIN_SRC d ┃"); return _styles_xml; @@ -2082,7 +2083,7 @@ void dirtree(I)( **** content head ***** head open -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d @safe string odt_head(I)(I doc_matters) { string _has_tables = format(q"┃ @@ -2090,7 +2091,7 @@ void dirtree(I)( ***** if table include within head -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC xml @@ -2168,7 +2169,7 @@ void dirtree(I)( ***** head -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d ┃",); string _odt_head = format(q"┃ @@ -2176,7 +2177,7 @@ void dirtree(I)( ***** head xml -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC xml @@ -2209,7 +2210,7 @@ void dirtree(I)( ***** head close -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d ┃", (doc_matters.has.tables > 0) ? _has_tables : "", @@ -2221,7 +2222,7 @@ void dirtree(I)( **** ↻ content body ***** body open -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d @safe string odt_body(D,I)( const D doc_abstraction, @@ -2236,7 +2237,7 @@ void dirtree(I)( ***** ↻ the loop & outer switch (sections & objects) format output -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d foreach (part; doc_matters.has.keys_seq.scroll) { foreach (obj; doc_abstraction[part]) { @@ -2245,7 +2246,7 @@ void dirtree(I)( ****** frontmatter -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d case "frontmatter": assert(part == "head" || "toc"); switch (obj.metainfo.is_of_type) { @@ -2270,7 +2271,7 @@ void dirtree(I)( ****** body -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d case "body": assert(part == "body" || "head"); // surprise switch (obj.metainfo.is_of_type) { @@ -2321,7 +2322,7 @@ void dirtree(I)( ****** backmatter -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d case "backmatter": assert(part == "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb" || "tail"); @@ -2371,7 +2372,7 @@ void dirtree(I)( ***** closings & post loop -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d } } @@ -2382,13 +2383,13 @@ void dirtree(I)( **** content book index? -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d #+END_SRC **** content tail -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d @safe string odt_tail() { string _odt_tail = format(q"┃spine: <www.doc_reform.org> and <www.sisudoc.org> @@ -2399,7 +2400,7 @@ void dirtree(I)( **** hub -#+name: output_odt_variable_content_xml +#+NAME: output_odt_variable_content_xml #+BEGIN_SRC d @safe string content_xml(D,I)( const D doc_abstraction, @@ -2420,7 +2421,7 @@ void dirtree(I)( - META-INF/manifest.xml - image list changes -#+name: output_odt_variable_manifest_xml +#+NAME: output_odt_variable_manifest_xml #+BEGIN_SRC d @safe string manifest_xml(M)( auto ref M doc_matters, @@ -2433,7 +2434,7 @@ void dirtree(I)( string _manifest_xml = format(q"┃ #+END_SRC -#+name: output_odt_variable_manifest_xml +#+NAME: output_odt_variable_manifest_xml #+BEGIN_SRC xml @@ -2447,7 +2448,7 @@ void dirtree(I)( #+END_SRC -#+name: output_odt_variable_manifest_xml +#+NAME: output_odt_variable_manifest_xml #+BEGIN_SRC d ┃", _images.join("\n"), @@ -2458,7 +2459,7 @@ _images.join("\n"), *** meta.xml (time stamp) :meta_xml: -#+name: output_odt_variable_meta_xml +#+NAME: output_odt_variable_meta_xml #+BEGIN_SRC d @safe string meta_xml(M)( auto ref M doc_matters, @@ -2467,7 +2468,7 @@ _images.join("\n"), string _meta_xml = format(q"┃ #+END_SRC -#+name: output_odt_variable_meta_xml +#+NAME: output_odt_variable_meta_xml #+BEGIN_SRC xml @@ -2479,7 +2480,7 @@ _images.join("\n"), #+END_SRC -#+name: output_odt_variable_meta_xml +#+NAME: output_odt_variable_meta_xml #+BEGIN_SRC d ┃", doc_matters.generator_program.name_and_version, @@ -2492,7 +2493,7 @@ doc_matters.generated_time, *** copy images :images: -#+name: output_odt_variable_copy_odt_images +#+NAME: output_odt_variable_copy_odt_images #+BEGIN_SRC d @safe void images_cp(M)( auto ref M doc_matters, -- cgit v1.2.3