Academic markdown with Pandoc and PDF auto generation via Docker container with npm-watch as entrypoint.
docker-compose up will bring up the container based on the image schoolcraft/pandocker.
The default entrypoint runs a file watcher and auto-converts to pdf on $(pwd)/data/index.md file change.
The Docker image can also be started directly:
docker run \
-it \
-u `id -u`:`id -g` \
--mount type=bind,src=`pwd`,dst=/app/data \
schoolcraft/pandockerIn this case, index.md file in current host directory is being watched.
The container can also be used in headless mode without the watcher. Call pandoc directly with the command below:
docker run \
--rm \
-u `id -u`:`id -g` \
-v `pwd`:/pandoc \
-w /pandoc \
--entrypoint pandoc \
schoolcraft/pandocker \
README.md -o README.pdf \
--number-sections \
--listings \
--citeproc \
--pdf-engine=xelatex \
--template=eisvogeldocker run \
--rm \
-u `id -u`:`id -g` \
-v `pwd`:/pandoc \
-w /pandoc \
--entrypoint pandoc \
schoolcraft/pandocker \
README.md -o README.pdf \
--number-sections \
--listings \
--citeproc \
--pdf-engine=xelatexdocker run \
--rm \
-u `id -u`:`id -g` \
-v `pwd`:/pandoc \
-w /pandoc \
--entrypoint pandoc \
schoolcraft/pandocker \
README.md -o README.pdf \
--number-sections \
--listings \
--citeproc \
--pdf-engine=xelatex \
--template=letter