#Does anyone have a good Markdown → Typst workflow nailed down??
18 messages · Page 1 of 1 (latest)
What kind of markdown data are we talking about?
I saw the issue on Markdown cross compilation (https://github.com/typst/typst/issues/127) and I guess the solution there was "check out Pandoc!"
Pretty simple text stuff! Nothing fancy!
Headers, lists, some links, etc
then there is no better solution then to use a template, pandoc, and a simple script
Looks like it's scripting time!
This might be more well suited to make a pandoc issue about... Really what I'd love is exactly their output but without the pandoc template for typst so I can use it with my own document styles / template
Aha! The answer is to omit the --standalone (-s) flag from Pandoc and then it results in exactly what I want!
Well, consider this one answered :)
@signal cape How are you including your own styles/templates in your workflow with pandoc?
(I ask because I used to use markdown → pandoc → LaTeX + styles → PDF, and now I use markdown → my own translation scripts → typst + styles → PDF. And I'd be pleased to lose my own translation scripts in time.)
@tough fossil Nothing fancy, just a simple shell script, but this is what I've got so far!
privacyPolicyTypst=$(pandoc webrecorder-privacy-policy.md -f markdown -t typst)
dataProcessingTypst=$(pandoc browsertrix-data-processing-addendum.md -f markdown -t typst)
# Concatinate & compile documents
{
cat documentstyle.typ
echo ""
echo "$privacyPolicyTypst"
echo ""
echo "#pagebreak()"
echo ""
echo "$dataProcessingTypst"
} | typst compile --font-path "../common/fonts" - TEMP/output.pdf
Using this to compile our privacy policy and other related legal docs into a single PDF along with the sales form
After each document I'll probably insert a section from another .typ file to sign the document
All of the document theming lives in documentstyle.typ and omitting the --standalone pandoc flag just gives me 1-1 Markdown -> Typst output
Has been working well so far, but still working on a few things like ensuring that headers and text breaks nicer so we aren't left with weird issues like this.... Unsure how possible this is RN
Thanks, @signal cape. Simple enough, as you say.
I suppose I should really just switch to writing in Typst, but the issue is the 15 years of Markdown files I sometimes go back to.