Skip to content

Instantly share code, notes, and snippets.

@brycepg
Last active December 1, 2022 09:28
Show Gist options
  • Select an option

  • Save brycepg/37910f615abd3732f4e3ac4335a33966 to your computer and use it in GitHub Desktop.

Select an option

Save brycepg/37910f615abd3732f4e3ac4335a33966 to your computer and use it in GitHub Desktop.

Revisions

  1. brycepg revised this gist Aug 15, 2017. 1 changed file with 12 additions and 11 deletions.
    23 changes: 12 additions & 11 deletions centos7-sphinx-latex.sh
    Original file line number Diff line number Diff line change
    @@ -1,27 +1,28 @@
    #!/bin/bash
    # source: https://cbs.centos.org/koji/rpminfo?rpmID=45050
    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
    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
    unzip /tmp/capt-of.zip -d /tmp/capt-of
    (cd capt-of; latex capt-of.ins; cp capt-of.sty "$search_directory")
    rm -r /tmp/capt-of.zip /tmp/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
    unzip /tmp/needspace.zip -d /tmp/needspace
    (cd /tmp/needspace/needspace/; latex needspace.ins; cp needspace.sty "$search_directory")
    rm -r /tmp/needspace.zip /tmp/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
    install_needspace
  2. brycepg renamed this gist Aug 15, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. brycepg created this gist Aug 15, 2017.
    27 changes: 27 additions & 0 deletions sphinx-latex.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    #!/bin/bash
    # source: https://cbs.centos.org/koji/rpminfo?rpmID=45050
    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

    # 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
    unzip /tmp/capt-of.zip -d /tmp/capt-of
    (cd capt-of; latex capt-of.ins; 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
    unzip /tmp/needspace.zip -d /tmp/needspace
    (cd /tmp/needspace/needspace/; latex needspace.ins; cp needspace.sty "$search_directory")
    rm -r /tmp/needspace.zip /tmp/needspace
    }

    install_capt_of
    install_needspace