All Projects → dalibo → pandocker

dalibo / pandocker

Licence: BSD-3-Clause License
🐳 A simple docker image for pandoc with filters, templates, fonts, and the latex bazaar

Programming Languages

Dockerfile
14818 projects
shell
77523 projects
TeX
3793 projects
Makefile
30231 projects
HTML
75241 projects

Projects that are alternatives of or similar to pandocker

Pandoc Plantuml Filter
Pandoc filter for PlantUML code blocks
Stars: ✭ 51 (-56.78%)
Mutual labels:  latex, filter, pandoc
Pandoc Latex Tip
A pandoc filter for adding tip in LaTeX
Stars: ✭ 7 (-94.07%)
Mutual labels:  latex, filter, pandoc
Cv Boilerplate
Programmatic generation of high-quality CVs
Stars: ✭ 967 (+719.49%)
Mutual labels:  latex, pandoc
Oscp Exam Report Template Markdown
📙 Markdown Templates for Offensive Security OSCP, OSWE, OSCE, OSEE, OSWP exam report
Stars: ✭ 2,066 (+1650.85%)
Mutual labels:  latex, pandoc
Pandoc Action Example
using the pandoc document converter on GitHub Actions
Stars: ✭ 131 (+11.02%)
Mutual labels:  latex, pandoc
Invoice Boilerplate
Simple automated LaTeX invoicing system
Stars: ✭ 604 (+411.86%)
Mutual labels:  latex, pandoc
Readteractive
Tool for writing and generating interactive books.
Stars: ✭ 23 (-80.51%)
Mutual labels:  latex, pandoc
Pandoc Letter Din5008
Pandoc template for writing Markdown letters (DIN 5008)
Stars: ✭ 77 (-34.75%)
Mutual labels:  latex, pandoc
Open Publisher
Using Jekyll to create outputs that can be used as Pandoc inputs. In short - input markdown, output mobi, epub, pdf, and print-ready pdf. With a focus on fiction.
Stars: ✭ 242 (+105.08%)
Mutual labels:  latex, pandoc
pandoc-latex-environment
Pandoc filter for adding LaTeX environement on specific div
Stars: ✭ 27 (-77.12%)
Mutual labels:  filter, pandoc
csasdown
📖 An R package for creating CSAS reports in PDF or Word format with R Markdown and bookdown
Stars: ✭ 40 (-66.1%)
Mutual labels:  latex, pandoc
Pandoc Starter
📄 My pandoc markdown templates and makefiles
Stars: ✭ 443 (+275.42%)
Mutual labels:  latex, pandoc
Letter Boilerplate
Finest letter typesetting from the command line
Stars: ✭ 374 (+216.95%)
Mutual labels:  latex, pandoc
Rmarkdown Cookbook
R Markdown Cookbook. A range of tips and tricks to make better use of R Markdown.
Stars: ✭ 324 (+174.58%)
Mutual labels:  latex, pandoc
pandoc-amsthm
provide a syntax to use amsthm environments in pandoc, with output in LaTeX and HTML
Stars: ✭ 19 (-83.9%)
Mutual labels:  latex, pandoc
Pandoc Latex Template
A pandoc LaTeX template to convert markdown files to PDF or LaTeX.
Stars: ✭ 3,750 (+3077.97%)
Mutual labels:  latex, pandoc
tufte-markdown
Use markdown to write your handouts and books in Tufte style.
Stars: ✭ 82 (-30.51%)
Mutual labels:  latex, pandoc
ntuthesis
台大碩博士論文模板 (R Package)
Stars: ✭ 14 (-88.14%)
Mutual labels:  latex, pandoc
Pandoc Markdown Template
Markdown templates for Pandoc
Stars: ✭ 135 (+14.41%)
Mutual labels:  latex, pandoc
sugartex
SugarTeX is a more readable LaTeX language extension and transcompiler to LaTeX. Fast Unicode autocomplete in Atom editor via https://github.com/kiwi0fruit/atom-sugartex-completions
Stars: ✭ 74 (-37.29%)
Mutual labels:  latex, pandoc

pandocker

github release Docker Image CI buster License Last Commit

A simple docker image for pandoc with filters, templates, fonts and additional tools.

Install / Upgrade

Download the image with:

docker pull dalibo/pandocker:stable

Whenever a new stable version is released, launch that command again to refresh your image.

How To

Run dalibo/pandocker with regular pandoc args. Mount your files at /pandoc.

$ docker run --rm -u `id -u`:`id -g` -v `pwd`:/pandoc dalibo/pandocker README.md -o README.pdf

Notes about the docker options:

  • The -v ... option will mount the current folder as the /pandoc directory inside the container. If SELinux is enabled on your system, you might need to add the --privileged tag to force access to the mouting points. For more details, read the documentation about docker runtime privileges.
  • The --rm option destroys the container once the document is produced. This is not mandatory but it's a good practice.

  • The -u option ensures that the output files will belong to you. Again this is not necessary but it's useful.

Tip: You can define a shell alias to use pandocker just like pandoc. Add this to your ~/.bashrc :

$ alias pandoc="docker run --rm -u `id -u`:`id -g` -v `pwd`:/pandoc dalibo/pandocker:stable"
$ pandoc README.md -o README.epub

Alternatively, you can use a pipe like this:

$ cat foo.md | docker run --rm -i dalibo/pandocker -t pdf > foo.pdf

This method will not work if the source document contains images or includes...

Templates

We're shipping a selection of latex templates inside the image so that you can produce nice PDF documents without installing anything.

So far, we provide the 3 templates below:

  • eisvogel is designed for lecture notes and exercises with a focus on computer science. It works with pdflatex and xelatex.
  • leaflet creates simple 3-fold brochures. Works only with xelatex
  • letter is for writing letters in markdown. Works only with xelatex

You can use them simply by adding --template=xxx to your compilation lines:

$ docker run [...] --pdf-engine=xelatex --template=eisvogel foo.md -o foo.pdf

Each template has specific variables that you can use to adapt the document. Please go the project page of each template for more details.

Filters

This docker image embeds a number of usefull pandoc filters. You can simply enable them by adding the option --filter xxx where xxx is the name of one of the following filters below:

NOTE: By default when using the pandoc-include filter, the path to target files is relative to the /pandoc mountpoint. For instance, the !include [foo/bar.md] statement will look for a /pandoc/foo/bar.md file. You can use the docker arg --workdir="some/place/elsewhere" to specify another location. The same principle applies to the pandoc-codeblock-include and pandoc-mustache filters.

Fonts

The pandocker image includes the following open-source fonts:

The full variant includes

Supported Tags : Branch + Variant + Parent

The image is available in multiple versions named as follows:

branch[-parent[-variant]]

  • The branch can be latest (default) or stable (for production) or the release name (20.02)
  • The parent is the base image we are using. Either buster (default) or alpine
  • The variant is either extra (330MB) or full (810 MB)

The supported tags are :

  • latest, latest-buster, latest-buster-extra (default)
  • latest-buster-full
  • stable, stable-buster, stable-buster-extra
  • stable-buster-full

Other tags are not supported and should be used with care.

Build it

Use make or docker build .

Additional tools

The docker image embeds additional software related to editing and publishing:

  • dia a simple tool to design diagrams
  • poppler-utils a collection of tools built to manage PDF and extract content
  • rsync for deployment

These tools can be called by modifying the entrypoint of the image. For instance, you can convert a dia source file into an SVG image like this:

$ docker run [..] --entrypoint dia dalibo/pandocker foo.dia -e foo.svg
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].