From 9125357297e005a555586c354be18ea03701d342 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 25 Jun 2023 18:18:51 -0400 Subject: replace directory listing, blank index.html --- org/out_latex.org | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'org/out_latex.org') diff --git a/org/out_latex.org b/org/out_latex.org index adab6e2..d1b6aff 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -203,17 +203,23 @@ void writeOutputLaTeX(T,M)( if (doc_matters.opt.action.vox_gt0) { writeln(" ", pth_latex.latex_file_with_path(paper_size_orientation)); } - auto f = File(pth_latex.latex_file_with_path(paper_size_orientation), "w"); - f.writeln(latex_content.head); - f.writeln(latex_content.content); - f.writeln(latex_content.tail); - foreach (image; doc_matters.srcs.image_list) { - string fn_src_in = doc_matters.src.image_dir_path ~ "/" ~ image; - string fn_src_out_file = pth_latex.latex_path_stuff ~ "/" ~ image; - if (exists(fn_src_in)) { - fn_src_in.copy(fn_src_out_file); + { + auto f = File(pth_latex.latex_file_with_path(paper_size_orientation), "w"); + f.writeln(latex_content.head); + f.writeln(latex_content.content); + f.writeln(latex_content.tail); + foreach (image; doc_matters.srcs.image_list) { + string fn_src_in = doc_matters.src.image_dir_path ~ "/" ~ image; + string fn_src_out_file = pth_latex.latex_path_stuff ~ "/" ~ image; + if (exists(fn_src_in)) { + fn_src_in.copy(fn_src_out_file); + } } } + if (!exists(pth_latex.latex_path_stuff ~ "/index.html")) { + auto f = File(pth_latex.latex_path_stuff ~"/index.html", "w"); + f.writeln(""); + } } catch (ErrnoException ex) { // handle error } @@ -272,8 +278,14 @@ void writeOutputLaTeXstyStatic( if (!exists(pth_latex.base_sty)) { (pth_latex.base_sty).mkdirRecurse; } - auto f = File(pth_latex.latex_document_header_sty(filename), "w"); - f.writeln(latex_sty); + { + auto f = File(pth_latex.latex_document_header_sty(filename), "w"); + f.writeln(latex_sty); + } + if (!exists(pth_latex.base_sty ~ "/index.html")) { + auto f = File(pth_latex.base_sty ~"/index.html", "w"); + f.writeln(""); + } } catch (ErrnoException ex) { // handle error } -- cgit v1.2.3