aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ao_abstract_doc_source.org
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 /org/ao_abstract_doc_source.org
parenthousekeeping (diff)
discrete objects marks, output html work in progress
Diffstat (limited to 'org/ao_abstract_doc_source.org')
-rw-r--r--org/ao_abstract_doc_source.org77
1 files changed, 51 insertions, 26 deletions
diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org
index b3c4cd6..690c029 100644
--- a/org/ao_abstract_doc_source.org
+++ b/org/ao_abstract_doc_source.org
@@ -842,7 +842,7 @@ if (the_document_body_section.length > 0) {
#+name: abs_post
#+BEGIN_SRC d
debug(objectrelated2) { // check
- writeln(line);
+ writeln(line);
}
/+
Backmatter:
@@ -1088,7 +1088,7 @@ if (the_endnotes_section["seg"].length > 1) {
);
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
@@ -1105,7 +1105,7 @@ if (the_endnotes_section["scroll"].length > 1) {
);
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
@@ -1122,7 +1122,7 @@ if (the_glossary_section.length > 1) {
);
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
@@ -1137,7 +1137,7 @@ if (the_glossary_section.length > 1) {
);
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
@@ -1154,7 +1154,7 @@ if (the_bibliography_section.length > 1){
);
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
@@ -1169,7 +1169,7 @@ if (the_bibliography_section.length > 1){
);
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
@@ -1186,7 +1186,7 @@ if (the_bookindex_section["seg"].length > 1) {
);
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
@@ -1203,7 +1203,7 @@ if (the_bookindex_section["scroll"].length > 1) {
);
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
@@ -1220,7 +1220,7 @@ if (the_blurb_section.length > 1) {
);
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
@@ -1235,7 +1235,7 @@ if (the_blurb_section.length > 1) {
);
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
@@ -3195,7 +3195,7 @@ struct ObjInlineMarkup {
);
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
@@ -3209,7 +3209,7 @@ struct ObjInlineMarkup {
"base_position" : 0,
];
the_table_of_contents_section["scroll"] ~=
- set_abstract_object.contents_para(
+ set_abstract_object.contents_toc(
"toc",
"Table of Contents",
"", // attrib
@@ -3227,7 +3227,7 @@ struct ObjInlineMarkup {
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
@@ -3247,7 +3247,7 @@ struct ObjInlineMarkup {
);
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
@@ -3268,7 +3268,7 @@ struct ObjInlineMarkup {
"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
@@ -3290,7 +3290,7 @@ struct ObjInlineMarkup {
"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
@@ -4182,11 +4182,7 @@ struct NotesSection {
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_" ~
@@ -4218,9 +4214,11 @@ struct NotesSection {
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_;
}
@@ -4316,15 +4314,15 @@ struct NotesSection {
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;
@@ -5066,12 +5064,38 @@ auto contents_para(
}
#+END_SRC
+*** toc :para:
+
+#+name: ao_object_setter_para
+#+BEGIN_SRC d
+auto contents_toc(
+ in string is_a,
+ in string object,
+ in string attrib,
+ in int obj_cite_number,
+ in int[string] indent,
+ in bool bullet
+) {
+ ObjComposite object_set;
+ object_set.use = "content";
+ object_set.of = "para";
+ object_set.is_a = "toc";
+ object_set.object = object.strip;
+ object_set.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
+ object_set.para_attrib.indent_start = to!int(indent["hang_position"]);
+ object_set.para_attrib.indent_rest = to!int(indent["base_position"]);
+ object_set.para_attrib.bullet = false; // bullet;
+ return object_set;
+}
+#+END_SRC
+
*** para_endnote :para:
#+name: ao_object_setter_endnote
#+BEGIN_SRC d
auto contents_endnote(
in string object,
+ in string tag,
) {
auto m = (matchFirst(object, rgx.note_ref));
string notenumber = to!string(m.captures[1]);
@@ -5082,6 +5106,7 @@ auto contents_endnote(
object_set.is_a = "endnote";
object_set.object = object.strip;
object_set.obj_cite_number = "";
+ object_set.anchor_tags ~= [ tag ];
object_set.para_attrib.indent_start = 0;
object_set.para_attrib.indent_rest = 0;
object_set.para_attrib.bullet = false;