aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/spine.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/spine.org')
-rw-r--r--org/spine.org24
1 files changed, 20 insertions, 4 deletions
diff --git a/org/spine.org b/org/spine.org
index 7c62cd0..13878e5 100644
--- a/org/spine.org
+++ b/org/spine.org
@@ -568,6 +568,8 @@ bool[string] opts = [
"parallel" : false,
"parallel-subprocesses" : false,
"pdf" : false,
+ "typst" : false,
+ "typ" : false,
"pdf-color-links" : false,
"pdf-init" : false,
"po4a-cfg" : false,
@@ -693,7 +695,7 @@ auto helpInfo = getopt(args,
"html-seg", "process html output", &opts["html-seg"],
"html-scroll", "process html output", &opts["html-scroll"],
"lang", "=[lang code e.g. =en or =en,es]", &settings["lang"],
- "latex", "latex output (for pdfs)", &opts["latex"],
+ "latex", "latex output (.tex, for further processing to a pdf)", &opts["latex"],
"latex-color-links", "mono or color links for pdfs", &opts["latex-color-links"],
"latex-init", "initialise latex shared files (see latex-header-sty)", &opts["latex-init"],
"latex-header-sty", "latex document header sty files", &opts["latex-header-sty"],
@@ -712,7 +714,9 @@ auto helpInfo = getopt(args,
"abstraction-source", "=/path/to/(.sst|pod|.ssp|.ocda.db) identify it, and load it if it is an abstraction", &settings["abstraction-source"],
"parallel", "parallelise document processing (opt-in; slower than serial)", &opts["parallel"],
"parallel-subprocesses", "nested parallelisation", &opts["parallel-subprocesses"],
- "pdf", "latex output for pdfs", &opts["pdf"],
+ "pdf", "pdf output (writes the .typ and compiles it with typst)", &opts["pdf"],
+ "typst", "typst output (.typ, for further processing to a pdf)", &opts["typst"],
+ "typ", "typst output (--typst)", &opts["typ"],
"pdf-color-links", "mono or color links for pdfs", &opts["pdf-color-links"],
"pdf-init", "initialise latex shared files (see latex-header-sty)", &opts["pdf-init"],
"po4a-cfg", "print the po4a configuration for this document", &opts["po4a-cfg"],
@@ -1009,7 +1013,7 @@ if (settings["abstraction-source"].length > 0) {
#+NAME: spine_args_get_options_aa2str
#+BEGIN_SRC d
-enum outTask { source_or_pod, sqlite, sqlite_multi, latex, odt, epub, html_scroll, html_seg, html_stuff, text, skel }
+enum outTask { source_or_pod, sqlite, sqlite_multi, latex, typst, odt, epub, html_scroll, html_seg, html_stuff, text, skel }
struct OptActions {
@trusted bool allow_downloads() {
return opts["allow-downloads"];
@@ -1134,8 +1138,17 @@ struct OptActions {
@trusted bool html_stuff() {
return (opts["html"] || opts["html-scroll"] || opts["html-seg"]) ? true : false;
}
+ /+ ↓ --pdf is produced via typst (it no longer writes latex: --latex writes .tex, --typst (--typ) writes .typ, and
+ --pdf writes .typ and compiles it.
+ +/
@trusted bool latex() {
- return (opts["latex"] || opts["pdf"]) ? true : false;
+ return opts["latex"];
+ }
+ @trusted bool typst() {
+ return (opts["typst"] || opts["typ"] || opts["pdf"]) ? true : false;
+ }
+ @trusted bool pdf() {
+ return opts["pdf"];
}
@trusted bool latex_color_links() {
return (opts["latex-color-links"] || opts["pdf-color-links"]) ? true : false;
@@ -1491,6 +1504,7 @@ struct OptActions {
if (html_stuff) schedule ~= outTask.html_stuff;
if (odt) schedule ~= outTask.odt;
if (latex) schedule ~= outTask.latex;
+ if (typst) schedule ~= outTask.typst;
if (text) schedule ~= outTask.text;
if (skel) schedule ~= outTask.skel;
return schedule.sort().uniq;
@@ -1508,6 +1522,7 @@ struct OptActions {
|| epub
|| odt
|| latex
+ || typst
|| manifest
|| sqlite_discrete
|| sqlite_delete
@@ -1525,6 +1540,7 @@ struct OptActions {
|| html_seg
|| html_scroll
|| latex
+ || typst
|| odt
|| manifest
|| show_abstraction