-
-
Save pcotret/adcfa3116da7c97a3f6d459002963ca2 to your computer and use it in GitHub Desktop.
Install Sphinx latexpdf Dependencies for Centos 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# source: https://cbs.centos.org/koji/rpminfo?rpmID=45050 | |
set -xeuo pipefail | |
sudo yum install -y "tex(cmap.sty)" "tex(ecrm1000.tfm)" "tex(fancybox.sty)" "tex(footnote.sty)" "tex(framed.sty)" "tex(multirow.sty)" "tex(parskip.sty)" "tex(threeparttable.sty)" "tex(titlesec.sty)" "tex(upquote.sty)" "tex(wrapfig.sty)" "texlive-collection-fontsrecommended" "texlive-collection-latex" "tex(fncychap.sty)" python-sphinx > /dev/null | |
# Determine latex search directory | |
SEARCH_DIRECTORY="$(kpsewhich -var-value=TEXMFHOME)/tex/latex/local" | |
mkdir -p "$SEARCH_DIRECTORY" | |
# capt-of.sty has no Centos 7 package | |
install_capt_of() { | |
cp /usr/lib/python2.7/site-packages/sphinx/texinputs/tabulary.sty "$SEARCH_DIRECTORY" | |
wget http://mirrors.ctan.org/macros/latex/contrib/capt-of.zip -O /tmp/capt-of.zip -q | |
unzip /tmp/capt-of.zip -d /tmp/ 2>&1 > /dev/null | |
(cd /tmp/capt-of; latex capt-of.ins 2>&1 > /dev/null; cp capt-of.sty "$SEARCH_DIRECTORY") | |
rm -r /tmp/capt-of.zip /tmp/capt-of | |
} | |
# needspace.sty has no Centos 7 package | |
install_needspace() { | |
wget http://mirrors.ctan.org/macros/latex/contrib/needspace.zip -O /tmp/needspace.zip -q | |
unzip /tmp/needspace.zip -d /tmp/needspace 2>&1 > /dev/null | |
(cd /tmp/needspace/needspace/; latex 2>&1 needspace.ins > /dev/null; cp needspace.sty "$SEARCH_DIRECTORY") | |
rm -r /tmp/needspace.zip /tmp/needspace | |
} | |
install_capt_of | |
install_needspace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment