aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/hub.d
diff options
context:
space:
mode:
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");
}
}
-
}
}