aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sisudoc/io_out/latex.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sisudoc/io_out/latex.d')
-rw-r--r--src/sisudoc/io_out/latex.d63
1 files changed, 39 insertions, 24 deletions
diff --git a/src/sisudoc/io_out/latex.d b/src/sisudoc/io_out/latex.d
index d26d502..96511c4 100644
--- a/src/sisudoc/io_out/latex.d
+++ b/src/sisudoc/io_out/latex.d
@@ -50,9 +50,8 @@
module sisudoc.io_out.latex;
@safe:
template paperLaTeX() {
- import
- std.format,
- std.conv : to;
+ import std.format;
+ import std.conv : to;
auto paperLaTeX() {
string mm(uint mmi) {
string _mm = format(q"┃%smm┃", mmi.to!string);
@@ -319,15 +318,13 @@ template paperLaTeX() {
}
}
template outputLaTeX() {
- import
- std.file,
- std.outbuffer,
- std.uri,
- std.conv : to;
- import
- sisudoc.io_out,
- sisudoc.io_out.rgx,
- sisudoc.io_out.rgx_latex;
+ import std.file;
+ import std.outbuffer;
+ import std.uri;
+ import std.conv : to;
+ import sisudoc.io_out;
+ import sisudoc.io_out.rgx;
+ import sisudoc.io_out.rgx_latex;
mixin spineRgxOut;
static auto rgx = RgxO();
mixin spineRgxLSC;
@@ -780,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,
@@ -793,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;
}
@@ -1210,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);
@@ -1297,7 +1314,7 @@ template outputLaTeX() {
default:
{ /+ debug +/
if (doc_matters.opt.action.debug_do_latex
- && doc_matters.opt.action.vox_gt1) {
+ && doc_matters.opt.action.vox_gt_2) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part);
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
@@ -1335,7 +1352,7 @@ template outputLaTeX() {
try {
{ /+ debug +/
if (doc_matters.opt.action.debug_do_latex
- && doc_matters.opt.action.vox_gt1) {
+ && doc_matters.opt.action.vox_gt_2) {
writeln(latex_content.head);
writeln(latex_content.content);
writeln(latex_content.tail);
@@ -1344,7 +1361,7 @@ template outputLaTeX() {
if (!exists(pth_latex.latex_path_stuff)) {
(pth_latex.latex_path_stuff).mkdirRecurse;
}
- if (doc_matters.opt.action.vox_gt0) {
+ if (doc_matters.opt.action.vox_gt_1) {
writeln(" ", pth_latex.latex_file_with_path(paper_size_orientation));
}
{
@@ -1411,7 +1428,7 @@ template outputLaTeX() {
string content;
string tail;
}
- auto latex = LaTeX();
+ LaTeX latex = LaTeX();
foreach (paper_size_orientation; doc_matters.conf_make_meta.conf.set_papersize) {
latex.head = latex_head(doc_matters, paper_size_orientation);
latex.content = latex_body(doc_abstraction, doc_matters, paper_size_orientation);
@@ -1487,9 +1504,8 @@ template outputLaTeXstyInit() {
}
}
template outputLaTeXstyStatic() {
- import
- std.format,
- std.conv : to;
+ import std.format;
+ import std.conv : to;
string outputLaTeXstyStatic(
bool generated_by,
string name_version_and_compiler,
@@ -1730,9 +1746,8 @@ template outputLaTeXstyStatic() {
}
}
template outputLaTeXstyPaperSizeAndOrientation() {
- import
- std.format,
- std.conv : to;
+ import std.format;
+ import std.conv : to;
auto outputLaTeXstyPaperSizeAndOrientation(P)(
P doc_sty_info,
bool generated_by,