I am forced to use a Mac for a while. My log-file says my class file is in:


Does this mean my packages are in this folder?


Also, the latex/base folder how do I access it? I can't find it in my finder.

Sorry for this stupid questions but I'm not used to working on a Mac.

Second question: what I have to do to get my class working? I am used to click the Refresh DNB button on Miktex but that won't work on OS X.

4 Answers 4


Most of the core packages are probably in a subfolder of /usr/local/texlive/2010/.

I'm not that familiar with mactex, but it's based on TeXlive, so you can use TeXlive utilities to find stuff.

To find where a given package is installed, you can open a terminal and type:

kpsewhich <packagename>.sty

And it should show you the full path to the file.

If you want to install custom classes and style files, I'd recommend using the TEXMFHOME tree. You can find out what this is by typing:

kpsewhich -var-value TEXMFHOME

I believe on a mac this defaults to ~/Library/texmf/. You could for example put a custom class file in ~/Library/texmf/tex/latex/myclass/ . At some point you may need to run:

mktexlsr ~/Library/texmf

to get this folder recognized by the system, but it may already be. (mktexlsr and sudo mktexlsr for system files are the equivalent of refreshing the file name database in MiKTeX.)

The command:

kpsepath tex

would show you all the folders searched for tex (.sty and .cls) files at compilation time. (If it ends in /// it'll search subfolders.)

I'm afraid I have no clue why these wouldn't show up in Mac's finder. I don't use a mac.

  • Thx, its SO long ago since i used OSX. Now knowing these commands. I prefer it over Windows tbh.
    – Elmer
    Commented Feb 11, 2011 at 19:33
  • 1
    You don't need to texhash (which for some reason they renamed mktexlsr) the local TeX folder with a sufficiently new TeX Live/MacTeX (I think 2008 or newer): it's automatically scanned on each TeX run. (The logic is that the local folder is small, so the time saving from a database is not really important.)
    – Joseph Wright
    Commented Feb 11, 2011 at 19:50
  • Thanks @Joseph. I couldn't remember whether or not this was the case, so that's why I added "it may already be".
    – frabjous
    Commented Feb 11, 2011 at 20:08
  • @Joseph: "The logic is that the local folder is small" HaHa, not my one! :-) Commented Feb 11, 2011 at 20:40
  • @Martin. Compared to the installation folder (which is several Gb)
    – Joseph Wright
    Commented Feb 11, 2011 at 20:53

To answer the specific part about seeing the files in Finder, you can get to ~/Library/texmf easily enough. For the installation itself there are a few routes: I'll pick one. Open a Finder window and go to 'Machintosh HD' (on the left-hand sidebar) then Library/TeX. There is a link there to Root, which will go to your installation without needing to worry about where is actually is. Secondly, you can

  • Is the Root folder in Libarary/Tex the best place to install stuff like fonts/packages/classes? hx btw
    – Elmer
    Commented Feb 11, 2011 at 21:12
  • @Elmer: No, don't put stuff in the main installation folder. If you are installing just for you, use ~/Library/texmf.
    – Joseph Wright
    Commented Feb 11, 2011 at 21:20
  • 1
    Actually, the full TeXlive installation is accessible from the Finder, but that requires a trick. Under the Go menu in the Finder, select the "Go to Folder..." item. A small dialog window appears where you can type any Unix locator, such as /usr/local/texlive/2010/texmf-dist/ and this then opens a Finder window where you can see (in column view) the full TDS tree of the installation. Look, but don't touch; this is just a trapdoor to the Unix layer underlying the MacOS interface.
    – jvarilly
    Commented Feb 12, 2011 at 7:47
  1. The packages are most likely at /usr/local/texlive/2010/texmf-dist/tex/latex/<package>/<package>.sty, e.g. xcolor would be at /usr/local/texlive/2010/texmf-dist/tex/latex/xcolor/xcolor.sty.

  2. You can access this files and directories with the file explorer/shell/whatever the Mac has. I never used one, so I don't know about this. You can ask that part in an Mac forum.

  3. With TeXLive I always use texhash (as admin) or texhash /path/to/your/user/texmf/tree to update either the global or my user texmf tree (=the place where the LaTeX files are). This is the equivalent of MikTeX's Refresh DNB. Maybe it works for MacTeX as well. (texhash seems to be only an alias for another application, but it works for me).

  • 1
    See my comment to frabjous about texhash: you don't need it for local installs nowadays.
    – Joseph Wright
    Commented Feb 11, 2011 at 19:51

Mac's Finder won't let you see hidden files or directories like /usr by default. You could coerce it to always show them by setting environmental variables to change the default or using applescript, but I figure Apple has a good enough reason to have it that way, so I prefer to show them on a per-case basis. For your TeX distribution you should fire up the Terminal and type:

open -a finder /usr/local/texlive/

A Finder window will open up showing you the contents of that directory and letting you browse them and edit them at your whim.

  • the Terminal is not needed for that. See my comment on Joseph Wright's answer above.
    – jvarilly
    Commented Feb 23, 2011 at 22:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .