Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I know this question has been asked before but the solutions given do not apply/work for My 10.8 system for one reason or another. I am attempting to install a style file. I place it in the subdirectory in the texlive installation and run sudo texhash. Yet, latex says, "No can do; cannot find the *.sty file." What about the suggestions to place the file in directory in ~/Library/texmf? Those proposed solutions expect a different directory structure beneath texmf than I have. I really have no idea where to put this thing so My Aquamacs.app can find it when creating a *.pdf file.

Addendum: I notice this question has been marked with the text "marked as duplicate by Martin Schröder, Werner, Sigur, cgnieder, mafp Jun 27 at 20:56 This question has been asked before and already has an answer. If those answers do not fully address your question, please edit this question to explain how it is different or ask a new question." To the "[i]f those answers do not fully address your question, please edit this question to explain how it is different" part, I did explain that aspect when I said "I know this question has been asked before but the solutions given do not apply/work for My 10.8 system for one reason or another." Please be more thoughtful in what You mark as "duplicate" before doing so; what looks like from My perspective to be unjustified marking like this seems to be happening with increasing frequency on StackExchange and, as such, diminishes the usefulness of the site. Meanwhile, I ask any Moderator seeing this to remove the "duplicate" marking.

Addendum #2: Also, the "This is where it was already answered" link is something I tried first. As noted, this approach did not work.

share|improve this question
In your ~/Library/texmf you need to create enough directory structure for TeX to find the file properly. For a .sty file, you would need ~/Library/texmf/tex/latex/<your-style.sty>. Remember that ~/Library is hidden by default, but you can get to it via the Go menu if you hold down the Option key. You don't need to run texhash for such files. –  Alan Munn Jun 27 '13 at 1:12
Check which versions of texhash and latex are running with the which command. Also, check the output of texhash to see if is parsing (the parent of) the directory you put your .sty in. If it is parsed, check that kpsewhere finds it. –  Xavier Jun 27 '13 at 1:36
@xuinkrbin You have edited your question but you haven't given us any more information to be able to diagnose what your problem is. For example, you haven't responded to my question in the comments or Xavier's comment. –  Alan Munn Jun 30 '13 at 23:59
@AlanMunn: Success, thank You. I only wish You could list this idea as an answer so I could "accept" it. –  xuinkrbin. Jul 1 '13 at 0:50
I'm glad it worked, that's all. We really do try to be helpful around here. :) –  Alan Munn Jul 1 '13 at 0:58

2 Answers 2

up vote 8 down vote accepted

The following answer comes from decoding the comments. The simple fact is that most TeX distribution problems on the Mac come from not having the MacTeX distribution installed.

In your case, you had the MacPorts distribution, which places everything in a /opt directory. However, most standard TeX editors for the Mac will assume that you have MacTeX installed. MacTeX installs a control panel which allows you to easily keep multiple TeX distributions on your machine and easily switch between this. Basically it does this by creating a series of symbolic links to the current distribution so that on the surface all TeX binaries are located in /usr/texbin.

Non-MacTeX distributions do not use this system, which is why Acquamacs couldn't find the TeX binaries. The MacTeX distribution also sets the local texmf folder to ~/Library/texmf, but MacPorts presumably doesn't assume this either.

The best solution to this problem is to remove the MacPorts distribution and install MacTeX instead.

Most Mac users here will assume you have this distribution setup, and most of the advice on the site also assumes that setup.

share|improve this answer
Thanks. I have found assumptions to be dangerous, though. ;-) –  xuinkrbin. Jul 1 '13 at 23:20

I was lead here by a search for how to install a Beamer theme (also an .sty file). For those who are inexperienced with adjusting TeX installations, as I am, the excellent answer in the addendum above was confusing. The directory listed in the addendum above didn't exist. It took a while to sort things out, so perhaps another can benefit. I started from a MacTeX installation of a 2014 Texlive distribution to a Mac 10.10 (Yosemite) with an existing 2013 installation.

  1. There are many 'mf' directories in various places in the directories created during install. I found no way of making sense of why things were labeled with 'mf'. It seems to be an historical holdover from "TEX" + "METAFONT" (see this posting). I looked through the MacTeX installation log, and generally they seem to be places the installation puts files that aren't TeX binaries.

  2. There is a path similar to the one listed in the addendum above, but anchored in the root directory for your system, /usr/local/texlive/texmf-local/tex/latex. This it seems is for adding latex extensions accessible to all users of your machine. Other software I had installed had put some files there.

  3. My installation had created also ~/Library/texmf, which is anchored to my particular user account (~/). I finished the path suggested above by creating folders using the Mac Finder. I believe this path is for additions that only extend the TeX installation I use.

  4. I added the Beamer theme file to the resulting folder, but my typesetting app, TeXShop, didn't find it. I looked at the log for the failed attempt and found it loading themes that came with the MacTeX installation from /usr/local/texlive/texmf-local/tex/latex/beamer but they all began with 'beamertheme'. I added this to my file and TeXShop found it.

  5. I created a subfolder in my account path named beamer and moved the theme file there and it still works.

TeX software looks through several paths to find files. To add style files for your installation (a) you can build the path ~/Library/texmf/tex/latex using Finder; (b) you can extend the path to keep your files organized and the software will still find them; and (c) Beamer theme files have to begin with 'beamertheme', as in beamerthemebjeldbak.sty.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.