Add bin directory and spacemacs for PDF and latex

This commit is contained in:
Stochastica 2021-01-21 23:19:25 -05:00
parent 80259d0d08
commit 0a7e75655e
7 changed files with 601 additions and 523 deletions

View File

@ -27,8 +27,11 @@ The `latex` docker contains tools for compiling `latex`.
The `route` docker is used to setup a socks5 proxy server using `ssh`. The `route` docker is used to setup a socks5 proxy server using `ssh`.
## Scripts ## Bin
The `scr/` folder contains dockerised scripts: The `bin/` folder contains dockerised scripts. They should be symlinked into
* `ipython.sh`: Dockerised IPython via `hub-jupyter` for syntax highlighting `/usr/local/bin` via `symlinks-bin.sh`, which has to be executed as root.
and IDE support
## Spacemacs
After setting up dependencies, execute `M-x pdf-tools-install`.

10
bin/latex-runtime.sh Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
docker run --rm -it \
--volume "$PWD:/data" \
--volume "$HOME/.latexmkrc:/data/ro" \
--volume "$HOME/texmf:/root/texmf" \
--workdir "/data" \
--entrypoint=$1 \
latex \
${@:2}

3
bin/latexmk Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
latex-runtime.sh latexmk $@

3
bin/pdflatex Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
latex-runtime.sh pdflatex $@

View File

@ -1,6 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
docker run --rm -it \ docker run --rm -it \
--entrypoint=ipython \ --entrypoint=python \
hub-jupyter \ hub-jupyter \
-i --simple-prompt $@
# -i --simple-prompt

File diff suppressed because it is too large Load Diff

11
symlinks-bin.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# Calculate directory relative to $HOME
COMMON_BIN=$PWD/bin
LOCAL_BIN=/usr/local/bin
pushd $LOCAL_BIN >> /dev/null
ln -vs $COMMON_BIN/latex-runtime.sh .
ln -vs $COMMON_BIN/latexmk .
ln -vs $COMMON_BIN/pdflatex .
popd >> /dev/null