diff options
Diffstat (limited to 'src/sisudoc/spine.d')
| -rw-r--r-- | src/sisudoc/spine.d | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/sisudoc/spine.d b/src/sisudoc/spine.d index 0494a34..e42a5f1 100644 --- a/src/sisudoc/spine.d +++ b/src/sisudoc/spine.d @@ -177,6 +177,8 @@ string program_name = "spine"; "parallel" : false, "parallel-subprocesses" : false, "pdf" : false, + "typst" : false, + "typ" : false, "pdf-color-links" : false, "pdf-init" : false, "po4a-cfg" : false, @@ -288,7 +290,7 @@ string program_name = "spine"; "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"], @@ -307,7 +309,9 @@ string program_name = "spine"; "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"], @@ -578,7 +582,7 @@ Verifying: stdout.flush; exit(_loaded.loaded ? 0 : 1); } - 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"]; @@ -703,8 +707,17 @@ Verifying: @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; @@ -1060,6 +1073,7 @@ Verifying: 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; @@ -1077,6 +1091,7 @@ Verifying: || epub || odt || latex + || typst || manifest || sqlite_discrete || sqlite_delete @@ -1094,6 +1109,7 @@ Verifying: || html_seg || html_scroll || latex + || typst || odt || manifest || show_abstraction |
