2018-02-22 16:27:37 +00:00
|
|
|
#!/bin/bash
|
2018-04-12 18:07:33 +00:00
|
|
|
# Description: Document typesetting
|
2018-02-27 05:15:14 +00:00
|
|
|
set -e
|
2018-02-22 16:27:37 +00:00
|
|
|
|
|
|
|
case "$(uname -s)" in
|
|
|
|
Darwin)
|
|
|
|
_recipe brew
|
2018-02-23 15:19:52 +00:00
|
|
|
_brew_cask mactex
|
2018-02-22 16:27:37 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
_recipe _apt
|
|
|
|
_apt texlive-full
|
|
|
|
esac
|
2018-05-02 21:23:12 +00:00
|
|
|
|
|
|
|
tlmgr init-usertree 2>/dev/null || true
|
|
|
|
|
|
|
|
function _tex {
|
|
|
|
local pkg=$1
|
|
|
|
if ! tlmgr --usermode info --only-installed $pkg | grep -i '^installed:.*Yes$' >/dev/null 2>&1; then
|
|
|
|
_run "[tex] Install $pkg" tlmgr --usermode install $@
|
|
|
|
else
|
|
|
|
echo "[tex] $pkg is already installed, skipping."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2018-05-30 13:45:49 +00:00
|
|
|
function _tex_git {
|
|
|
|
local pkg=$1
|
|
|
|
local repo=$2
|
|
|
|
_git $2 "$(kpsewhich -var-value TEXMFHOME)/tex/latex/${pkg}"
|
|
|
|
}
|
|
|
|
|
2018-05-02 21:23:12 +00:00
|
|
|
_tex labbook
|
|
|
|
_tex mdframed
|
|
|
|
_tex microtype
|
|
|
|
_tex minted
|
|
|
|
_tex moderncv
|
|
|
|
_tex soul
|
|
|
|
_tex tufte-latex
|
2018-05-30 13:45:49 +00:00
|
|
|
|
|
|
|
_recipe git
|
|
|
|
_tex_git dnd https://github.com/evanbergeron/DND-5e-LaTeX-Template.git
|