Skip to content

Commit

Permalink
[doc] How to use the pandoc/extra docker image (#319)
Browse files Browse the repository at this point in the history
* Add documentation in the README on how to use the `pandoc/extra` docker image
  • Loading branch information
daamien authored Feb 3, 2023
1 parent f098348 commit 0a278b0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.


### 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

1. Open the terminal and navigate to the folder where your markdown file is located.
Expand Down

0 comments on commit 0a278b0

Please # to comment.