diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2022-04-03 18:06:45 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2022-04-04 11:57:11 -0400 |
commit | 5bd8cbc86ab1236d4e891e0711e9a3623f0c51a7 (patch) | |
tree | 9dd42fb198d50d4cd6fa1582c965c2536f69efeb /org/out_latex.org | |
parent | latex doc headers moved to .sty files in ./sty dir (diff) |
generated-by header, latex, html, epub
- consider, implementation quite messy
Diffstat (limited to 'org/out_latex.org')
-rw-r--r-- | org/out_latex.org | 62 |
1 files changed, 41 insertions, 21 deletions
diff --git a/org/out_latex.org b/org/out_latex.org index 9b52a26..1999248 100644 --- a/org/out_latex.org +++ b/org/out_latex.org @@ -145,7 +145,11 @@ template outputLaTeXstyInit() { #+BEGIN_SRC d template outputLaTeXstyStatic() { <<Initialize_output_style>> - string outputLaTeXstyStatic() { + string outputLaTeXstyStatic( + bool generated_by, + string name_version_and_compiler, + string time_output_generated, + ) { <<FmtTxt_output_style_static_set>> return latex_sty; } @@ -158,7 +162,12 @@ template outputLaTeXstyStatic() { #+BEGIN_SRC d template outputLaTeXstyPaperSizeAndOrientation() { <<Initialize_output_style>> - auto outputLaTeXstyPaperSizeAndOrientation(P)(P doc_sty_info) { + auto outputLaTeXstyPaperSizeAndOrientation(P)( + P doc_sty_info, + bool generated_by, + string name_version_and_compiler, + string time_output_generated, + ) { <<FmtTxt_output_style_paper_dimensions_set>> return latex_sty; } @@ -273,38 +282,43 @@ void writeOutputLaTeXstyStatic( #+NAME: Function_output_stylesheets_get_each_written #+BEGIN_SRC d -void outputLaTeXstyInit()(string output_dir,) { - string latex_sty = outputLaTeXstyStatic!(); +void outputLaTeXstyInit()( + string output_dir, + bool generated_by, + string name_version_and_compiler, + string time_output_generated, +) { + string latex_sty = outputLaTeXstyStatic!()(generated_by, name_version_and_compiler, time_output_generated); latex_sty.writeOutputLaTeXstyStatic(output_dir, "spineShared.sty"); auto sty_a4p = paper.a4.portrait; - auto latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_a4p); + auto latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_a4p, generated_by, name_version_and_compiler, time_output_generated); latex_papersize_and_orientation.writeOutputLaTeXstyStatic(output_dir, sty_a4p.stylesheet ~ ".sty"); auto sty_a4l = paper.a4.landscape; - latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_a4l); + latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_a4l, generated_by, name_version_and_compiler, time_output_generated); latex_papersize_and_orientation.writeOutputLaTeXstyStatic(output_dir, sty_a4l.stylesheet ~ ".sty"); auto sty_b4p = paper.b4.portrait; - latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_b4p); + latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_b4p, generated_by, name_version_and_compiler, time_output_generated); latex_papersize_and_orientation.writeOutputLaTeXstyStatic(output_dir, sty_b4p.stylesheet ~ ".sty"); auto sty_b4l = paper.b4.landscape; - latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_b4l); + latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_b4l, generated_by, name_version_and_compiler, time_output_generated); latex_papersize_and_orientation.writeOutputLaTeXstyStatic(output_dir, sty_b4l.stylesheet ~ ".sty"); auto sty_a5p = paper.a5.portrait; - latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_a5p); + latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_a5p, generated_by, name_version_and_compiler, time_output_generated); latex_papersize_and_orientation.writeOutputLaTeXstyStatic(output_dir, sty_a5p.stylesheet ~ ".sty"); auto sty_a5l = paper.a5.landscape; - latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_a5l); + latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_a5l, generated_by, name_version_and_compiler, time_output_generated); latex_papersize_and_orientation.writeOutputLaTeXstyStatic(output_dir, sty_a5l.stylesheet ~ ".sty"); auto sty_letter_p = paper.letter.portrait; - latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_letter_p); + latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_letter_p, generated_by, name_version_and_compiler, time_output_generated); latex_papersize_and_orientation.writeOutputLaTeXstyStatic(output_dir, sty_letter_p.stylesheet ~ ".sty"); auto sty_letter_l = paper.letter.landscape; - latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_letter_l); + latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_letter_l, generated_by, name_version_and_compiler, time_output_generated); latex_papersize_and_orientation.writeOutputLaTeXstyStatic(output_dir, sty_letter_l.stylesheet ~ ".sty"); auto sty_legal_p = paper.legal.portrait; - latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_legal_p); + latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_legal_p, generated_by, name_version_and_compiler, time_output_generated); latex_papersize_and_orientation.writeOutputLaTeXstyStatic(output_dir, sty_legal_p.stylesheet ~ ".sty"); auto sty_legal_l = paper.legal.landscape; - latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_legal_l); + latex_papersize_and_orientation = outputLaTeXstyPaperSizeAndOrientation!()(sty_legal_l, generated_by, name_version_and_compiler, time_output_generated); latex_papersize_and_orientation.writeOutputLaTeXstyStatic(output_dir, sty_legal_l.stylesheet ~ ".sty"); } #+END_SRC @@ -313,7 +327,8 @@ void outputLaTeXstyInit()(string output_dir,) { #+NAME: FmtTxt_output_style_paper_dimensions_set #+BEGIN_SRC d - string latex_sty = format(q"┃%% - called by .tex document to set paper dimensions (size and orientation) + string latex_sty = format(q"┃%%%% spine LaTeX output%s%s +%% - called by .tex document to set paper dimensions (size and orientation) %% - calls spineShared.sty used/shared by all spine documents \ProvidesPackage{./sty/%s} \usepackage{geometry} @@ -326,6 +341,8 @@ void outputLaTeXstyInit()(string output_dir,) { bottom=%s, } \usepackage{./sty/spineShared}┃", + generated_by ? " " ~ name_version_and_compiler : "", + generated_by ? " (generated " ~ time_output_generated ~ ")" : "", doc_sty_info.stylesheet, doc_sty_info.papersize, doc_sty_info.orient, @@ -362,7 +379,8 @@ fonts to try: #+NAME: FmtTxt_output_style_static_set #+BEGIN_SRC latex - string latex_sty = format(q"┃%% - called by the .sty containing the paper dimensions (size and orientation) to be used + string latex_sty = format(q"┃%%%% spine LaTeX output%s%s +%% - called by the .sty containing the paper dimensions (size and orientation) to be used %% - spineShared.sty used by all spine documents (called indirectly) \ProvidesPackage{./sty/spineShared} \usepackage{multicol} @@ -588,7 +606,10 @@ fonts to try: %% \widowpenalty=300 %% \usepackage{atbegshi} %% http://ctan.org/pkg/atbegshi %% (BUG tmp FIX deal with problem, remove first page which is blank) %% \AtBeginDocument{\AtBeginShipoutNext{\AtBeginShipoutDiscard}} %% (BUG tmp FIX deal with problem, remove first page which is blank) -┃"); +┃", + generated_by ? " " ~ name_version_and_compiler : "", + generated_by ? " (generated " ~ time_output_generated ~ ")" : "", +); #+END_SRC * stuff @@ -2026,7 +2047,7 @@ if ( #+NAME: FmtTxtOpen_head_format_tex_set_start_latex_head #+BEGIN_SRC d -string _latex_head = format(q"┃%%%% spine LaTeX output%s%s%s +string _latex_head = format(q"┃%%%% spine LaTeX output%s%s #+END_SRC ***** description comment @@ -2067,9 +2088,8 @@ string _latex_head = format(q"┃%%%% spine LaTeX output%s%s%s #+NAME: FmtTxtClose_head_a_format_string_variables #+BEGIN_SRC d ┃", - doc_matters.opt.action.generated_by ? " " ~ doc_matters.generator_program.name_and_version.strip : "", - doc_matters.opt.action.generated_by ? " (" ~ doc_matters.generator_program.compiler.strip ~ ")" : "", - doc_matters.opt.action.generated_by ? " (LaTeX output last Generated on: " ~ doc_matters.generator_program.stime.strip ~ ")" : "", + doc_matters.opt.action.generated_by ? " " ~ doc_matters.generator_program.name_version_and_compiler : "", + doc_matters.opt.action.generated_by ? " (generated " ~ doc_matters.generator_program.time_output_generated ~ ")" : "", doc_matters.generator_program.project_name.strip, doc_matters.generator_program.url_home.strip, paper_size_orientation_latex.strip, |