mirror of
https://github.com/Wandmalfarbe/pandoc-latex-template.git
synced 2025-01-31 08:25:34 +00:00
[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:
parent
f098348690
commit
0a278b0aba
30
README.md
30
README.md
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user