[Tex/LaTex] Problems installing custom beamer style on Mac

beamerpresentations

I have texpad installed on my Mac, and would like to install a custom beamer style – Frederiksberg (can be found here: http://www.matdat.life.ku.dk/LaTeX/Frederiksberg/ )

The manual is not entirely exact on where to place the styles, as it was developed on linux. it mentioned a directory called /usr/local/gwTeX which i do not seem to have.

i have instead search quite a bit for a solutions, and it seems that the most common way to install custom styles is to make a couple of directories in ~/Libraries so that the styles are located in /Library/texmf/tex/latex/beamer/. as it is in my "personal tree" it should be enough to simple leave the styles there as the directories are searched automatically

it does, however, not work. texpad gives me the error:

! LaTeX Error: File `beamerthemeFrederiksberg.sty' not
found.

texpad looked in the directory /usr/local/texlive/2013/texmf-dist/tex/latex/beamer/…

which of course prompted me try and put the the file in that directory – more specifically in /usr/local/texlive/2013/texmf-dist/tex/latex/beamer/themes/theme where there are already a bunch of beamer themes, such as "beamerthemeGoettingen.sty" and "beamerthemeWarsaw.sty". Goettingen and Warsaw worked, but Frederiksberg did not – i have double checked for spelling mistakes :/

does anyone know what the problems is? the "texmf/tex/latex/" solution does not appear to work with texpad on my computer, and neither does placing it with the other styles.

EDIT: thought i might share the code also

\documentclass[12pt,t]{beamer}

\usetheme{Frederiksberg}

\title{My Nice Presentation}
\subtitle{Test}
\author{Productive Scholar}
\date{\today}
\institute[2014]{KU-SUND}

\begin{document}
\frame[plain]{\titlepage}

\end{document}

Best Answer

You should NOT put custom or personal additions under /usr/local/texlive/2013/ as that directory should be reserved for the TeX distribution. Changes you make there can easily be overwritten when you update the installation and will certainly be lost if you switch to, say, TeX Live 2014.

The reason it doesn't work when you add the theme there is because TeX relies on a database of hashed names to find things in that directory. You would have to also update that database in order for the theme to be found.

You have two options.

  1. Your personal texmf tree. TeX does not use a hashed database to search this directory - it just looks at what is there at the time of compilation.
  2. /usr/local/texlive/texmf-local/ [note that this is NOT under a directory named for a year]. TeX does use a hashed database for this directory. So if you use this one, you need to update that database in order for the theme to be found.

The first option is easier since all you need do is put the file in the correct place - no need to worry about updating any database.

Try placing the theme in <your home directory>/Library/texmf/tex/latex/beamer/themes/ to mirror the directory structure you found in your main texmf tree. Note that you should NOT use /Library. You want to use <your home>/Library/.

If you did want to use the local texmf tree rather than your personal one - perhaps because other users of the machine should have access to the same theme - you could use /usr/local/texlive/texmf-local/tex/latex/beamer/themes/. To update the database of names, you would then need to run mktexlsr /usr/local/texlive/texmf-local. (You could just run mktexlsr but it is a little quicker to specify the appropriate texmf tree.)