From ef2135e4fe16604b40956a2c345cdc0ae467b65c Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 24 Apr 2020 23:36:46 -0400 Subject: xmls, sqlite more with footnotes/endnotes --- org/out_cgi_search_sqlite.org | 9 ++---- org/out_sqlite.org | 70 +++++++------------------------------------ org/out_xmls_css.org | 18 +++-------- 3 files changed, 17 insertions(+), 80 deletions(-) (limited to 'org') diff --git a/org/out_cgi_search_sqlite.org b/org/out_cgi_search_sqlite.org index ec1878f..f9b90d0 100644 --- a/org/out_cgi_search_sqlite.org +++ b/org/out_cgi_search_sqlite.org @@ -1362,13 +1362,8 @@ string show_matched_objects (string fn) { line-height : 120%%%%; text-align : left; margin-right : 15mm; - } - p.endnote_indent { - font-size : 96%%%%; - line-height : 120%%%%; - text-align : left; - margin-left : 2em; - margin-right : 15mm; + padding-left : 1em; + text-indent : -1em; } p.center { text-align : center; diff --git a/org/out_sqlite.org b/org/out_sqlite.org index 77172e2..a35bcf1 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -510,15 +510,6 @@ string munge_html(M,O)( string _notes; string _urls; string _txt = _html_font_face(_html_special_characters(obj.text)); - if (_txt.matchFirst(rgx.inline_notes_al_gen)) { - foreach (m; _txt.matchAll(rgx.inline_notes_al_gen_text)) { - _notes ~= "\n" ~ m["text"]; - } - _txt = _txt.replaceAll(rgx.inline_notes_al_gen_ref, "$1 "); - } - if (_notes.length > 0) { - _txt ~= _notes; - } { /+ debug +/ if (doc_matters.opt.action.debug_do && doc_matters.opt.action.verbose) { @@ -732,11 +723,17 @@ string inline_notes_scroll(M,O)( string _txt, ) { if (obj.has.inline_notes_reg) { - // _txt = font_face(_txt); - _txt = _txt.replaceAll( - rgx.inline_notes_al_regular_number_note, - (" $1 ") - ); + string[] _endnotes; + foreach(m; _txt.matchAll(rgx.inline_notes_al_regular_number_note)) { + _endnotes ~= "

" + ~ "" ~ m.captures["num"] ~ "." + ~ m.captures["note"] + ~ "

"; + } + _txt = replaceAll!(m => + (" " ~ "" ~ m["num"] ~ "")) + (_txt, rgx.inline_notes_al_regular_number_note) + ~ _endnotes.join("\n"); } debug(markup_endnotes) { if (_txt.match(rgx.inline_notes_al_regular_number_note)) { @@ -752,51 +749,6 @@ string inline_notes_scroll(M,O)( } #+END_SRC -******** seg - -#+NAME: sanitize_and_munge_inline_html -#+BEGIN_SRC d -Tuple!(string, string[]) inline_notes_seg(M,O)( - M doc_matters, - const O obj, - string _txt, -) { - string[] _endnotes; - if (obj.has.inline_notes_reg) { - /+ need markup for text, and separated footnote +/ - foreach(m; _txt.matchAll(rgx.inline_notes_al_regular_number_note)) { - _endnotes ~= format( - "%s%s%s%s\n %s%s%s%s%s\n %s\n%s", - "

", - "", - " ", - m.captures[1], - ".", - m.captures[2], - "

" - ); - } - _txt = _txt.replaceAll( - rgx.inline_notes_al_regular_number_note, - (" $1 ") - ); - } else if (_txt.match(rgx.inline_notes_al_regular_number_note)) { - debug(markup) { - writeln(__LINE__, " endnote: ", obj.metainfo.is_a, ": ", obj.text); - } - } - Tuple!(string, string[]) t = tuple( - _txt, - _endnotes, - ); - return t; -} -#+END_SRC - ******* inline markup #+NAME: sanitize_and_munge_inline_html diff --git a/org/out_xmls_css.org b/org/out_xmls_css.org index 7e5ed46..fa06ebf 100644 --- a/org/out_xmls_css.org +++ b/org/out_xmls_css.org @@ -408,13 +408,8 @@ template spineCss() { line-height : 120%%; text-align : left; margin-right : 15mm; - } - p.endnote_indent { - font-size : 96%%; - line-height : 120%%; - text-align : left; - margin-left : 2em; - margin-right : 15mm; + padding-left : 1em; + text-indent : -1em; } p.center { text-align : center; @@ -1327,13 +1322,8 @@ Consider what if anything should be used here line-height : 120%%; text-align : left; margin-right : 15mm; - } - p.endnote_indent { - font-size : 96%%; - line-height : 120%%; - text-align : left; - margin-left : 2em; - margin-right : 15mm; + padding-left : 1em; + text-indent : -1em; } p.center { text-align : center; -- cgit v1.2.3