Setup Instructions
Version 6 (J. Simmons, 01/29/2015 09:12 pm)
| 1 | 1 | J. Simmons | h1. Setup Instructions |
|---|---|---|---|
| 2 | 1 | J. Simmons | |
| 3 | 4 | J. Simmons | {{toc}} |
| 4 | 4 | J. Simmons | |
| 5 | 1 | J. Simmons | h2. On Macs |
| 6 | 1 | J. Simmons | |
| 7 | 1 | J. Simmons | 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 |
| 8 | 1 | J. Simmons | |
| 9 | 1 | J. Simmons | h3. Setting up LaTeX on Mac for use with SageTex and Minted |
| 10 | 1 | J. Simmons | |
| 11 | 1 | J. Simmons | # Download and install "MacTex":http://tug.org/mactex/ |
| 12 | 1 | J. Simmons | Be sure to install detected updates for MacTex (instructions used v.3.48) |
| 13 | 1 | J. Simmons | # Download and install "Sage":http://www.sagemath.org/download-mac.html (instructions used v.6.4.1) |
| 14 | 1 | J. Simmons | # Configure SageTex (per "sagetextexshop.pdf":http://faculty.essex.edu/~bannon/sp/sagetextexshop.pdf in [[Resources]]) |
| 15 | 1 | J. Simmons | ## Rename the Sage Application from /Applications/Sage-<version number>.app to /Applications/Sage.app |
| 16 | 1 | J. Simmons | Note, in the Finder UI the .app is not shown |
| 17 | 1 | J. Simmons | ## Perform CLI steps |
| 18 | 1 | J. Simmons | ### Open Terminal |
| 19 | 1 | J. Simmons | ### cd ~/Library/TeXShop/Engines/ |
| 20 | 1 | J. Simmons | ### cp ./Inactive/Sage/sage.engine ./ |
| 21 | 1 | J. Simmons | ### cd /usr/local/texlive/texmf-local/tex/latex |
| 22 | 1 | J. Simmons | ### sudo ln -s /Applications/Sage.app/Contents/Resources/sage/data/texmf/tex/generic/sagetex/sagetex.sty sagetex.sty |
| 23 | 1 | J. Simmons | ### sudo mktexlsr |
| 24 | 2 | J. Simmons | ### Close the terminal |
| 25 | 1 | J. Simmons | ## Install minted |
| 26 | 1 | J. Simmons | ### Looks like minted is already installed with TexShop, but make sure Pygments is installed by running pygmentize from the terminal |
| 27 | 1 | J. Simmons | ### if it works, then proceed to next step; otherwise install with sudo easy_install Pygments |
| 28 | 1 | J. Simmons | ## Update TexShop settings to work with minted (aka, enable —shell-escape) |
| 29 | 1 | J. Simmons | ### Open TexShop Preferences (TexShop>Preferences) |
| 30 | 1 | J. Simmons | ### Select the Engines tab |
| 31 | 1 | J. Simmons | ### add --shell-escape as the first argument of the Tex and Latex settings |
| 32 | 1 | J. Simmons | ### close Preferences |
| 33 | 1 | J. Simmons | ### Edit ~/Library/TeXShop/Engines/sage.engine |
| 34 | 1 | J. Simmons | ### add --shell-escape as the first argument of each call to pdflatex (there are two places in the one on test machine) |
| 35 | 1 | J. Simmons | ### save and close the sage.engine file |
| 36 | 2 | J. Simmons | |
| 37 | 2 | J. Simmons | h3. Adding Units Support with Pint |
| 38 | 2 | J. Simmons | |
| 39 | 2 | J. Simmons | # Open Terminal |
| 40 | 2 | J. Simmons | # /Applications/Sage.app/Contents/Resources/sage/sage --python -m easy_install pint |
| 41 | 2 | J. Simmons | # Close the terminal |
| 42 | 1 | J. Simmons | |
| 43 | 1 | J. Simmons | h3. Notes |
| 44 | 1 | J. Simmons | |
| 45 | 6 | J. Simmons | * Be sure to run applications once by right-clicking and selecting run then approving the application to run (this is part of a security policy in OS X) |
| 46 | 1 | J. Simmons | * 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. |
| 47 | 3 | Jeremy Wright | |
| 48 | 3 | Jeremy Wright | h2. On Linux |
| 49 | 3 | Jeremy Wright | |
| 50 | 3 | Jeremy Wright | These instructions were developed using a PC laptop running Ubuntu 14.04 64-bit. |
| 51 | 3 | Jeremy Wright | |
| 52 | 3 | Jeremy Wright | h3. Setting up LaTeX on Linux for use with SageTex and Minted |
| 53 | 3 | Jeremy Wright | |
| 54 | 3 | Jeremy Wright | # Install "kile":http://kile.sourceforge.net/ from the repository |