aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2025-10-08 19:25:35 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2025-10-08 19:25:35 -0400
commite15ce8410bc0ce25bbb6140d3e16f4cff35cae5e (patch)
treeac61a03b407aa08a48a31b320a98332b086bc2ce
parenttext output, endnotes, add caller ocn (& some cleaning) (diff)
latex quote object, quick fix
-rw-r--r--org/out_latex.org31
-rw-r--r--src/sisudoc/io_out/latex.d24
2 files changed, 51 insertions, 4 deletions
diff --git a/org/out_latex.org b/org/out_latex.org
index 84791d2..1d5336e 100644
--- a/org/out_latex.org
+++ b/org/out_latex.org
@@ -72,6 +72,7 @@ template outputLaTeX() {
<<Function_shared_para>>
<<Function_shared_bookindex>>
<<Function_shared_heading>>
+<<Function_shared_quote>>
<<Function_shared_group>>
<<Function_shared_block>>
<<Function_shared_verse>>
@@ -1562,6 +1563,30 @@ string bullets_and_indentation(O)(
#+END_SRC
*** grouped text
+**** quote
+
+#+NAME: Function_shared_quote
+#+BEGIN_SRC d
+ string quote(O,M)(
+ string _txt,
+ O obj,
+ M doc_matters,
+ ) {
+ if (obj.metainfo.is_a == "quote") {
+ string _tex_para;
+ _tex_para = q"┃\ocn{%s}\objBlockOpen
+"%s"
+\objBlockClose
+┃";
+ _txt = format(_tex_para,
+ obj.metainfo.object_number,
+ _txt.nbsp_char.footnotes.split(rgx.br_linebreaks_newlines).join("\\br\n").strip
+ ).strip;
+ }
+ return _txt;
+ }
+#+END_SRC
+
**** group
- (hardspace not honored) clear hardspace marker
@@ -1581,7 +1606,7 @@ string bullets_and_indentation(O)(
┃";
_txt = format(_tex_para,
obj.metainfo.object_number,
- _txt.footnotes.split(rgx.br_line_spaced).join("\\brl{1}").strip // provides more control (more noise, not as tidy)
+ _txt.footnotes.split(rgx.br_line_spaced).join(" \\brl{1} ").strip // provides more control (more noise, not as tidy)
// _txt.footnotes.split(rgx.br_line_spaced).join("") // this works using a line-space, looks tidy, keep ref.
).strip;
}
@@ -2228,7 +2253,9 @@ case "body": assert(part == "body" || "head"); // surprise
case "block":
switch (obj.metainfo.is_a) {
case "quote":
- goto default; // TODO
+ _txt = _txt.quote(obj, doc_matters)
+ .links_and_images(obj, doc_matters);
+ goto default;
case "group": /+ (hardspaces not honored) [remove any hardspace marker] +/
_txt = _txt.group(obj, doc_matters)
.links_and_images(obj, doc_matters);
diff --git a/src/sisudoc/io_out/latex.d b/src/sisudoc/io_out/latex.d
index 02e434e..96511c4 100644
--- a/src/sisudoc/io_out/latex.d
+++ b/src/sisudoc/io_out/latex.d
@@ -777,6 +777,24 @@ template outputLaTeX() {
}
return _txt.strip;
}
+ string quote(O,M)(
+ string _txt,
+ O obj,
+ M doc_matters,
+ ) {
+ if (obj.metainfo.is_a == "quote") {
+ string _tex_para;
+ _tex_para = q"┃\ocn{%s}\objBlockOpen
+"%s"
+\objBlockClose
+┃";
+ _txt = format(_tex_para,
+ obj.metainfo.object_number,
+ _txt.nbsp_char.footnotes.split(rgx.br_linebreaks_newlines).join("\\br\n").strip
+ ).strip;
+ }
+ return _txt;
+ }
string group(O,M)(
string _txt,
O obj,
@@ -790,7 +808,7 @@ template outputLaTeX() {
┃";
_txt = format(_tex_para,
obj.metainfo.object_number,
- _txt.footnotes.split(rgx.br_line_spaced).join("\\brl{1}").strip // provides more control (more noise, not as tidy)
+ _txt.footnotes.split(rgx.br_line_spaced).join(" \\brl{1} ").strip // provides more control (more noise, not as tidy)
// _txt.footnotes.split(rgx.br_line_spaced).join("") // this works using a line-space, looks tidy, keep ref.
).strip;
}
@@ -1207,7 +1225,9 @@ template outputLaTeX() {
case "block":
switch (obj.metainfo.is_a) {
case "quote":
- goto default; // TODO
+ _txt = _txt.quote(obj, doc_matters)
+ .links_and_images(obj, doc_matters);
+ goto default;
case "group": /+ (hardspaces not honored) [remove any hardspace marker] +/
_txt = _txt.group(obj, doc_matters)
.links_and_images(obj, doc_matters);