Markdown + Mathjax => PDF
This is possible with pandoc
. If the Markdown you've posted is in the file test.md
you can generate a PDF called test.pdf
with the following command:
pandoc test.md -o test.pdf
The PDF file looks like this:
pandoc
converts the Markdown to a PDF using LaTeX. It recognizes that the input is Markdown from the file extension, but if you use a different file extension you can include -f markdown
to instruct pandoc
to convert from Markdown. The -o test.pdf
part of the command tells pandoc
to output a PDF with the given filename.
The pandoc
website has a nice getting started guide.
I'd use RedNotebook for notes and small documents. It's really a journal or diary, but it lets me to take quick notes with (modified) markdown and MathJax (with webkit
), and then, if necessary, to export to html or pdf or LaTeX.
If I type:
= Title =
Here is a //short document// including Markdown and Math, here is the equation:
$$f(x)=x^2$$
====================
Proof: ...
This is **bold**.
I get this (edition mode):
and this (preview):
Then you export to pdf, which looks like this:
(Output font can be changed from Preferences).
What I meant by my original comment is this: with pandoc -t html5 -o test.pdf test.md
you can bypass LaTeX entirely; you are only required to install wkhtmltopdf, which is a single executable like pandoc on windows.
Results as follows:
You may control the output with css.