aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/output.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/output.org')
-rw-r--r--org/output.org105
1 files changed, 75 insertions, 30 deletions
diff --git a/org/output.org b/org/output.org
index 976fcdd..eae453a 100644
--- a/org/output.org
+++ b/org/output.org
@@ -150,7 +150,7 @@ auto html_para(O)(
if (obj.obj_cite_number.empty) {
o = format(q"¶ <div class="substance">
<label class="ocn"><a href="#%s" class="lnkocn">%s</a></label>
- <p class="%s" attrib="h%si%s">%s
+ <p class="%s" indent="h%si%s">%s
%s
</p>
</div>¶",
@@ -165,7 +165,7 @@ auto html_para(O)(
} else {
o = format(q"¶ <div class="substance">
<label class="ocn"><a href="#%s" class="lnkocn">%s</a></label>
- <p class="%s" attrib="h%si%s" id="%s">%s
+ <p class="%s" indent="h%si%s" id="%s">%s
%s
</p>
</div>¶",
@@ -253,7 +253,7 @@ auto html_toc(O)(
) {
string o;
o = format(q"¶ <div class="substance">
- <p class="%s" attrib="h%si%s">
+ <p class="%s" indent="h%si%s">
%s
</p>
</div>¶",
@@ -274,7 +274,7 @@ auto html_endnote(O)(
auto ref const O obj,
) {
string o;
- o = format(q"¶ <p class="%s" attrib="h%si%s">
+ o = format(q"¶ <p class="%s" indent="h%si%s">
%s
</p>¶",
obj.is_a,
@@ -319,39 +319,84 @@ void scroll(C)(
string[] doc;
foreach (part; document_section_keys_sequenced["scroll"]) {
foreach (obj; contents[part]) {
- if (obj.use == "content") {
- switch (obj.is_a) {
- case "heading":
- body_html ~= html_heading(obj);
- break;
- case "toc":
- body_html ~= html_toc(obj);
- break;
+ if (obj.use == "body") {
+ switch (obj.is_of) {
case "para":
- body_html ~= html_para(obj);
- break;
- case "verse":
- body_html ~= html_nugget(obj);
- break;
- case "group":
- body_html ~= html_nugget(obj);
+ switch (obj.is_a) {
+ case "heading":
+ body_html ~= html_heading(obj);
+ break;
+ case "toc":
+ body_html ~= html_toc(obj);
+ break;
+ case "para":
+ body_html ~= html_para(obj);
+ break;
+ default:
+ writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ break;
+ }
break;
case "block":
- body_html ~= html_nugget(obj);
- break;
- case "quote":
- body_html ~= html_nugget(obj);
+ switch (obj.is_a) {
+ case "poem":
+ break;
+ case "verse":
+ body_html ~= html_nugget(obj);
+ break;
+ case "group":
+ body_html ~= html_nugget(obj);
+ break;
+ case "block":
+ body_html ~= html_nugget(obj);
+ break;
+ case "quote":
+ body_html ~= html_nugget(obj);
+ break;
+ case "table":
+ body_html ~= html_para(obj); //
+ break;
+ case "code":
+ body_html ~= html_nugget(obj);
+ break;
+ default:
+ writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ break;
+ }
break;
- case "table":
- body_html ~= html_para(obj);
- break;
- case "code":
- body_html ~= html_nugget(obj);
+ default:
+ writeln(__FILE__, ":", __LINE__, ": ", obj.is_of);
break;
- case "endnote":
- body_html ~= html_endnote(obj);
+ }
+ } else if (obj.use == "backmatter") {
+ switch (obj.is_of) {
+ case "para":
+ switch (obj.is_a) {
+ case "heading":
+ body_html ~= html_heading(obj);
+ break;
+ case "endnote":
+ body_html ~= html_endnote(obj);
+ break;
+ case "glossary":
+ body_html ~= html_para(obj);
+ break;
+ case "bibliography":
+ body_html ~= html_para(obj);
+ break;
+ case "bookindex":
+ body_html ~= html_para(obj);
+ break;
+ case "blurb":
+ body_html ~= html_para(obj);
+ break;
+ default:
+ writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
+ break;
+ }
break;
default:
+ writeln(__FILE__, ":", __LINE__, ": ", obj.is_a);
break;
}
}