Setup Instructions
Version 12 (J. Simmons, 01/29/2015 09:53 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 | 9 | J. Simmons | # Install minted |
| 26 | 9 | J. Simmons | ## Looks like minted is already installed with TexShop, but make sure Pygments is installed by running pygmentize from the terminal |
| 27 | 9 | J. Simmons | ## If it works, then proceed to next step; otherwise install with sudo easy_install Pygments |
| 28 | 9 | J. Simmons | # Update TexShop settings to work with minted (aka, enable —shell-escape) |
| 29 | 9 | J. Simmons | ## Open TexShop Preferences (TexShop>Preferences) |
| 30 | 9 | J. Simmons | ## Select the Engines tab |
| 31 | 9 | J. Simmons | ## add --shell-escape as the first argument of the Tex and Latex settings |
| 32 | 9 | J. Simmons | ## close Preferences |
| 33 | 9 | J. Simmons | ## Edit ~/Library/TeXShop/Engines/sage.engine |
| 34 | 9 | 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 | 9 | 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 |
| 55 | 7 | J. Simmons | sudo apt-get install kile |
| 56 | 8 | J. Simmons | # Download and install "Sage":http://www.sagemath.org/download-linux.html (instructions used v.6.4.1 and followed the instructions for the "Ubuntu PPA":https://launchpad.net/~aims/+archive/sagemath) |
| 57 | 10 | J. Simmons | # Configure SageTex (per "Sage Documentation":http://www.sagemath.org/doc/installation/sagetex.html) |
| 58 | 1 | J. Simmons | Note: you will need to find the installation path for Sage (labeled SAGE_ROOT below, on test box SAGE_ROOT=/usr/lib/sagemath/) |
| 59 | 12 | J. Simmons | ## Determine the systemwide TeX directory (probably will be /usr/local/share/texmf) |
| 60 | 1 | J. Simmons | kpsewhich -var-value=TEXMFLOCAL |
| 61 | 12 | J. Simmons | ## sudo cp -R SAGE_ROOT/local/share/texmf/tex TEXMFLOCAL |
| 62 | 10 | J. Simmons | where you substitute the full paths for SAGE_ROOT and TEXMFLOCAL |
| 63 | 12 | J. Simmons | ## sudo texhash TEXMFLOCAL |
| 64 | 11 | J. Simmons | where you substitute the full path for TEXMFLOCAL |
| 65 | 12 | J. Simmons | # Install minted |