(a.k.a md2pdf/markdown2pdf/latex2pdf)
Pandoc is a great tool for creating documents. Unfortunately it is requires a lot of dependencies, and is somewhat hard to get running on Mac OS X. Unfortunately, because all of these dependencies, the container is rather large.
To resolve this, we've packaged all of this into a Docker container. By default, the container is configured to convert Markdown or LaTeX files to PDF, but it can easily be re-purposed for other uses.
The container is configured to convert all Markdown (.md or .markdown) and LaTeX (.tex) documents found in /docs (inside the container) to PDF files.
$ docker run -t \
-v /folder/with/markdown:/docs \
vpetersson/pandoc
In the example above, the container would search for Markdown and LaTeX files in /folder/with/markdown on your computer. For each file found, a PDF will automatically be generated.
Page breaks are not fully supported in Markdown, but ****** is used in some implementation. Pandoc does unfortunately not support this, but you can use the LaTeX code instead, which is \newpage
Similarly, Markdown doesn't support dates, but you can use \today from Markdown for this.
The command used for coverting documents are:
$ pandoc \
-V geometry:margin=1in \
-t latex \
-o b.pdf \
b.md
Content type
Image
Digest
sha256:b4c36e02c…
Size
-
Last updated
over 11 years ago
docker pull vpetersson/pandoc