aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/latex.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2021-09-09 12:58:16 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2021-09-09 22:52:34 -0400
commite8d88ac2fc2a05d29d9a24bd42ac3089deadc68b (patch)
treedc89b36453652971f1573f72ad94109985cffbb3 /src/doc_reform/io_out/latex.d
parentmetadata "curate" replaces "harvest" (diff)
org latex organize
Diffstat (limited to 'src/doc_reform/io_out/latex.d')
-rw-r--r--src/doc_reform/io_out/latex.d114
1 files changed, 59 insertions, 55 deletions
diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d
index bf047f9..811f32e 100644
--- a/src/doc_reform/io_out/latex.d
+++ b/src/doc_reform/io_out/latex.d
@@ -876,60 +876,60 @@ string table(O,M)(
urlcolor=myblue, %% \href{...}{...} external url
filecolor=mygreen, %% \href{...} local file
linkcolor=myred, %% \href{...} and \pageref{...}
- ┃",
- );
- string set_paper(P)(P paper_set,) {
- string paper_type_description;
- if (paper_set.is_portrait) {
- paper_type_description = format(q"┃
- \documentclass[%s,%s,titlepage]{scrartcl}
- \setlength{\textheight}{%s} \setlength{\textwidth}{%s}
- ┃",
- paper_set.font_size,
- paper_set.name,
- paper_set.height,
- paper_set.width,
- );
- } else {
- paper_type_description = format(q"┃
- \documentclass[%s,%s,landscape,titlepage,twocolumn]{scrartcl}
- \setlength{\textheight}{%s} \setlength{\textwidth}{%s}
- ┃",
- paper_set.font_size,
- paper_set.name,
- paper_set.height,
- paper_set.width,
- );
- }
- return paper_type_description;
- }
- string paper_size_orientation_latex;
- switch (paper_size_orientation) {
- case "a4.portrait": paper_size_orientation_latex = set_paper(paper.a4.portrait); break;
- case "a4.landscape": paper_size_orientation_latex = set_paper(paper.a4.landscape); break;
- case "a5.portrait": paper_size_orientation_latex = set_paper(paper.a5.portrait); break;
- case "a5.landscape": paper_size_orientation_latex = set_paper(paper.a5.landscape); break;
- case "b4.portrait": paper_size_orientation_latex = set_paper(paper.b4.portrait); break;
- case "b4.landscape": paper_size_orientation_latex = set_paper(paper.b4.landscape); break;
- case "letter.portrait": paper_size_orientation_latex = set_paper(paper.letter.portrait); break;
- case "letter.landscape": paper_size_orientation_latex = set_paper(paper.letter.landscape); break;
- case "legal.portrait": paper_size_orientation_latex = set_paper(paper.legal.portrait); break;
- case "legal.landscape": paper_size_orientation_latex = set_paper(paper.legal.landscape); break;
- default: paper_size_orientation_latex = paper_type_latex.a4_portrait;
- }
- string links_mono_or_color_set = links.mono.strip;
- if (
- (doc_matters.opt.action.latex_color_links)
- || (paper_size_orientation ==
- "a4.landscape" ||
- "a5.landscape" ||
- "b4.landscape" ||
- "letter.landscape" ||
- "legal.landscape")
- ){
- links_mono_or_color_set = links.color.strip;
+┃",
+ );
+ string set_paper(P)(P paper_set,) {
+ string paper_type_description;
+ if (paper_set.is_portrait) {
+ paper_type_description = format(q"┃
+\documentclass[%s,%s,titlepage]{scrartcl}
+\setlength{\textheight}{%s} \setlength{\textwidth}{%s}
+┃",
+ paper_set.font_size,
+ paper_set.name,
+ paper_set.height,
+ paper_set.width,
+ );
+ } else {
+ paper_type_description = format(q"┃
+\documentclass[%s,%s,landscape,titlepage,twocolumn]{scrartcl}
+\setlength{\textheight}{%s} \setlength{\textwidth}{%s}
+┃",
+ paper_set.font_size,
+ paper_set.name,
+ paper_set.height,
+ paper_set.width,
+ );
}
- string _latex_head = format(q"┃%%%% spine LaTeX output
+ return paper_type_description;
+ }
+ string paper_size_orientation_latex;
+ switch (paper_size_orientation) {
+ case "a4.portrait": paper_size_orientation_latex = set_paper(paper.a4.portrait); break;
+ case "a4.landscape": paper_size_orientation_latex = set_paper(paper.a4.landscape); break;
+ case "a5.portrait": paper_size_orientation_latex = set_paper(paper.a5.portrait); break;
+ case "a5.landscape": paper_size_orientation_latex = set_paper(paper.a5.landscape); break;
+ case "b4.portrait": paper_size_orientation_latex = set_paper(paper.b4.portrait); break;
+ case "b4.landscape": paper_size_orientation_latex = set_paper(paper.b4.landscape); break;
+ case "letter.portrait": paper_size_orientation_latex = set_paper(paper.letter.portrait); break;
+ case "letter.landscape": paper_size_orientation_latex = set_paper(paper.letter.landscape); break;
+ case "legal.portrait": paper_size_orientation_latex = set_paper(paper.legal.portrait); break;
+ case "legal.landscape": paper_size_orientation_latex = set_paper(paper.legal.landscape); break;
+ default: paper_size_orientation_latex = paper_type_latex.a4_portrait;
+ }
+ string links_mono_or_color_set = links.mono.strip;
+ if (
+ (doc_matters.opt.action.latex_color_links)
+ || (paper_size_orientation ==
+ "a4.landscape" ||
+ "a5.landscape" ||
+ "b4.landscape" ||
+ "letter.landscape" ||
+ "legal.landscape")
+ ){
+ links_mono_or_color_set = links.color.strip;
+ }
+ string _latex_head = format(q"┃%%%% spine LaTeX output
%%%% Generated by: %s
%%%% D version: %s
%%%% LaTeX output last Generated on: %s
@@ -941,7 +941,11 @@ string table(O,M)(
\setlength{\marginparsep}{4mm}
\setlength{\marginparwidth}{8mm}
%s
-\usepackage{polyglossia, ucs, fontspec, xltxtra, xunicode}
+\usepackage{polyglossia}
+\usepackage{ucs}
+\usepackage{fontspec}
+\usepackage{xltxtra}
+\usepackage{xunicode}
\setmainlanguage{%s}
\setotherlanguage{%s}
\setmainfont{Liberation Sans}
@@ -1346,7 +1350,7 @@ string table(O,M)(
string content;
string tail;
}
- auto latex = LaTeX();
+ auto 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);