aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_abstract_doc_source.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-11-28 20:03:08 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:13 -0400
commit42942142d1379e7e5361a641f837beb54b23a2f1 (patch)
tree83ddd207debd3f854b6b5d2150807c9abd457c8a /src/sdp/ao_abstract_doc_source.d
parenthousekeeping (diff)
discrete objects marks, output html work in progress
Diffstat (limited to 'src/sdp/ao_abstract_doc_source.d')
-rw-r--r--src/sdp/ao_abstract_doc_source.d50
1 files changed, 24 insertions, 26 deletions
diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d
index 9bfa6cb..51089cd 100644
--- a/src/sdp/ao_abstract_doc_source.d
+++ b/src/sdp/ao_abstract_doc_source.d
@@ -651,7 +651,7 @@ template SiSUdocAbstraction() {
} /+ ← closed: loop markup document/text line by line +/
/+ ↓ post loop markup document/text +/
debug(objectrelated2) { // check
- writeln(line);
+ writeln(line);
}
/+
Backmatter:
@@ -814,7 +814,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["seg"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -831,7 +831,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["scroll"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -848,7 +848,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["seg"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -863,7 +863,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["scroll"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -880,7 +880,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["seg"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -895,7 +895,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["scroll"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -912,7 +912,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["seg"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -929,7 +929,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["scroll"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -946,7 +946,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["seg"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -961,7 +961,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["scroll"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -2677,7 +2677,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["scroll"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -2691,7 +2691,7 @@ template SiSUdocAbstraction() {
"base_position" : 0,
];
the_table_of_contents_section["scroll"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
"Table of Contents",
"", // attrib
@@ -2709,7 +2709,7 @@ template SiSUdocAbstraction() {
toc_txt_ = "{ Table of Contents }../toc.fn_suffix";
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["seg"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -2729,7 +2729,7 @@ template SiSUdocAbstraction() {
);
toc_txt_= munge.url_links(toc_txt_);
the_table_of_contents_section["seg"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -2750,7 +2750,7 @@ template SiSUdocAbstraction() {
"base_position" : to!int(obj_["lev_markup_number"]),
];
the_table_of_contents_section["seg"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -2772,7 +2772,7 @@ template SiSUdocAbstraction() {
"base_position" : to!int(obj_["lev_markup_number"]),
];
the_table_of_contents_section["seg"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
toc_txt_,
"", // attrib
@@ -3487,11 +3487,7 @@ template SiSUdocAbstraction() {
m.captures[2]); // sometimes need segment name (segmented html & epub)
}
// TODO NEXT you need anchor for segments at this point ->
- object_notes["seg"] ~=
- munge.url_links(
- "{^{" ~ m.captures[1] ~ ".}^}#noteref_" ~
- m.captures[1]
- ) ~ " " ~ m.captures[2] ~ "』";
+ object_notes["anchor"] ~= "#note_" ~ m.captures[1] ~ "』";
object_notes["seg"] ~= (segment_object_belongs_to.empty)
? (munge.url_links(
"{^{" ~ m.captures[1] ~ ".}^}#noteref_" ~
@@ -3517,9 +3513,11 @@ template SiSUdocAbstraction() {
if (object_notes.length > 1) {
endnotes_["seg"] = (split(object_notes["seg"], rgx.break_string))[0..$-1];
endnotes_["scroll"] = (split(object_notes["scroll"], rgx.break_string))[0..$-1];
+ endnotes_["anchor"] = (split(object_notes["anchor"], rgx.break_string))[0..$-1];
} else {
endnotes_["seg"] = [];
endnotes_["scroll"] = [];
+ endnotes_["anchor"] = [];
}
return endnotes_;
}
@@ -3609,15 +3607,15 @@ template SiSUdocAbstraction() {
1
);
}
- foreach (endnote; endnotes_["seg"]) {
+ foreach (i, endnote; endnotes_["seg"]) {
attrib="";
the_endnotes_section["seg"] ~=
- set_abstract_object.contents_endnote(endnote);
+ set_abstract_object.contents_endnote(endnote, endnotes_["anchor"][i]);
}
- foreach (endnote; endnotes_["scroll"]) {
+ foreach (i, endnote; endnotes_["scroll"]) {
attrib="";
the_endnotes_section["scroll"] ~=
- set_abstract_object.contents_endnote(endnote);
+ set_abstract_object.contents_endnote(endnote, endnotes_["anchor"][i]);
}
auto t = tuple(the_endnotes_section, obj_cite_number);
return t;