dotfiles/recipes/tex

44 lines
915 B
Bash

#!/bin/bash
# Description: Document typesetting
set -e
case "$(uname -s)" in
Darwin)
_recipe brew
_brew_cask mactex
;;
*)
_recipe _apt
_ppa jonathonf/texlive
_apt texlive-full
# xzdec is required by tlmgr
_apt xzdec
esac
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
}
function _tex_git {
local pkg=$1
local repo=$2
_git $2 "$(kpsewhich -var-value TEXMFHOME)/tex/latex/${pkg}"
}
_tex labbook
_tex mdframed
_tex microtype
_tex minted
_tex moderncv
_tex soul
_tex tufte-latex
_recipe git
_tex_git dnd https://github.com/evanbergeron/DND-5e-LaTeX-Template.git