From 08a374929fdfd11b2546636a9151518491457f18 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 28 Sep 2018 17:05:34 -0400 Subject: output xmls & sqlite, make doc_matter available --- src/doc_reform/output/html.d | 74 ++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'src/doc_reform/output/html.d') diff --git a/src/doc_reform/output/html.d b/src/doc_reform/output/html.d index 5d5ccb5..bad29db 100644 --- a/src/doc_reform/output/html.d +++ b/src/doc_reform/output/html.d @@ -12,9 +12,9 @@ template outputHTML() { doc_reform.output.xmls, doc_reform.output.xmls_css; mixin outputXHTMLs; - void scroll(D,I)( - const D doc_abstraction, - I doc_matters, + void scroll(D,M)( + const D doc_abstraction, + M doc_matters, ) { mixin DocReformOutputRgxInit; auto xhtml_format = outputXHTMLs(); @@ -34,10 +34,10 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(doc_matters, obj, _txt, suffix); break; case "toc": - doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix); + doc_html ~= xhtml_format.para_scroll(doc_matters, obj, _txt, suffix); break; default: if ((doc_matters.opt.action.debug_do)) { @@ -58,10 +58,10 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(doc_matters, obj, _txt, suffix); break; case "para": - doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix); + doc_html ~= xhtml_format.para_scroll(doc_matters, obj, _txt, suffix); break; default: if ((doc_matters.opt.action.debug_do)) { @@ -73,24 +73,24 @@ template outputHTML() { case "block": switch (obj.metainfo.is_a) { case "quote": - doc_html ~= xhtml_format.quote_scroll(obj, _txt); + doc_html ~= xhtml_format.quote_scroll(doc_matters, obj, _txt); break; case "group": - doc_html ~= xhtml_format.group_scroll(obj, _txt); + doc_html ~= xhtml_format.group_scroll(doc_matters, obj, _txt); break; case "block": - doc_html ~= xhtml_format.block_scroll(obj, _txt); + doc_html ~= xhtml_format.block_scroll(doc_matters, obj, _txt); break; case "poem": break; case "verse": - doc_html ~= xhtml_format.verse_scroll(obj, _txt, suffix); + doc_html ~= xhtml_format.verse_scroll(doc_matters, obj, _txt, suffix); break; case "code": - doc_html ~= xhtml_format.code(obj, _txt); + doc_html ~= xhtml_format.code(doc_matters, obj, _txt); break; case "table": - doc_html ~= xhtml_format.table(obj, _txt); + doc_html ~= xhtml_format.table(doc_matters, obj, _txt); break; default: if ((doc_matters.opt.action.debug_do)) { @@ -112,22 +112,22 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "heading": - doc_html ~= delimit ~ xhtml_format.heading_scroll(obj, _txt, suffix); + doc_html ~= delimit ~ xhtml_format.heading_scroll(doc_matters, obj, _txt, suffix); break; case "endnote": assert(part == "endnotes"); - doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix); + doc_html ~= xhtml_format.para_scroll(doc_matters, obj, _txt, suffix); break; case "glossary": assert(part == "glossary"); - doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix); + doc_html ~= xhtml_format.para_scroll(doc_matters, obj, _txt, suffix); break; case "bibliography": assert(part == "bibliography"); - doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix); + doc_html ~= xhtml_format.para_scroll(doc_matters, obj, _txt, suffix); break; case "bookindex": assert(part == "bookindex_scroll"); - doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix); + doc_html ~= xhtml_format.para_scroll(doc_matters, obj, _txt, suffix); break; case "blurb": assert(part == "blurb"); - doc_html ~= xhtml_format.para_scroll(obj, _txt, suffix); + doc_html ~= xhtml_format.para_scroll(doc_matters, obj, _txt, suffix); break; default: if ((doc_matters.opt.action.debug_do)) { @@ -226,7 +226,7 @@ template outputHTML() { top_level_headings[3] = ""; goto default; default: - auto t = xhtml_format.heading_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.heading_seg(doc_matters, obj, _txt, suffix, "seg"); top_level_headings[obj.metainfo.heading_lev_markup] = t[0]; break; } @@ -234,19 +234,19 @@ template outputHTML() { case 4: segment_filename = obj.tags.segment_anchor_tag; doc_html[segment_filename] ~= xhtml_format.html_head(doc_matters, "seg"); - auto navigation_bar = xhtml_format.nav_pre_next_svg(obj); + auto navigation_bar = xhtml_format.nav_pre_next_svg(doc_matters, obj); doc_html[segment_filename] ~= navigation_bar.toc_pre_next; previous_seg_filename = segment_filename; foreach (top_level_heading; top_level_headings) { doc_html[segment_filename] ~= top_level_heading; } - auto t = xhtml_format.heading_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.heading_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; - doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(obj); + doc_html[segment_filename] ~= xhtml_format.lev4_heading_subtoc(doc_matters, obj); doc_html_endnotes[segment_filename] ~= t[1]; break; case 5: .. case 7: - auto t = xhtml_format.heading_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.heading_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; @@ -270,7 +270,7 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "toc": - auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; break; default: @@ -292,7 +292,7 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "para": - auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; @@ -306,32 +306,32 @@ template outputHTML() { case "block": switch (obj.metainfo.is_a) { case "quote": - auto t = xhtml_format.quote_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.quote_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case "group": - auto t = xhtml_format.group_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.group_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case "block": - auto t = xhtml_format.block_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.block_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case "poem": break; case "verse": - auto t = xhtml_format.verse_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.verse_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0].to!string; doc_html_endnotes[segment_filename] ~= t[1]; break; case "code": - doc_html[segment_filename] ~= xhtml_format.code(obj, _txt); + doc_html[segment_filename] ~= xhtml_format.code(doc_matters, obj, _txt); break; case "table": - doc_html[segment_filename] ~= xhtml_format.table(obj, _txt); + doc_html[segment_filename] ~= xhtml_format.table(doc_matters, obj, _txt); doc_html_endnotes[segment_filename] ~= ""; break; default: @@ -354,26 +354,26 @@ template outputHTML() { case "para": switch (obj.metainfo.is_a) { case "endnote": assert(part == "endnotes"); - auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0]; break; case "glossary": assert(part == "glossary"); - auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bibliography": assert(part == "bibliography"); - auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "bookindex": assert(part == "bookindex_seg"); - auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; case "blurb": assert(part == "blurb"); - auto t = xhtml_format.para_seg(obj, _txt, suffix, "seg"); + auto t = xhtml_format.para_seg(doc_matters, obj, _txt, suffix, "seg"); doc_html[segment_filename] ~= t[0]; doc_html_endnotes[segment_filename] ~= t[1]; break; -- cgit v1.2.3