aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/latex.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-06-25 18:18:51 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-06-27 17:12:28 -0400
commit9125357297e005a555586c354be18ea03701d342 (patch)
tree0ee41623282ae0e886e227caabde551581d73518 /src/doc_reform/io_out/latex.d
parenthtml, bespoke homepage, symlink toc.html index.html (diff)
replace directory listing, blank index.html
Diffstat (limited to 'src/doc_reform/io_out/latex.d')
-rw-r--r--src/doc_reform/io_out/latex.d34
1 files changed, 23 insertions, 11 deletions
diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d
index 56ae9fe..231d0c5 100644
--- a/src/doc_reform/io_out/latex.d
+++ b/src/doc_reform/io_out/latex.d
@@ -1349,17 +1349,23 @@ template outputLaTeX() {
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
}
@@ -1399,8 +1405,14 @@ template outputLaTeXstyInit() {
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
}