Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

You can use LaTeX in a Markdown document and convert to PDF with a tool like Pandoc. It might be a better option when you don't care much about custom formatting.


sort by: page size:

I've mentioned it before, but Pandoc is a nice workaround; it can convert Markdown (and a few other input languages) into LaTeX. It comes with a shortcut for taking Markdown and generating a PDF out of it via LaTeX.

http://johnmacfarlane.net/pandoc/


With Pandoc you can easily generate LaTeX from Markdown and then turn that into a PDF. This gives you best of both worlds.

I believe I have used pandoc to convert markdown to PDF. Maybe this is something you could try?

If you want to generate LaTeX from Markdown, you can use Pandoc. Pandoc has various extensions to regular Markdown (including inline math, tables, etc.), so this gives you some flexibility when producing more complicated types of documents. In fact, Pandoc converts from Markdown to LaTeX to PDF when you choose PDF as the output format.

Do use pandoc to convert from markdown to pdf directly? Or some other tool.

You can use Markdown with pandoc to make a pdf akin to the LaTex ones. For simple stuff, it was nice.

Ooooh man, I would love to do that. I enjoy writing markdown, and I enjoy using pandoc.

However, whenever I have to print something, there is pretty much just one possibility in Markdown: export as pdf. And export as pdf uses Latex. Latex is cool. But if you want to customize your document, you will sooner or later need to include latex headers into the "build" process of your file, and soon you have a clusterfuck of tooling and a make file for a document that was supposed to be a simple report. And then I'd rather write it in Latex.

Does anybody have a solution for this? Some kind of print-friendly Markdown-to-PDF workflow? All the non-Latex alternatives looked horrible. In fact, I sometimes export markdown documents to Word just to print them.


I like to use Markdown for authoring (it's a lot simpler than LaTeX!), but use Pandoc to convert to PDF (which uses a LaTeX template).

If needed, you can also sprinkle the Markdown with LaTeX, such as to enforce page breaks at specific points.


Pandoc provides Markdown converters for many formats, including LaTeX. Under the hood, its PDF output is via LaTeX.

What about writing it in Markdown then doing conversion to LaTeX using pandoc? I'm working on a research paper this way and it is working out nicely. Pandoc allows you to include a LaTeX template that you can customize to your heart's content yet still keep separate from your content. (you can also do html and epub directly from pandoc, with templates, if you desire)

I also use Pandoc to convert markdown to latex. Markdown expressed the content clearest.

I've also started generated latex PDFs via the Jupiter notebook. They have a quick and easy preview, plus markdown + latex math + code integration that's easy.


This project converts Markdown to LaTeX to PDF.

I am a big fan of LaTEX and write pretty much anything that would ever need to be printed in LaTEX. A former co-worker requested me to write stuff in markdown instead. When I asked why, he (jokingly) told me, Markdown is for people that don't (want) to understand LaTEX yet like the typesetting.

These days, I just use pandoc to translate markdown to PDF if I need to print and get almost LaTEX like typesetting.


Also, have you ever thought about writing your stuff in Markdown? I've made pretty good experiences with it regarding converting to epub, mobi and pdf. I'm not sure of norm page formatting though, so that might be a good reason to use LaTex instead.

Just use pandoc, then you can write your documents in markdown (with inline GraphViz and PlantUML!) and have them converted to LaTeX/pdf automatically.

Pandoc is excellent, but I'd recommend coverting Markdown to LaTeX instead of the other way around. I've tried several LaTeX to X converters (for any value of X other than PS/PDF) and frankly none of them are very good. The advantage of starting with Markdown is that you know that the format is a good match for the tool's internal AST, which makes the results much more predictable.

Pandoc has the advantage that you can still write LaTeX directly inline when you need to. You can also write in terms of divs and spans (which Pandoc understands natively) and convert these to whatever you want via filters. The latter approach has the advantage that different filters can generate the appropriate code for the format you're generating, so that you don't just lose the elements when you convert to an incompatible format.

Shameless plug: I've built a tool that helps manage the conversion: https://bitbucket.org/elliottslaughter/bookmd


This. I do all of my school assignments in markdown + embedded latex. I convert them directly to PDF using the markdown2pdf helper that comes with Pandoc. It has pretty much replaced .doc files and monolithic word processors for me.

In my experience this has zero advantage over LaTeX since converting your markdown to formats other than LaTeX will be just as hard as converting from a LaTeX source. It's even harder because you have to deal with an eclectic mix of LaTeX and markdown, and various errors and restrictions in pandoc.

There's also markdown if you want plain text but just a bit of extra formatting. You can even embed LaTeX snippets in markdown that get interpreted when you run it through Pandoc. Then you can use LaTeX without dealing with LaTeX typesetting.
next

Legal | privacy