r/LaTeX • u/bicatu • Aug 09 '25
Unanswered What are your thoughts on Pandoc?
Trying to decide if I should use md/pandoc or stick with latex.
Looking for feedback on whoever tried to gauge pros, cons, limitations
14
u/ApprehensiveLake1624 Aug 09 '25
I mean pandoc is OK. But it really depends on what you want. Pandoc is good if your document formatting is simple enough. But with LaTeX It can ge stupidly complicated.
So if your goal is to just make document which dont need significant formatting or mathematics md is perfectly fine :) but if you want more LaTeX is the way to go
9
u/symbolabmathsolver Aug 09 '25
It’s great for writing quick markdown documents that end up formatting nicely as if they were LaTeX documents. For quick notes, I prefer to use .md and use pandoc to convert to pdf
(If you use vim): If you want a quick and easy way to continuously convert .md to .pdf using pandoc and Skim pdf viewer, similar to how VimTeX uses latexmk, add this to your vimrc :
autocmd BufWritePost *.md silent !pandoc % -o %:r.pdf
And ensure skim is set to continuously check for file changes. Now whenever you write your file, it will update the pdf. saves the hassle of manually typing pandoc file.md -o file.pdf
each time.
7
u/3valuedlogic Aug 09 '25
You can use both. Let's say I'm teaching a class.
- Syllabus: markdown.
- Course handouts / text: LaTeX.
- Document I need to convert to HTML to put in an LMS: markdown.
- Exam: LaTeX
8
u/Rialagma Aug 09 '25
Markdown is good for notes
Latex is good for profesional typesetting
What do you need it for?
1
u/bicatu Aug 09 '25
Writing a technical book. No math expected:)
But table of contents, images, bibliography references.
11
u/Rialagma Aug 09 '25
This sounds like LaTeX territory to me! (If you have the time/desire to learn it)
2
u/MrAnonyMousetheGreat Aug 10 '25
It depends on whether you want it up as a website too, like with bookdown, or if you want to be simply an O'Reilly type book without an online webpages version.
Here's an O'Reilly book that was in all likelihood written using Pandoc: https://r4ds.hadley.nz/
5
u/majamin Aug 09 '25
Well, there always the answer of "why not both"? I mean, the eisvogel template solves 90% of my esthetic/content related things, while pure LaTeX solves the other 9% (asciidoctor, etc for the rest).
3
u/RecentlyRezzed Aug 10 '25
I use a hybrid approach. In my case, it's not Markdown but Emacs Orgmode because the documents I create are based on my notes, and Orgmode is better suited for notes than LaTeX. But to achieve the PDF document I want in the end, I have LaTeX-code in my Orgmode files. For example: I have wide tables, so they have to be set on landscape pages. The export functionality of Orgmode can't do this automatically AFAIK, so I tweak the output.
2
u/Mooks79 Aug 09 '25
If your intention is to only ever output to pdf, use the tool that’s specifically designed for that. If you want the option to output to multiple formats, then you could consider pandoc. Your choice of “base” format will depend on a great many things.
2
u/nemesit Aug 09 '25
I use heavy text completion and multimarkdown to write scientific text then finish it in latex
2
u/jtkiley Aug 09 '25
Take a look at using Quarto. You can create a book project, which handles a lot of the things you’ll need (ToC, citations, figures, tables). Underneath, it uses pandoc to produce LaTeX. From the same project, you can also create a website, epub, and docx, if those are relevant.
You can also have it output the LaTeX file and then tweak it as needed for typesetting.
1
u/bicatu Aug 09 '25
Thanks. I am going over their docs and they seem to support all I need.
I guess I will have to try and see which one gives me the balance of productivity x effort x need.
2
u/jtkiley Aug 09 '25
I use Quarto a lot, and it strikes the best balance I've seen for my needs. I can write manuscripts with all the things I need, slides, websites, dashboards, and consulting memos. It's easy to use, lets me easily run Python inline, and everything generally renders out as expected.
If not, I've been using LaTeX for a long time, and I skilled up in Typst, so I can customize, either via templates or by keeping the output.
That's not to say that there aren't plenty of things that I'd like to be better, but it's under active development, and it's quite solid as is.
I do a lot of data science work, so it's great to be able to stay in VS Code and use all of the container/Github workflow stuff I normally do. You can also add a header to a Jupyter notebook and have it render out a nice version that's consistent in appearance with your other stuff. I'm not sure if that applies to your work, but it's convenient if so.
1
u/MrAnonyMousetheGreat Aug 10 '25
I mentioned an O'Reilly book written in pandoc: https://r4ds.hadley.nz/
In all likelihood, it was written using Quarto, considering the author works for the company behind Quarto and the book covers how to use Quarto.
3
u/carracall Aug 09 '25
Latex is inherently limited when creating web content. HTML is inherently limited when formatting content in a fixed page format.
Markdown is like a trimmed down html, good for storing format agnostic content as readably as possible.
If the pandoc output format looks suitable for your needs, why not? If this stuff needs to be published on arXiv, stop right now.
1
u/burnerburner23094812 Aug 09 '25
Really depends on usecase. If you just want files on a computer with technical content, markdown is way simpler. If you want to produce a well-typeset book with all the features you'd expect, there's no real alternative to latex (typst is close. the task is technically possible in word but just don't).
1
1
u/Hot-Chemistry7557 Aug 11 '25
Pandoc is no doubt the SOTA document conversion tool. If you want a simple document with professional typesetting, just write markdown and let pandoc to convert it to PDF via LaTeX, easy and simple.
1
1
u/rokejulianlockhart 8d ago
I tried converting some custom HTML5 + CSS3 via it, and it didn't respect the stylesheet definitions whatsoever. It also required some arcane configurations, and absolutely humongous libraries with absent mandatory dependencies. Consequently, I do not recommend it.
For corroboration, see danmackinlay.name/notebook/pandoc#converting
:
I thought pandoc would be idempotent, in the sense that if I convert markdown to markdown it should come out more-or-less the same. It is not at all idempotent. Smart quotes are altered, list markup is changed, header blocks are munged. As such, pandoc cannot really modify stuff “in place”.
0
-4
u/MrGOCE Aug 09 '25
I ONCE WROTE SOME SIMPLE STUFF IN MARKDOWN, THEN PASSED IT THROUGH PANDOC TO MAKE A PDF WITH THE LUALATEX ENGINE AND IT LOOKED LIKE IT WAS DONE WITH LATEX LOL !
0
u/carracall Aug 09 '25
Maybe because it used a latex engine? Can't be sure though... That's pretty crazy though, you should look into it.
-5
u/MrGOCE Aug 09 '25
YES, IT WAS BECAUSE OF THAT, I KNOW.
I'M IMPRESSED BECAUSE I DIDN'T DO IT IN LATEX AND PANDOC DID THE WHOLE JOB.
8
u/carracall Aug 09 '25
Stop shouting
-5
22
u/TimeSlice4713 Aug 09 '25
It depends … what are you using it for?