diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2025-10-08 19:25:35 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2025-10-08 19:25:35 -0400 |
commit | e15ce8410bc0ce25bbb6140d3e16f4cff35cae5e (patch) | |
tree | ac61a03b407aa08a48a31b320a98332b086bc2ce /src/sisudoc | |
parent | text output, endnotes, add caller ocn (& some cleaning) (diff) |
latex quote object, quick fix
Diffstat (limited to 'src/sisudoc')
-rw-r--r-- | src/sisudoc/io_out/latex.d | 24 |
1 files changed, 22 insertions, 2 deletions
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); |