Sign inSign up

oehrlis/pandoc

By oehrlis

Updated 3 months ago

Docker image to run the universal document converter pandoc including support to convert PDF files.

Image
2

10K+

oehrlis/pandoc repository overview

Pandoc Docker Images

Docker scripts to build an image to run the universal document converter pandoc including support to convert PDF files. The image includes a reduced texlive 2022 installation to support simple PDF transformations. Additional TexLive packages have to be installed be extending this images. You find the source of this container in GitHub oehrlis/docker-pandoc.

Run

The pre build image is availabe via Dockerhub. The installation and use is straightforward. Install Docker and pull the image.

docker pull oehrlis/pandoc

Either you copy the files into the container, which is obviously not really handy, or you mount your local document folder as volume and run it.

docker run --rm -v $PWD:/workdir:z oehrlis/pandoc <OPTIONS>

Conversion of the sample Markdown file into a PDF using the default LaTeX template.

cd sample
docker run --rm -v $PWD:/workdir:z oehrlis/pandoc sample.md \
    -o sample.pdf --toc -N --listings

Conversion of the sample Markdown file into a PDF using the Trivadis LaTeX template and XeLaTeX for include custom TTF fonts.

cd sample
docker run --rm -v $PWD:/workdir:z oehrlis/pandoc --pdf-engine=xelatex sample.md \
    -o sample_trivadis.pdf --template trivadis --toc -N --listings
cd sample
docker run --rm -v $PWD:/workdir:z oehrlis/pandoc sample.md \
    -o sample_trivadis.pdf --template trivadis --toc -N --listings

Alternatively you can open a shell in the container and use the miscellanies pandoc and tex tools interactively.

docker run -it --rm -v $PWD:/workdir:z --entrypoint sh oehrlis/pandoc

Build and add new packages

If you plan to alter or extend this Docker image you could get the corresonding files from GitHub and build the image manually.

git clone [email protected]:oehrlis/docker-pandoc.git
$ cd docker-pandoc
$ docker build -t oehrlis/pandoc .

Optionally you can add additional TexLive package to the tlmgr command in the Dockerfile.

Alternatively you can use the build.sh script.

git clone [email protected]:oehrlis/docker-pandoc.git
$ cd docker-pandoc
$ build.sh

Issues

Please file your bug reports, enhancement requests, questions and other support requests within Github's issue tracker:

References

Tag summary

Content type

Image

Digest

sha256:1966e884b

Size

268.4 MB

Last updated

3 months ago

docker pull oehrlis/pandoc