What does HackerNews think of pandoc-latex-template?

A pandoc LaTeX template to convert markdown files to PDF or LaTeX.

Language: TeX

#4 in LaTeX
#12 in Markdown
Really? Should work with any OpenType font. Are you generating in a language that doesn't use roman-ish alphabet? You're not wrong that working with TeX can involve a lot of yak shaving in general. Sometimes finding the right template can solve a lot of problems. I use Eisvogel. https://github.com/Wandmalfarbe/pandoc-latex-template
There's really no reason you need to switch. You can put raw LaTeX directly into Pandoc Markdown documents; it'll be ignored in non-LaTeX backends, and in LaTeX it'll just be reproduced verbatim. If you need to tweak the template that Pandoc puts "around" the Markdown content, you can do that too (and then centralize your changes so you don't need to do it over and over again). Eisvogel is an example of a project that does this [1].

I think this is really the best of both worlds, because you can produce documents that (fairly) easily generate print books via LaTeX while simultaneously generating webpages or ePubs for electronic distribution.

[1]: https://github.com/Wandmalfarbe/pandoc-latex-template

I use pandoc [0] to convert GitHub style markdown to pdf/epub with some customizations of my own.

I'd probably try templates [1] already available if I needed printable version.

[0] https://learnbyexample.github.io/customizing-pandoc/

[1] https://github.com/Wandmalfarbe/pandoc-latex-template

There's a popular template [0] which you can adapt to your needs. I didn't know Latex too, so I cobbled together snippets I found from stackexchange sites [1] (this was before I knew about that template, else I'd have probably started with that)

[0] https://github.com/Wandmalfarbe/pandoc-latex-template

[1] https://learnbyexample.github.io/customizing-pandoc/

Long term pandoc user here!

Been using it with https://github.com/Wandmalfarbe/pandoc-latex-template to generate my documents.

Please comment if there are other nice templates, either for LaTeX or for Doc

I use markdown to pdf flow with pandoc+xelatex. Found a few tex code on stackexchange sites and current setting is good enough for me, made a blog post too [1]

There's also a latex template I've bookmarked [2] - I haven't tried yet, but sample on the repo looks nice

[1] https://learnbyexample.github.io/tutorial/ebook-generation/c...

[2] https://github.com/Wandmalfarbe/pandoc-latex-template

> OP won't try it out because it's unlikely the template will solve his issues

His general issues in life? maybe not. But honestly, that's a bit of a big thing to ask from a pandoc template. So OP asked for it, implying that he's interested in such things, but generally has issues with long lines in such templates. So interest is there, it may even correlate with the fact that he has a setup with most of the tools needed installed.

> playing around with new things is generally a waste of time

What? I'm thankfully that a lot people do not think this way, else we'd be still in the stone age.

> So if you (tlamponi) have some interest in promoting this template

no interest whatsoever, not related to it in anyway. But I have an interest that people try easy things out, instead of speculating on negative or positive possibilities of said things, which, in fact, is a waste of time.

> but it is not as easy and straight-forward as you make it out to be.

# package-manager install git pandoc

# cd $(mktemp -d)

# git clone https://github.com/Wandmalfarbe/pandoc-latex-template.git

# cd pandoc-latex-template/examples

# echo "Example for waste of time: 'Prediction: OP won't try it out because it's unlikely the template will solve his issues and playing around with new things is generally a waste of time. So if you (tlamponi) have some interest in promoting this template, then answering the question would be helpful! Everyone reading this submission is already aware that they could find things out by trying the template out, but it is not as easy and straight-forward as you make it out to be.'" >> basic-example/basic-example.md

# sh build-examples.sh

# okular basic-example/basic-example.pdf

Ah yes, very very hard. Sorry for trying to convince someone to work out answers they're interested in their self, such a useless thing to do in life.

Anyway, it seems that it does cope well with long lines, be it in a common text paragraph, but also in a code block, here it breaks those lines, intends the overflowing one - together with the fact that there are line numbers everything is clear and easy to read. Single thing, if I copy those broken up code lines, they do not get copied as a single line, this is a bit of a bummer to me, but may not be an issue for others..