aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/out_latex.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/out_latex.org')
-rw-r--r--org/out_latex.org86
1 files changed, 63 insertions, 23 deletions
diff --git a/org/out_latex.org b/org/out_latex.org
index 9767286..1d5336e 100644
--- a/org/out_latex.org
+++ b/org/out_latex.org
@@ -9,7 +9,7 @@
#+STARTUP: content hideblocks hidestars noindent entitiespretty
#+PROPERTY: header-args :exports code
#+PROPERTY: header-args+ :noweb yes
-#+PROPERTY: header-args+ :results no
+#+PROPERTY: header-args+ :results output none
#+PROPERTY: header-args+ :cache no
#+PROPERTY: header-args+ :padline no
#+PROPERTY: header-args+ :mkdirp yes
@@ -41,9 +41,8 @@ module sisudoc.io_out.latex;
#+HEADER: :noweb yes
#+BEGIN_SRC d
template paperLaTeX() {
- import
- std.format,
- std.conv : to;
+ import std.format;
+ import std.conv : to;
auto paperLaTeX() {
<<Struct_shared_geometry_paper_dimensions>>
return PaperType();
@@ -73,6 +72,7 @@ template outputLaTeX() {
<<Function_shared_para>>
<<Function_shared_bookindex>>
<<Function_shared_heading>>
+<<Function_shared_quote>>
<<Function_shared_group>>
<<Function_shared_block>>
<<Function_shared_verse>>
@@ -192,7 +192,7 @@ void writeOutputLaTeX(T,M)(
try {
{ /+ debug +/
if (doc_matters.opt.action.debug_do_latex
- && doc_matters.opt.action.vox_gt1) {
+ && doc_matters.opt.action.vox_gt_2) {
writeln(latex_content.head);
writeln(latex_content.content);
writeln(latex_content.tail);
@@ -201,7 +201,7 @@ void writeOutputLaTeX(T,M)(
if (!exists(pth_latex.latex_path_stuff)) {
(pth_latex.latex_path_stuff).mkdirRecurse;
}
- if (doc_matters.opt.action.vox_gt0) {
+ if (doc_matters.opt.action.vox_gt_1) {
writeln(" ", pth_latex.latex_file_with_path(paper_size_orientation));
}
{
@@ -274,7 +274,7 @@ void outputLaTeX(D,M)(
string content;
string tail;
}
- auto latex = LaTeX();
+ LaTeX latex = LaTeX();
foreach (paper_size_orientation; doc_matters.conf_make_meta.conf.set_papersize) {
latex.head = latex_head(doc_matters, paper_size_orientation);
latex.content = latex_body(doc_abstraction, doc_matters, paper_size_orientation);
@@ -289,9 +289,8 @@ void outputLaTeX(D,M)(
#+NAME: Initialize_output_style
#+BEGIN_SRC d
-import
- std.format,
- std.conv : to;
+import std.format;
+import std.conv : to;
#+END_SRC
**** write latex styles output :latex:out:
@@ -663,15 +662,13 @@ fonts to try:
#+NAME: ImportsAndMixins_imports
#+BEGIN_SRC d
-import
- std.file,
- std.outbuffer,
- std.uri,
- std.conv : to;
-import
- sisudoc.io_out,
- sisudoc.io_out.rgx,
- sisudoc.io_out.rgx_latex;
+import std.file;
+import std.outbuffer;
+import std.uri;
+import std.conv : to;
+import sisudoc.io_out;
+import sisudoc.io_out.rgx;
+import sisudoc.io_out.rgx_latex;
mixin spineRgxOut;
static auto rgx = RgxO();
mixin spineRgxLSC;
@@ -1566,6 +1563,30 @@ string bullets_and_indentation(O)(
#+END_SRC
*** grouped text
+**** quote
+
+#+NAME: Function_shared_quote
+#+BEGIN_SRC d
+ string quote(O,M)(
+ string _txt,
+ O obj,
+ M doc_matters,
+ ) {
+ if (obj.metainfo.is_a == "quote") {
+ string _tex_para;
+ _tex_para = q"┃\ocn{%s}\objBlockOpen
+"%s"
+\objBlockClose
+┃";
+ _txt = format(_tex_para,
+ obj.metainfo.object_number,
+ _txt.nbsp_char.footnotes.split(rgx.br_linebreaks_newlines).join("\\br\n").strip
+ ).strip;
+ }
+ return _txt;
+ }
+#+END_SRC
+
**** group
- (hardspace not honored) clear hardspace marker
@@ -1585,7 +1606,7 @@ string bullets_and_indentation(O)(
┃";
_txt = format(_tex_para,
obj.metainfo.object_number,
- _txt.footnotes.split(rgx.br_line_spaced).join("\\brl{1}").strip // provides more control (more noise, not as tidy)
+ _txt.footnotes.split(rgx.br_line_spaced).join(" \\brl{1} ").strip // provides more control (more noise, not as tidy)
// _txt.footnotes.split(rgx.br_line_spaced).join("") // this works using a line-space, looks tidy, keep ref.
).strip;
}
@@ -2232,7 +2253,9 @@ case "body": assert(part == "body" || "head"); // surprise
case "block":
switch (obj.metainfo.is_a) {
case "quote":
- goto default; // TODO
+ _txt = _txt.quote(obj, doc_matters)
+ .links_and_images(obj, doc_matters);
+ goto default;
case "group": /+ (hardspaces not honored) [remove any hardspace marker] +/
_txt = _txt.group(obj, doc_matters)
.links_and_images(obj, doc_matters);
@@ -2331,7 +2354,7 @@ case "backmatter":
default:
{ /+ debug +/
if (doc_matters.opt.action.debug_do_latex
- && doc_matters.opt.action.vox_gt1) {
+ && doc_matters.opt.action.vox_gt_2) {
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_of_part);
writeln(__FILE__, ":", __LINE__, ": ", obj.metainfo.is_a);
writeln(__FILE__, ":", __LINE__, ": ", obj.text);
@@ -2401,7 +2424,24 @@ string _latex_tail = format(q"┃
}
#+END_SRC
-* document header including copyright & license
+* org includes
+** project version
+
+#+NAME: spine_version
+#+HEADER: :noweb yes
+#+BEGIN_SRC emacs-lisp
+<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>>
+#+END_SRC
+
+** year
+
+#+NAME: year
+#+HEADER: :noweb yes
+#+BEGIN_SRC emacs-lisp
+<<./sisudoc_spine_version_info_and_doc_header_including_copyright_and_license.org:year()>>
+#+END_SRC
+
+** document header including copyright & license
#+NAME: doc_header_including_copyright_and_license
#+HEADER: :noweb yes