From a6fd5c261f506b8add20564d32f63e12b38a555b Mon Sep 17 00:00:00 2001 From: Stochastica Date: Sat, 16 Jan 2021 16:26:52 -0500 Subject: [PATCH] Add latexmk link --- README.md | 18 ++++++++++++++++++ home/bashrc | 2 ++ home/fish/config.fish | 23 +++++++++++++++++++++++ home/latexmkrc | 19 +++++++++++++++++++ symlinks.sh | 2 ++ 5 files changed, 64 insertions(+) create mode 100755 home/fish/config.fish create mode 100755 home/latexmkrc diff --git a/README.md b/README.md index 26d6fa0..a00a996 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,21 @@ Common configuration files for: ## Setup Execute `symlinks.sh` to create symbolic links. + +## Docker Images + +`hub-jupyter` and `hub-jupyter-spark` are images based on cudnn docker image +for jupyter. To use them with GPU, add the following to +`/etc/docker/daemon.json` and restart the docker daemon: +```json + ... + "runtimes": { + "nvidia": { + "path": "/usr/bin/nvidia-container-runtime", + "runtimeArgs": [] + } + } +``` +The `latex` docker contains tools for compiling `latex`. + +The `route` docker is used to setup a socks5 proxy server using `ssh`. diff --git a/home/bashrc b/home/bashrc index 84ac9fc..07439de 100755 --- a/home/bashrc +++ b/home/bashrc @@ -37,5 +37,7 @@ ps1_reset #PS1='[\[\e[01;32m\]\u\[\e[0m\]@\[\e[38;5;63m\]\h \[\e[38;5;105m\]\w\[\e[00m\]]\[\e[1m\]\$\[\e[00m\] ' PS2='\[\e[1m\]>> \[\e[00m\]' +alias test-command='echo test-' + export VISUAL=vim export EDITOR="$VISUAL" diff --git a/home/fish/config.fish b/home/fish/config.fish new file mode 100755 index 0000000..4681895 --- /dev/null +++ b/home/fish/config.fish @@ -0,0 +1,23 @@ +#!/bin/fish + +set fish_greeting + +alias ubisunt='grep . -rnw -e' + +set -x GIT_EDITOR vim +set -x LANG en_US.UTF-8 + +function latexmk --argument-names 'path' + if test -n "$path" + set abspath (realpath $argv[1]) + else + set abspath $PWD + end + docker run --rm -it \ + --volume "$HOME/.latexmkrc:/root/.latexmkrc:ro" \ + --volume "$abspath:/data" \ + --workdir "/data" \ + --entrypoint latexmk \ + latex \ + $argv +end diff --git a/home/latexmkrc b/home/latexmkrc new file mode 100755 index 0000000..2fb67ee --- /dev/null +++ b/home/latexmkrc @@ -0,0 +1,19 @@ +$pdf_mode = 1; + +add_cus_dep('glo', 'gls', 0, 'run_makeglossaries'); +add_cus_dep('acn', 'acr', 0, 'run_makeglossaries'); + +sub run_makeglossaries { + if ( $silent ) { + system "makeglossaries -q '$_[0]'"; + } + else { + system "makeglossaries '$_[0]'"; + }; +} + +push @generated_exts, 'glo', 'gls', 'glg', 'glsdefs'; +push @generated_exts, 'slg', 'slo', 'sls'; +push @generated_exts, 'acn', 'acr', 'alg'; +$clean_ext .= ' %R.ist %R.xdy'; +$out_dir = 'build'; diff --git a/symlinks.sh b/symlinks.sh index 6dc8dd1..1c02643 100755 --- a/symlinks.sh +++ b/symlinks.sh @@ -6,6 +6,7 @@ BASE=$(realpath --relative-to=$DIR $PWD) pushd $HOME >> /dev/null ln -vs $BASE/home/vimrc .vimrc ln -vs $BASE/home/bashrc .bashrc +ln -vs $BASE/home/latexmkrc .latexmkrc popd >> /dev/null # Create ftplugin links @@ -28,6 +29,7 @@ DIR=$HOME/.config/fish BASE=$(realpath --relative-to=$DIR $PWD) mkdir -p $DIR pushd $DIR >> /dev/null +ln -vs $BASE/home/fish/config.fish . ln -vs $BASE/home/fish/fishd_color . ln -vs $BASE/home/fish/functions . popd >> /dev/null