How to: LaTeX Beamer for TeX Live on OS X

Published June 2, 2008

Here you'll find instructions to install LaTeX Beamer on a TeX Live system, which was installed via MacPorts (but should also work on other installations if you adjust the TEXMF path).

If you don't want to follow the whole instruction, be sure to check out the Bash script, which installs LaTeX Beamer for you, at the end of this post.

Installation

First we need to download LaTeX Beamer and it's required dependencies (xcolor and pgf). The files can be downloaded on the corresponding website at SourceForge or via these direct links:

Upon completion of the download the files need to be extracted:

tar xvzf latex-beamer-3.07.tar.gz
tar xzvf xcolor-2.00.tar.gz
tar xvzf pgf-1.01.tar.gz

The TeX directory structure has a specific hierarchy (the TEXMF tree) and various locations where it looks for its files. The default TEXMF tree on a MacPorts TeX Live installation is located at /opt/local/share/texmf/.

To make use of the packages, we need to create the appropriate directories in the TEXMF tree, and place the previously extracted files there:

sudo mkdir -p /opt/local/share/texmf/tex/latex/{beamer,pgf,xcolor}

sudo mv latex-beamer-3.07/* /opt/local/share/texmf/tex/latex/beamer/
sudo mv pgf-1.01/* /opt/local/share/texmf/tex/latex/pgf/
sudo mv xcolor/* /opt/local/share/texmf/tex/latex/xcolor/

TeX does not recognize these new files right away since it uses a cache (the ls-R database) for efficiency reasons. The following command rebuilds the ls-R database:

sudo texhash

Testing

We can copy&paste the example from the LaTeX Beamer website into a newly created file and compile it in order to test the installation:

pdflatex filename.tex

This should, among various other file formats, create the presentation in the pdf format (filename.pdf).

Bash script

Following a installation instruction step-by-step can be a very time-consuming task. But since I'm a huge fan of automating tasks, I wrote a small Bash script which basically performs all the steps mentioned above. (Note: You'll need to have wget installed.)

Download the Bash script here.

Don't forget to make the file executeable:

chmod u+x latexbeamer_texlive.sh

That's it. I hope the Bash script will be useful for some people.

For further information on the TeX system, I recommend reading Managing a one-person TeX system.

Comments

Rajesh on July 11, 2008
Hi! Thanks a lot for the instructions for installing beamer. It worked as you said, unlike many other readme instructions. Rajesh

Reply

Dave Liu on July 24, 2008
Thanks! very useful!

Reply

thorsten on August 22, 2008
This post was a life saver. I've been struggling way to long with this trying to do TDS-Compliant installations and whatever... but after all it was just a matter of dependencies - and all solved with a "sh latexbeamer_texlive.sh" :)

Reply

Christian Julliard on September 1, 2008
This was REALLY useful - thanks a lot (especially since I was a PC user until few days ago...)

Reply

Jian Ma on September 24, 2008
I think now texlive has a pretty convenient tool called tlmgr to install/update these packages.

Reply

Yun Zhang on October 2, 2008
On my Leopard, textlive local texmf is located at a different path. Mine is at: /usr/local/texlive/texmf-local/tex/latex For your information if you cannot find /opt directory

Reply

Mike on October 3, 2008
Awesome! Thanks a ton!! Worked beautifully.... after some fiddling around. My local install is in: INSTALL_DIR=/sw/share/texmf/tex/latex I noticed your script needs to have the INSTALL_DIR manually inserted on several lines. Also, xkeyval was missing from my /sw/share/texmf/tex/latex/ so I had to fetch that and install it manually, and run sudo texhash again. But after doing that I could use, for example, the pgf/tikz package. So, thanks again.

Reply

Harish on October 8, 2008
Thanks for the instructions! it works awesome...i was looking around so much to this. i will give a link to your page from my webpage!

Reply

Xóchitl López Lozano on October 16, 2008
Hello and Thank you very much! I am very happy =) It was quite straight forward the installation following your instructions. Once I installed the The MacTeX-2008.mpkg package then placed the latex-beamer-3.07/, pgf-1.01/ and xcolor/ directories in /usr/local/texlive/2008/texmf/tex/latex One really has to pay attention on the local installation. Btw, I am using Ma OS X 10.4.11. Thanks again!

Reply

Reply