https://github.com/detjensrobert/arch-pandoc-container
Arch Linux's version of Pandoc with a full LaTeX environment.
https://github.com/detjensrobert/arch-pandoc-container
container latex pandoc typst
Last synced: 4 months ago
JSON representation
Arch Linux's version of Pandoc with a full LaTeX environment.
- Host: GitHub
- URL: https://github.com/detjensrobert/arch-pandoc-container
- Owner: detjensrobert
- License: mit
- Created: 2022-02-27T21:44:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-24T08:20:37.000Z (over 1 year ago)
- Last Synced: 2023-09-24T16:17:45.749Z (over 1 year ago)
- Topics: container, latex, pandoc, typst
- Language: Shell
- Homepage: https://hub.docker.com/r/detjensrobert/arch-pandoc
- Size: 60.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# arch-pandoc-container
Ubuntu's version of [Pandoc](https://pandoc.org) is old and doesn't like some raw LaTeX macros I use for some classes,
and the official [`pandoc/latex`](https://hub.docker.com/repository/docker/pandoc/latex) image does not have all of the
needed LaTeX packages for those macros either. This Docker container provides Arch's versions of Pandoc and TeXLive,
which work just fine.Additionally, this bundles MLA, APA, and IEEE [CSLs](https://github.com/citation-style-language/styles) for citations,
along with some Pandoc filters:- [`pantable`](https://github.com/ickc/pantable)
- [`pandoc-include`](https://github.com/DCsunset/pandoc-include)## Tags
Images are tagged based on the Pandoc version and the LaTeX engine included.
The `:latest` tag ships with [Tectonic](https://tectonic-typesetting.github.io) as the LaTeX engine for a much smaller
container size, but may not work for all LaTeX packages.- `:latest`
- `:` (e.g. `:3.1.3`)
- `:tectonic`
- `:-tectonic` (e.g. `:3.1.3-tectonic`)The `-texlive` tags have the more 'standard' [TeXLive](https://www.tug.org/texlive) installation, but at a much larger
container size (over 2GB!).- `:texlive`
- `:-texlive` (e.g. `:3.1.3-texlive`)The `-typst` tags use the new [Typst](https://typst.app/) system, which can be much nicer to use than LaTeX. Note this is its own system and **not** compatible with LaTeX!
- `:typst`
- `:-typst` (e.g. `:3.1.3-typst`)Images are available both on [Dockerhub](https://hub.docker.com/r/detjensrobert/arch-pandoc) and on
[GHCR](https://github.com/detjensrobert/arch-pandoc-container/pkgs/container/arch-pandoc):```sh
docker pull docker.io/detjensrobert/arch-pandoc
docker pull ghcr.io/detjensrobert/arch-pandoc
```## Usage
Use this as a drop-in for standard `pandoc`:
```bash
docker run --rm -v $(pwd):/data -u $(id -u):$(id -g) detjensrobert/arch-pandoc:latest -s file.md -o file.pdf ...
```- This container expects all necessary files to be mounted at `/data` in the container: `-v $(pwd):/data`
- To avoid output being owned by `root`, run the entrypoint as your UID/GID: `-u $(id -u):$(id -g)`
> NOTE: if using rootless containers, e.g. `podman`, this is not needed! `root` in the container is already mapped to
> your normal user.> NOTE 2: If this causes permission errors with a Tectonic image, try switching to the TeXLive image instead.
Add this shell function to your shell config for convenience:
```bash
pandoc-docker () {
docker run --rm -v $(pwd):/data -u $(id -u):$(id -g) detjensrobert/arch-pandoc $@
}md2pdf-docker () {
pandoc-docker -s "$1" -o "${1%%.md}.pdf" -V geometry:margin=1in --highlight=tango --citeproc ${@:2}
}# usage:
md2pdf-docker some-document.md --filter pantable # -> creates some-document.pdf
```