diff options
Diffstat (limited to 'org/output_hub.org')
| -rw-r--r-- | org/output_hub.org | 34 | 
1 files changed, 33 insertions, 1 deletions
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() {      <<output_shared_sqlite_db>>    }  } +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() {    <<output_imports>>    @system void outputHubOp(E,O,C)(E env, O opt_action, C config) { @@ -75,7 +93,6 @@ template outputHubOp() {      static auto rgx = RgxO();      <<output_options_op_sqlite_db_drop>>      <<output_options_op_sqlite_db_create>> -    <<output_options_op_cgi_search_form_codegen>>    }  }  #+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");  }  | 
