aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/hub.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-03-30 11:02:09 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2022-04-03 18:13:53 -0400
commit15d1dc27d81909b129a448ab343447180db8df38 (patch)
tree03ae7fc7ca0ff5864e6836615b8f5b0860145a3f /src/doc_reform/io_out/hub.d
parentlatex head adjustments (diff)
latex doc headers moved to .sty files in ./sty dir
- some changes made, font selection included
Diffstat (limited to 'src/doc_reform/io_out/hub.d')
-rw-r--r--src/doc_reform/io_out/hub.d25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/doc_reform/io_out/hub.d b/src/doc_reform/io_out/hub.d
index 55dce8e..d0f5d3c 100644
--- a/src/doc_reform/io_out/hub.d
+++ b/src/doc_reform/io_out/hub.d
@@ -115,6 +115,12 @@ template outputHub() {
if (sched == outTask.latex) {
msg.v("latex processing... (available for downstream processing & pdf output");
import doc_reform.io_out.latex;
+ import std.file;
+ if ((isValidPath(doc_matters.output_path ~ "/latex/sty"))
+ && (!(exists(doc_matters.output_path ~ "/latex/sty")))
+ ) {
+ outputLaTeXstyInit!()(doc_matters.output_path);
+ }
outputLaTeX!()(doc_abstraction, doc_matters);
msg.vv("latex done");
}
@@ -157,6 +163,24 @@ template outputHub() {
}
}
}
+template outputHubInitialize() {
+ import doc_reform.io_out,
+ doc_reform.io_out.metadata,
+ doc_reform.io_out.paths_output;
+ @system void outputHubInitialize(O)(O opt_action) {
+ if (
+ opt_action.latex_document_header_sty
+ || (
+ opt_action.latex
+ && opt_action.output_dir_set.length > 0
+ && !(isValidPath(opt_action.output_dir_set ~ "/latex/sty")))
+ ) { // .sty need to be produced only once (if unchanged per output-dir of which there usually will be one)
+ import doc_reform.io_out.latex;
+ outputLaTeXstyInit!()(opt_action.output_dir_set);
+ }
+ writeln(opt_action.latex);
+ }
+}
template outputHubOp() {
import doc_reform.io_out,
doc_reform.io_out.metadata,
@@ -187,6 +211,5 @@ template outputHubOp() {
writeln("sqlite create table done");
}
}
-
}
}