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 --- org/output_hub.org | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'org/output_hub.org') diff --git a/org/output_hub.org b/org/output_hub.org index 7aa7fa3..11022cb 100644 --- a/org/output_hub.org +++ b/org/output_hub.org @@ -68,6 +68,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() { <> @system void outputHubOp(E,O,C)(E env, O opt_action, C config) { @@ -75,7 +93,6 @@ template outputHubOp() { static auto rgx = RgxO(); <> <> - <> } } #+END_SRC @@ -175,11 +192,26 @@ if (sched == outTask.html_stuff) { **** latex / pdf :latex:pdf: +- (unchanged) latex document headers (sty) need to be produced only once for a + given document set output directory path, but they are required + - this makes sure that the latex sty directory is produced with its doc header + .sty contents at least once for a latex output directory, it is not + subsequently modified however + - to initialize or update latex document header (sty) run --latex-init along + with the --latex command while providing the output directory + --output="[output path]" + #+NAME: output_scheduled_task_latex #+BEGIN_SRC d 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"); } -- cgit v1.2.3