Skip to content

minidocks/pandoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pandoc docker image (minidocks/pandoc)

Pandoc is a document converter, widely used as a writing tool (especially by scholars) and as a basis for publishing workflows.

Extensions

All extensions are instaled in /pandoc directory. Directory /home/user/.pandoc is symlink to /pandoc.

Tools

Lua filters

Templates

Usage

docker run --rm -v `pwd`:/app -w /app minidocks/pandoc http://pandoc.org/MANUAL.html -t markdown

Creating a PDF

To produce a pdf pandoc requires a pdf engine (LaTeX, ConTeXt, Weasyprint etc.). We must connect containers via the ssh protocol. The easiest solution is to use docker compose.

So create a file compose.yaml with content:

x-base: &base
  volumes:
  - .:/app
  - /tmp:/tmp
  working_dir: /app
  command: sshd

services:
  pandoc:
    <<: *base
    image: minidocks/pandoc
    links:
    - context
    - texlive
    environment:
      ALIAS_CONTEXT: ssh context context
      ALIAS_PDFLATEX: ssh texlive pdflatex

  context:
    <<: *base
    image: minidocks/context:current-with-fonts

  texlive:
    <<: *base
    image: minidocks/texlive:small

And in the same directory run command:

docker compose run --rm pandoc https://raw.githubusercontent.com/jgm/pandoc/master/MANUAL.txt -o manual-latex.pdf

docker compose run --rm pandoc https://raw.githubusercontent.com/jgm/pandoc/master/MANUAL.txt -t context -o manual-context.pdf

It is possible to use custom LaTeX template:

docker compose run --rm pandoc https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template/master/examples/custom-titlepage/custom-titlepage.md --template eisvogel -o custom-titlepage.pdf

or ConTeXt template:

docker compose run --rm pandoc https://raw.githubusercontent.com/mszep/pandoc_resume/master/markdown/resume.md --template chmduquesne.tex -s -t context --variable papersize=A4 -o resume.pdf

Tags

Tag Size
latest, 3
3
2

Related images

See also

Releases

No releases published

Packages

No packages published