Live data from Hacker News

Pandoc Templates

pandoc-templates.org

61–65 of 65 posts

Re: Pandoc Templates

#61
post #38

Earlier quoted context omitted.

Could you elaborate on your workflow? Which tool do you start in (presumably it's a sequential flow?)? When is it that you go across the tools?

Jupyter to markdown to typst. Pandoc does the last conversation. (Pandoc also creates epubs for me). I have some custom filters for index entries and code formatting.

I'm curious if Quarto could coordinate all of that for you automatically. It supports both code execution via Jupyter, and output via Typst (including books).

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...

Re: Pandoc Templates

#63
post #54

Earlier quoted context omitted.

Yeah idk about all the typst HN shilling. Latex works great and is as free as it can get.

You can use Typst 100% for free, just like LaTeX. There's a CLI for compilation, there's an LSP, code formatter, etc. Complaining that the web app has a paid tier is like complaining that Overleaf is paid. 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, b…

Fellow Typst user for my PhD thesis, can concur.

Re: Pandoc Templates

#64
post #19

Earlier quoted context omitted.

For the short, simple documents that most people make, a versioned, wysiwyg word processor is going to beat everything else. I mean, they don't want to think about building the output, never mind controlling the process.

Building my resume in a wysiwyg editor was an exercise in frustration. Formatting was inconsistent, they were only searchable from inside the editor and versioning was useless because diff had no meaning. My markdown resume has its own problems but having this level of control has been a huge load off my mind.

I started maintaining mine in plain text, no markup at all, 20 years ago and try to use it wherever I can. My favorite employer, a startup, liked it. Regrettably most companies these days lack a sense of humor.

Re: Pandoc Templates

#65
To me, Pandoc is "never have to touch Word again", in other _words_, salvation.

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.

Post reply on HN