« Previous -
Version 11/18
(diff) -
Next » -
Current version
J. Simmons, 01/29/2015 09:52 pm
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¶
- Download and install MacTex
Be sure to install detected updates for MacTex (instructions used v.3.48) - Download and install Sage (instructions used v.6.4.1)
- Configure SageTex (per 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
- Rename the Sage Application from /Applications/Sage-<version number>.app to /Applications/Sage.app
- 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
Adding Units Support with Pint¶
- Open Terminal
- /Applications/Sage.app/Contents/Resources/sage/sage --python -m easy_install pint
- Close the terminal
Notes¶
- 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)
- 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.
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¶
- Install kile from the repository
sudo apt-get install kile - Download and install Sage (instructions used v.6.4.1 and followed the instructions for the Ubuntu PPA)
- Configure SageTex (per Sage Documentation)
- Perform CLI steps
Note: you will need to find the installation path for Sage (labeled SAGE_ROOT below, on test box SAGE_ROOT=/usr/lib/sagemath/)- Determine the systemwide TeX directory (probably will be /usr/local/share/texmf)
kpsewhich -var-value=TEXMFLOCAL - sudo cp -R SAGE_ROOT/local/share/texmf/tex TEXMFLOCAL
where you substitute the full paths for SAGE_ROOT and TEXMFLOCAL - sudo texhash TEXMFLOCAL
where you substitute the full path for TEXMFLOCAL
- Determine the systemwide TeX directory (probably will be /usr/local/share/texmf)
- Perform CLI steps