From b157271169fe8cd896b54a89d28fd3b7c8768826 Mon Sep 17 00:00:00 2001
From: Ralph Amissah
Date: Mon, 8 Jul 2019 17:57:23 -0400
Subject: 0.7.5 xmls css code reorganised; ocn can turn off or hide
---
src/doc_reform/output/xmls.d | 96 ++++++++++++++++++++++++--------------------
1 file changed, 52 insertions(+), 44 deletions(-)
(limited to 'src/doc_reform/output/xmls.d')
diff --git a/src/doc_reform/output/xmls.d b/src/doc_reform/output/xmls.d
index 25733b1..de68d05 100644
--- a/src/doc_reform/output/xmls.d
+++ b/src/doc_reform/output/xmls.d
@@ -641,9 +641,10 @@ template outputXHTMLs() {
}
return bar();
}
- string heading(O)(
- string _txt,
- const O obj,
+ string heading(O,M)(
+ string _txt,
+ const O obj,
+ M doc_matters,
string _xml_type = "html",
) {
assert(obj.metainfo.is_of_part == "body" || "frontmatter" || "backmatter");
@@ -677,7 +678,7 @@ template outputXHTMLs() {
┃",
_horizontal_rule,
obj.metainfo.identifier,
- (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier,
+ (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier),
obj.metainfo.heading_lev_markup,
obj.metainfo.is_a,
obj.metainfo.identifier,
@@ -712,7 +713,7 @@ template outputXHTMLs() {
string _suffix = ".html",
) {
_txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix);
- string o = heading(_txt, obj);
+ string o = heading(_txt, obj, doc_matters);
return o;
}
auto heading_seg(O,M)(
@@ -725,16 +726,17 @@ template outputXHTMLs() {
auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type);
_txt = t[0];
string[] _endnotes = t[1];
- string o = heading(_txt, obj, _xml_type);
+ string o = heading(_txt, obj, doc_matters, _xml_type);
auto u = tuple(
o,
_endnotes,
);
return u;
}
- string para(O)(
- string _txt,
- const O obj,
+ string para(O,M)(
+ string _txt,
+ const O obj,
+ M doc_matters,
) {
assert(obj.metainfo.is_of_part == "body" || "frontmatter" || "backmatter");
assert(obj.metainfo.is_of_section == "body" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb");
@@ -754,7 +756,7 @@ template outputXHTMLs() {
┃",
obj.metainfo.identifier,
- (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier,
+ (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier),
obj.metainfo.is_a,
obj.attrib.indent_hang,
obj.attrib.indent_base,
@@ -784,7 +786,7 @@ template outputXHTMLs() {
string _suffix = ".html",
) {
_txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix);
- string o = para(_txt, obj);
+ string o = para(_txt, obj, doc_matters);
return o;
}
auto para_seg(O,M)(
@@ -797,16 +799,17 @@ template outputXHTMLs() {
auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type);
_txt = t[0].to!string;
string[] _endnotes = t[1];
- string o = para(_txt, obj);
+ string o = para(_txt, obj, doc_matters);
auto u = tuple(
o,
_endnotes,
);
return u;
}
- string quote(O)(
- string _txt,
- const O obj,
+ string quote(O,M)(
+ string _txt,
+ const O obj,
+ M doc_matters,
) {
assert(obj.metainfo.is_of_part == "body");
assert(obj.metainfo.is_of_section == "body" || "glossary" || "bibliography" || "bookindex" || "blurb");
@@ -822,7 +825,7 @@ template outputXHTMLs() {
┃",
obj.metainfo.identifier,
- (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier,
+ (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier),
obj.metainfo.is_a,
obj.metainfo.identifier,
_txt
@@ -846,7 +849,7 @@ template outputXHTMLs() {
string _suffix = ".html",
) {
_txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix);
- string o = quote(_txt, obj);
+ string o = quote(_txt, obj, doc_matters);
return o;
}
auto quote_seg(O,M)(
@@ -859,16 +862,17 @@ template outputXHTMLs() {
auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type);
_txt = t[0].to!string;
string[] _endnotes = t[1];
- string o = quote(_txt, obj);
+ string o = quote(_txt, obj, doc_matters);
auto u = tuple(
o,
_endnotes,
);
return u;
}
- string group(O)(
- string _txt,
- const O obj,
+ string group(O,M)(
+ string _txt,
+ const O obj,
+ M doc_matters,
) {
assert(obj.metainfo.is_of_part == "body");
assert(obj.metainfo.is_of_section == "body" || "glossary" || "bibliography" || "bookindex" || "blurb");
@@ -884,7 +888,7 @@ template outputXHTMLs() {
┃",
obj.metainfo.identifier,
- (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier,
+ (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier),
obj.metainfo.is_a,
obj.metainfo.identifier,
_txt
@@ -909,7 +913,7 @@ template outputXHTMLs() {
string _xml_type = "html",
) {
_txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix);
- string o = group(_txt, obj);
+ string o = group(_txt, obj, doc_matters);
return o;
}
auto group_seg(O,M)(
@@ -922,16 +926,17 @@ template outputXHTMLs() {
auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type);
_txt = t[0].to!string;
string[] _endnotes = t[1];
- string o = group(_txt, obj);
+ string o = group(_txt, obj, doc_matters);
auto u = tuple(
o,
_endnotes,
);
return u;
}
- string block(O)(
- string _txt,
- const O obj,
+ string block(O,M)(
+ string _txt,
+ const O obj,
+ M doc_matters,
) {
assert(obj.metainfo.is_of_part == "body");
assert(obj.metainfo.is_of_section == "body" || "glossary" || "bibliography" || "bookindex" || "blurb");
@@ -945,7 +950,7 @@ template outputXHTMLs() {
%s
┃",
obj.metainfo.identifier,
- (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier,
+ (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier),
obj.metainfo.is_a,
obj.metainfo.identifier,
_txt.stripRight
@@ -968,7 +973,7 @@ template outputXHTMLs() {
string _xml_type = "html",
) {
_txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix);
- string o = block(_txt, obj);
+ string o = block(_txt, obj, doc_matters);
return o;
}
auto block_seg(O,M)(
@@ -981,16 +986,17 @@ template outputXHTMLs() {
auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type);
_txt = t[0].to!string;
string[] _endnotes = t[1];
- string o = block(_txt, obj);
+ string o = block(_txt, obj, doc_matters);
auto u = tuple(
o,
_endnotes,
);
return u;
}
- string verse(O)(
- string _txt,
- const O obj,
+ string verse(O,M)(
+ string _txt,
+ const O obj,
+ M doc_matters,
) {
assert(obj.metainfo.is_of_part == "body");
assert(obj.metainfo.is_of_section == "body" || "glossary" || "bibliography" || "bookindex" || "blurb");
@@ -1004,7 +1010,7 @@ template outputXHTMLs() {
%s
┃",
obj.metainfo.identifier,
- (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier,
+ (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier),
obj.metainfo.is_a,
obj.metainfo.identifier,
_txt
@@ -1027,7 +1033,7 @@ template outputXHTMLs() {
string _xml_type = "html",
) {
_txt = inline_markup_scroll(_txt, obj, doc_matters, _suffix);
- string o = verse(_txt, obj);
+ string o = verse(_txt, obj, doc_matters);
return o;
}
auto verse_seg(O,M)(
@@ -1040,7 +1046,7 @@ template outputXHTMLs() {
auto t = inline_markup_seg(_txt, obj, doc_matters, _suffix, _xml_type);
_txt = t[0].to!string;
string[] _endnotes = t[1];
- string o = verse(_txt, obj);
+ string o = verse(_txt, obj, doc_matters);
auto u = tuple(
o,
_endnotes,
@@ -1080,9 +1086,10 @@ template outputXHTMLs() {
);
return t;
}
- string table(O)(
- string _txt,
- const O obj,
+ string table(O,M)(
+ string _txt,
+ const O obj,
+ M doc_matters,
) {
assert(obj.metainfo.is_of_part == "body");
assert(obj.metainfo.is_of_section == "body");
@@ -1104,7 +1111,7 @@ template outputXHTMLs() {
┃",
obj.metainfo.object_number,
- obj.metainfo.object_number,
+ (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier),
obj.metainfo.is_a,
obj.metainfo.object_number,
tags,
@@ -1113,9 +1120,10 @@ template outputXHTMLs() {
);
return o;
}
- string code(O)(
- string _txt,
- const O obj,
+ string code(O,M)(
+ string _txt,
+ const O obj,
+ M doc_matters,
) {
assert(obj.metainfo.is_of_part == "body");
assert(obj.metainfo.is_of_section == "body");
@@ -1128,7 +1136,7 @@ template outputXHTMLs() {
%s
┃",
obj.metainfo.identifier,
- (obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier,
+ (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier),
obj.metainfo.is_a,
obj.metainfo.identifier,
_txt
--
cgit v1.2.3