LaTeX is a very useful editor for writing scientific papers or theses that contain mathematical symbols or formulae. It is usually not pre-installed on OSX, but installation is straightforward.
MacTeX or BasicTex?
The full MacTeX installation file can be 2-3 GB (yes, gigabytes), so could take a while to download, depending on your internet connection. On the plus side, it is fairly comprehensive.
The smaller BasicTex option is only around 100 MB, so it could be worth starting with that if you want to get going, while you wait for the MacTeX download to finish.
If MacTeX download is very slow
If your download is very slow, even though you have a good internet connection, consider choosing the download mirror manually.
- Choose a mirror close to your location that has an http link. For example, if you are in the UK, there is the mirror http://mirror.ox.ac.uk/sites/ctan.org/
- Click on the systems link. It will take you to a page that looks like a directory listing.
- Search for the mac folder and click on it
- There may be a mactex subfolder, or the
MacTeX.pkgfile will be in the mac folder itself. You should see the size next to the file as something like
2.9 G. Download the
MacTeX.pkgfile to your computer.
Go to the folder (e.g.
~/Downloads) that contains the downloaded
MacTeX.pkg file. Double-click on it and follow the prompts to install.
Modifying the bash_profile
In order for OSX to find the new LaTeX, you need to add its path to your
~/.bash_profile file. The following commands accomplish this (although you may need to modify the path slightly - please check!):
echo "# LaTeX path: " >> ~/.bash_profile
echo "export PATH=/usr/local/texlive/2017/bin/x86_64-darwin:\$PATH " >> ~/.bash_profile
And then run:
That's it, enjoy using LaTeX!