2

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.

  • 2
    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 01:12
  • Both those solution should work and do work on my 10.8.4 OSX. check that the .sty file is readable by everyone and that you don't have runtime conflicts. – Xavier Jun 27 '13 at 01:14
  • @AlanMunn: Just tried Your suggestion; no dice. – xuinkrbin. Jun 27 '13 at 01:28
  • @Xavier: How do I know if I have "runtime conflicts"? – xuinkrbin. Jun 27 '13 at 01:28
  • 1
    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 01:36
  • Are you using MacTeX or some ports version like Macports? I would highly recommend using MacTeX. – Alan Munn Jun 27 '13 at 02:15
  • 1
    @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
  • @Xavier: I have "/opt/local/bin/texhash", "/opt/local/bin/latex", texhash is /not/ parsing that directory. How would I get it to do so? – xuinkrbin. Jul 01 '13 at 00:06
  • @AlanMunn: Sorry for the delay. I was addressing the duplicate issue first and why it's not really a duplicate and then focusing on the comments. I believe I have TexLive. It has been a while since I installed it. Is that different than MacTex? – xuinkrbin. Jul 01 '13 at 00:08
  • Ok. This is your problem. You have installed the MacPorts version of TeX. The simplest thing for you to do is remove that version and install MacTeX. You will save yourself no end of trouble that way. (You probably don't even have to remove the MacPorts version, but it would be better if you did.) – Alan Munn Jul 01 '13 at 00:08
  • 1
    @AlanMunn: Success, thank You. I only wish You could list this idea as an answer so I could "accept" it. – xuinkrbin. Jul 01 '13 at 00:50
  • 1
    I'm glad it worked, that's all. We really do try to be helpful around here. :) – Alan Munn Jul 01 '13 at 00:58

2 Answers2

8

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.

Alan Munn
  • 218,180
1

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.