[doc] How to use the pandoc/extra docker image (#319)

* Add documentation in the README on how to use the `pandoc/extra` docker image
This commit is contained in:
damien clochard 2023-02-03 22:00:18 +01:00 committed by GitHub
parent f098348690
commit 0a278b0aba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,36 @@ A clean **pandoc LaTeX template** to convert your markdown files to PDF or LaTeX
If there are no folders called `templates` or `pandoc` you need to create them and put the template `eisvogel.latex` inside. You can find the default user data directory on your system by looking at the output of `pandoc --version`. If there are no folders called `templates` or `pandoc` you need to create them and put the template `eisvogel.latex` inside. You can find the default user data directory on your system by looking at the output of `pandoc --version`.
### Docker image
Alternatively, if you don't want to install LaTeX, you can use the Docker
image named [pandoc/extra]. The image contains pandoc, LaTeX and a curated
selection of components such as the eisvogel template, pandoc filters and
open source fonts. A common use of the image looks like this
(line breaks for readability):
``` bash
docker run --rm \
--volume "$(pwd):/data" \
--user $(id -u):$(id -g) \
pandoc/extra example.md -o example.pdf --template eisvogel --listings
```
For frequent command line use, you can define the following shell alias:
``` bash
alias pandock='docker run --rm -v "$(pwd):/data" -u $(id -u):$(id -g) pandoc/extra'
```
The example invocation with Docker from above now looks like this:
``` bash
pandock example.md -o example.pdf --template eisvogel --listings
```
[pandoc/extra]: https://hub.docker.com/r/pandoc/extra
## Usage ## Usage
1. Open the terminal and navigate to the folder where your markdown file is located. 1. Open the terminal and navigate to the folder where your markdown file is located.