Pandoc Templates
pandoc-templates.org
pandoc-templates.org
At the time I'd not got round to understanding the yaml front matter etc. I even user Zettlr for a while [0].
I then discovered quarto [1] and this changed everything. Much nicer experience. I used this for my masters papers.
I think the tooling around pandoc is what makes it such a good tool. I remember attempting restructured text and latex and having a right hard time.
I don't even know what magic buttons I need to push to get that template to correctly inherit the table format I wanted from pandoc, but it does. I tend to have other scripts though for more complicated tables though. So if I want a table to have a certain row highlighted a different color, I would write a Powershell script to run after the table was generated.
I was never able to figure out how to use LibreOffice to insert the table of contents and then export to PDF (although I can do it via the GUI).
Quarto is my documentation tool.
For me, they are both massively used, but cover different usages.
I keep thinking that modern text editors are just flawed and markdown, with all its downsides and limitations, is what 99% is the people need.
I mean, they don't want to think about building the output, never mind controlling the process.
Unfortunately, most people don't use paragraph styles, but if you do, it's a couple clicks.
Also if you do want to add a table or a figure, for most people Word will be much easier than doing the same in Markdown.
My markdown resume has its own problems but having this level of control has been a huge load off my mind.
Most people don't—and don't have to—care about quality for their short, simple documents, but that is neither good nor inevitable, and it's always worth trying to do better.
If you want a pure markup language that is simple, plain text readable and able to produce text more complex than what a type writer could manage in 1920 then restructured text is the way to go.
Here is normal Pandoc Markdown text.
```{=rst} .. note:: This is a native reStructuredText directive! Pandoc will not parse or change this text. It goes straight to the rST output writer. ```
Back to normal Markdown text.
Table layouts were often broken, with text overlapping into adjacent fields. Unicode font fallback didn't work properly, with characters like "→" being silently dropped because they didn't exist in the main font. Having predictable control of page breaks, to avoid situations where header text didn't stick to the following paragraph and instead had header and paragraph text split over a page boundary, was pretty much impossible.
I ended up concluding that Markdown isn't a sufficiently powerful markup language for page-based documents, and went back to using Word in all its WYSIWYG delight.
That said, maybe there were ways of doing all of the above but I couldn't figure it out and found the whole process of wrestling with with both Markdown and LaTeX templates, and Pandoc configuration, unintuitive and annoying.
https://stackoverflow.com/questions/1664049/can-i-force-a-pa...
In fact, just had a friend with a traditionally published book who is now self-pubbing ask me yesterday about my tools. I recommended Pandoc and Typst. He (surprisingly to me) had never heard of Typst, but within the hour replied that (with the use of AI) he had a great-looking template for the book. (Try doing that with LaTeX).
I have some custom filters for index entries and code formatting.
https://quarto.org/docs/computations/python.html
https://quarto.org/docs/output-formats/typst.html
https://quarto.org/docs/books/book-output.html#typst-output
https://quarto.org/docs/output-formats/typst-custom.html#boo...
It is true one ends up familiarizing oneself with peculiarities of the typesetting engine. The LLMs are lately teaching me bits and pieces about typst and typst+pandoc which I'm using for a writing project. They all seem infallible about pandoc curiosa.
Tables I agree are a nightmare in any plain text representation whatsoever - except with editor support which alas Word makes easy.
I would be lost had I have to use the Office tools to edit and format my text.
So thank you to all the maintainers of Pandoc.
Embarrassingly, a horrible little script for converting Pandoc's Markdown endnotes to inline format remains my most-starred GitHub repo: https://github.com/ltrgoddard/inliner/
If you are using markdown, you already understand the conceptual basis for it, so you just need to understand how it's implemented over there.
I'm not arguing that it is something you should do, just rolling my eyes at "I would be lost".
Oh no, inspiration has arrived. Guess I know what I'm wasting my weekend into, hah.
Also this page seems to have existed for a while and I never heard of it! I'm glad I stumbled upon this. A lot of nice ideas here.
As for why people shill Typst over LaTeX, it's just a better overall experience. Things that are annoying in LaTeX are easy in Typst. I've written plenty of LaTeX for academic papers and my Master's dissertation, but I'm now writing my PhD thesis in Typst. It's so much better. The only barrier to using it everywhere is that my colleagues still prefer to use Overleaf for collaboration, which forces me to use LaTeX for papers.
Sadly, the .docx templates aren't enough - they have the styling, but for those forced to produce a .docx output as a necessity for "corporate" consumption - you will find it that it's not quite straightforward to insert a title page, and out of the reference docx file, only the styles are used, not the content. You can define headers and footers in the reference file, but not more than that.
As of 3.2.1, Pandoc supports OpenXML template files for its docx writer as well as pre and post body insertion: --template, --include-before-body and --include-after-body, but if you prefer to define your title page in Word, or haven't gotten your head around doing an OpenXML thing like me, I found this Windows tool:
https://github.com/jamessantiago/DocxMerge
You can define your title page in one docx file and then merge it with Pandoc's output. But since styles from both get merged, it's best to start your title page with a copy of your reference and/or delete as many styles as possible from your title page so you don't have to make changes to both.
There are also some other quirks like fitting tables to contents properly in docx - a workaround is a PowerShell script (shock, horror), that opens the file, iterates over tables, sets autofit and saves the document.
Doing "Werd" right: edit markdown, type "make". -> docx, pdf. The world is a good place sometimes.