Skip to content

Instantly share code, notes, and snippets.

@markedphillips
Last active September 24, 2019 17:42
Show Gist options
  • Save markedphillips/1f9d1c92ef5a27b8553ad044e8682cfb to your computer and use it in GitHub Desktop.
Save markedphillips/1f9d1c92ef5a27b8553ad044e8682cfb to your computer and use it in GitHub Desktop.
install fonts and other stuff for latex after bringing up the docker container
#!/bin/bash
# docker exec -it sharelatex bash
apt-get update -y
echo "listing ttf directory"
ls /usr/share/fonts/ttf
echo "listing truetype directory"
ls /usr/share/fonts/truetype
echo "installing font-awesome"
apt-get install -y fonts-font-awesome
echo "where fonts need to be"
ls /usr/share/fonts/opentype/
# http://tug.org/fonts/getnonfreefonts/
wget https://www.tug.org/fonts/getnonfreefonts/install-getnonfreefonts
texlua install-getnonfreefonts
getnonfreefonts --sys --help
echo
getnonfreefonts --sys -l
echo
echo "installing all fonts"
getnonfreefonts --sys -a
echo "updating...."
getnonfreefonts --user|--sys --lsfonts
apt-get update -y
sudo apt-get install -y texlive-fonts-recommended texlive-fonts-extra
echo "gathering various project fonts"
# download fonts
git clone https://github.com/suchow/Dissertate
find . -name "*.otf" -exec mv -v '{}' /usr/share/fonts/truetype/ \;
find . -name "*.ttf" -exec mv -v '{}' /usr/share/fonts/truetype/ \;
fc-cache -f -v
# clean-up downloads
rm -rf Dissertate
sudo apt-get autoclean
# https://tex.stackexchange.com/questions/1092/how-to-install-vanilla-texlive-on-debian-or-ubuntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment