From 42942142d1379e7e5361a641f837beb54b23a2f1 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 28 Nov 2016 20:03:08 -0500 Subject: discrete objects marks, output html work in progress --- org/output.org | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 108 insertions(+), 10 deletions(-) (limited to 'org/output.org') diff --git a/org/output.org b/org/output.org index d17020f..b77c2dd 100644 --- a/org/output.org +++ b/org/output.org @@ -31,7 +31,7 @@ auto html_heading(O)( o = format(q"¶


- + %s
@@ -39,6 +39,7 @@ auto html_heading(O)( obj.obj_cite_number, obj.obj_cite_number, obj.heading_attrib.lev_markup_number, + obj.is_a, obj.obj_cite_number, obj.obj_cite_number, obj.object, @@ -54,19 +55,111 @@ auto html_heading(O)( #+BEGIN_SRC d auto html_para(O)( auto ref const O obj, +) { + string o; + if (obj.obj_cite_number.empty) { + o = format(q"¶
+ +

+ %s +

+
+ ¶", + obj.obj_cite_number, + obj.obj_cite_number, + obj.is_a, + obj.para_attrib.indent_start, + obj.para_attrib.indent_rest, + obj.object + ); + } else { + o = format(q"¶
+ +

+ %s +

+
+ ¶", + obj.obj_cite_number, + obj.obj_cite_number, + obj.is_a, + obj.para_attrib.indent_start, + obj.para_attrib.indent_rest, + obj.obj_cite_number, + obj.object + ); + } + return o; +} +#+END_SRC + +***** html endnote + +#+name: output_html +#+BEGIN_SRC d +auto html_endnote(O)( + auto ref const O obj, +) { + string o; + o = format(q"¶
+ +

+ %s +

+
+ ¶", + obj.anchor_tags[0], + obj.anchor_tags[0], + obj.is_a, + obj.para_attrib.indent_start, + obj.para_attrib.indent_rest, + obj.object + ); + return o; +} +#+END_SRC + +***** html toc + +#+name: output_html +#+BEGIN_SRC d +auto html_toc(O)( + auto ref const O obj, +) { + string o; + o = format(q"¶
+

+ %s +

+
+ ¶", + obj.is_a, + obj.para_attrib.indent_start, + obj.para_attrib.indent_rest, + obj.object + ); + return o; +} +#+END_SRC + +***** html nugget + +#+name: output_html +#+BEGIN_SRC d +auto html_nugget(O)( + auto ref const O obj, ) { string o; o = format(q"¶
-

+

%s

¶", obj.obj_cite_number, obj.obj_cite_number, - obj.para_attrib.indent_start, - obj.para_attrib.indent_rest, + obj.is_a, obj.obj_cite_number, obj.object ); @@ -146,29 +239,34 @@ void scroll(C)( case "heading": body_html ~= html_heading(obj); break; + case "toc": + body_html ~= html_toc(obj); + break; case "para": body_html ~= html_para(obj); break; case "verse": - body_html ~= html_para(obj); + body_html ~= html_nugget(obj); break; case "group": - body_html ~= html_para(obj); + body_html ~= html_nugget(obj); break; case "block": - body_html ~= html_para(obj); + body_html ~= html_nugget(obj); break; case "quote": - body_html ~= html_para(obj); + body_html ~= html_nugget(obj); break; case "table": body_html ~= html_para(obj); break; case "code": - body_html ~= html_para(obj); + body_html ~= html_nugget(obj); + break; + case "endnote": + body_html ~= html_endnote(obj); break; default: - body_html ~= html_para(obj); break; } } -- cgit v1.2.3