From 15d1dc27d81909b129a448ab343447180db8df38 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 30 Mar 2022 11:02:09 -0400 Subject: latex doc headers moved to .sty files in ./sty dir - some changes made, font selection included --- src/doc_reform/io_out/hub.d | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'src/doc_reform/io_out/hub.d') 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"); } } - } } -- cgit v1.2.3