Sign inSign up

henrikstroem/baseddoc

By henrikstroem

•Updated almost 2 years ago

Document compilation of markdown, asciidoc, and latex into html and pdf.

Image
Content management system
0

206

henrikstroem/baseddoc repository overview

This rather large Docker image packs together a complete tool chain for compiling Markdown, ASCIIDoc, and Latex documents into Docbook, HTML and PDF.

The image contains the following tools:

  • pandoc
  • ASCIIDOC
  • ASCIIDoctor
  • texlive-full

And a ton of their dependencies.

Below are some usage examples; it is assumed that the you are located in the directory containing the source files, and that the output files, and some intermediate files, will be placed into the same directory.

The variables $filename and $basename represents full file name and the file name without extension, respectively.

# Markdown

docker run  \
    -v .:/out \
    -w /out  \
    henrikstroem/baseddoc:latest \
    pandoc "${filename}" -o "${basename}.pdf"

docker run  \
    -v .:/out \
    -w /out  \
    henrikstroem/baseddoc:latest \
    pandoc "${filename}" -o "${basename}.html"

# Latex

docker run \
    -v .:/out \
    -w /out  \
    henrikstroem/baseddoc:latest \
    sh -c 'latexmk -pdf -pdflatex="pdflatex" "$1"' _ "${basename}"

# ASCIIDOC

docker run \
    -v .:/out \
    -w /out  \
    henrikstroem/baseddoc:latest \
    sh -c 'asciidoctor -a stem=latexmath -a mathjax "$1"' _ "${filename}"

docker run \
    -v .:/out \
    -w /out  \
    henrikstroem/baseddoc:latest \
    sh -c 'asciidoctor-pdf -r asciidoctor-mathematical -a mathematical-format=svg "$1"' _ "${filename}"

docker run \
    -v .:/out \
    -w /out  \
    henrikstroem/baseddoc:latest \
    sh -c 'asciidoctor -b docbook "$1"' _ "${filename}"

docker run \
    -v .:/out \
    -w /out  \
    henrikstroem/baseddoc:latest \
    sh -c 'dblatex -o ${1}_book.pdf ${1}.xml' _ "${basename}"

Tag summary

Content type

Image

Digest

sha256:3e395371b…

Size

4.7 GB

Last updated

almost 2 years ago

docker pull henrikstroem/baseddoc