template SiSUoutputXHTMLs() { struct SDPoutputXHTMLs { string _xhtml_anchor_tags(const(string[]) anchor_tags) { string tags=""; if (anchor_tags.length > 0) { foreach (tag; anchor_tags) { if (!(tag.empty)) { tags ~= ""; } } } return tags; } auto scroll_head(Me)( Me dochead_meta, ) { debug(asserts){ static assert(is(typeof(dochead_meta) == string[string][string])); } string o; o = format(q"¶ %s%s ¶", dochead_meta["title"]["full"], (dochead_meta["creator"]["author"].empty) ? "" : ", " ~ dochead_meta["creator"]["author"], ); return o; } auto seg_head(Me)( Me dochead_meta, ) { debug(asserts){ static assert(is(typeof(dochead_meta) == string[string][string])); } string o; o = format(q"¶ %s%s ¶", dochead_meta["title"]["full"], (dochead_meta["creator"]["author"].empty) ? "" : ", " ~ dochead_meta["creator"]["author"], ); return o; } auto tail() { string o; o = format(q"¶ ¶"); return o; } auto toc(O)( auto ref const O obj, ) { string o; o = format(q"¶

%s

¶", obj.is_a, obj.indent_hang, obj.indent_base, obj.text ); return o; } auto heading(O)( auto ref const O obj, ) { auto tags = _xhtml_anchor_tags(obj.anchor_tags); string o; if (obj.obj_cite_number.empty) { o = format(q"¶


%s %s
¶", obj.heading_lev_markup, obj.is_a, tags, obj.text, obj.heading_lev_markup, ); } else { o = format(q"¶


%s %s
¶", obj.obj_cite_number, obj.obj_cite_number, obj.heading_lev_markup, obj.is_a, obj.obj_cite_number, obj.obj_cite_number, tags, obj.text, obj.heading_lev_markup, ); } return o; } auto para(O)( auto ref const O obj, ) { auto tags = _xhtml_anchor_tags(obj.anchor_tags); string o; if (obj.obj_cite_number.empty) { o = format(q"¶

%s %s

¶", obj.is_a, obj.indent_hang, obj.indent_base, tags, obj.text ); } else { o = format(q"¶

%s %s

¶", obj.obj_cite_number, obj.obj_cite_number, obj.is_a, obj.indent_hang, obj.indent_base, obj.obj_cite_number, tags, obj.text ); } return o; } auto nugget(O)( auto ref const O obj, ) { string o; if (obj.obj_cite_number.empty) { o = format(q"¶

%s

¶", obj.is_a, obj.text ); } else { o = format(q"¶

%s

¶", obj.obj_cite_number, obj.obj_cite_number, obj.is_a, obj.obj_cite_number, obj.text ); } return o; } auto endnote(O)( auto ref const O obj, ) { string o; o = format(q"¶

%s

¶", obj.is_a, obj.indent_hang, obj.indent_base, obj.text ); return o; } auto code(O)( auto ref const O obj, ) { string o; if (obj.obj_cite_number.empty) { o = format(q"¶

%s

¶", obj.is_a, obj.text ); } else { o = format(q"¶

%s

¶", obj.obj_cite_number, obj.obj_cite_number, obj.is_a, obj.obj_cite_number, obj.text ); } return o; } } }