Setup Instructions

Version 1 (J. Simmons, 01/22/2015 09:38 pm) → Version 2/18 (J. Simmons, 01/22/2015 09:43 pm)

h1. Setup Instructions

h2. 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

h3. Setting up LaTeX on Mac for use with SageTex and Minted

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

h3. Adding Units Support with Pint

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

h3.
Notes

* Be sure to run app applications once by right-clicking and selecting run then approving the app to run (this is part of a security policy in OS X)
* Sage is a very large package, be patient running it for the first time. It took 10+ minutes (and possibly one or more retries) to get it to run for the first time during initial setup. After that it ran normally.