Setup Instructions

On Macs

These instructions were developed using a MacBook 13-inch Air Mid 2012 running OS X v 10.10.1. They include all necessary steps to install and configure MacTex + SageTex + Minted

Setting up LaTeX on Mac for use with SageTex and Minted

  1. Download and install MacTex
    Be sure to install detected updates for MacTex (instructions used v.3.48)
  2. Download and install Sage (instructions used v.6.4.1)
  3. Configure SageTex (per sagetextexshop.pdf in Resources)
    1. Rename the Sage Application from /Applications/Sage-<version number>.app to /Applications/Sage.app
      Note, in the Finder UI the .app is not shown
    2. Perform CLI steps
      1. Open Terminal
      2. cd ~/Library/TeXShop/Engines/
      3. cp ./Inactive/Sage/sage.engine ./
      4. cd /usr/local/texlive/texmf-local/tex/latex
      5. sudo ln -s /Applications/Sage.app/Contents/Resources/sage/data/texmf/tex/generic/sagetex/sagetex.sty sagetex.sty
      6. sudo mktexlsr
      7. Close the terminal
  4. Install minted
    1. Looks like minted is already installed with TexShop, but make sure Pygments is installed by running pygmentize from the terminal
    2. If it works, then proceed to next step; otherwise install with sudo easy_install Pygments
  5. Update TexShop settings to work with minted (aka, enable —shell-escape)
    1. Open TexShop Preferences (TexShop>Preferences)
    2. Select the Engines tab
    3. add --shell-escape as the first argument of the Tex and Latex settings
    4. close Preferences
    5. Edit ~/Library/TeXShop/Engines/sage.engine
    6. add --shell-escape as the first argument of each call to pdflatex (there are two places in the one on test machine)
    7. save and close the sage.engine file

Adding Units Support with Pint

  1. Open Terminal
  2. /Applications/Sage.app/Contents/Resources/sage/sage --python -m easy_install pint
  3. Close the terminal

Notes

On Linux

These instructions were developed using a PC laptop running Ubuntu 14.04 64-bit.

Setting up LaTeX on Linux for use with SageTex and Minted

  1. Install kile from the repository
    sudo apt-get install kile
  2. Download and install Sage (instructions used v.6.4.1 and followed the instructions for the Ubuntu PPA)
  3. Configure SageTex (per Sage Documentation)
    Note: you will need to find the installation path for Sage (labeled SAGE_ROOT below, on test box SAGE_ROOT=/usr/lib/sagemath/)
    1. Determine the systemwide TeX directory (probably will be /usr/local/share/texmf)
      kpsewhich -var-value=TEXMFLOCAL
    2. sudo cp -R SAGE_ROOT/local/share/texmf/tex TEXMFLOCAL
      where you substitute the full paths for SAGE_ROOT and TEXMFLOCAL
    3. sudo texhash TEXMFLOCAL
      where you substitute the full path for TEXMFLOCAL
  4. Install minted
    1. TODO: Follow these instructions: http://tex.stackexchange.com/questions/40083/how-to-install-minted-in-ubuntu