I've installed texlive 2012 which has two main folders: 2012 and texmf-local. To organize my documents I created a new folder I called doc under texmf-local. Up to now this has worked fine.

For this purpose is texmf-local the correct folder and doc a good name or are there better ways?

ADDED. I am the only user. I've forgotten to mention that texlive 2012 is installed on Windows 7.


This is not really a good way to organize your documents. You should think of the folders in in the TeX Live directory as equivalent to folders that belong to a particular application, and you wouldn't normally store your documents created by that application with the application.

So you should generally not keep your documents inside the texlive folder at all, but wherever makes sense for you within your home folder, just like any other documents you might have.

The only things that go in the texmf-local folder are local packages and TeX related stuff that is meant to be accessible to multiple users on a single machine. If you are the only user, there's little need to use this directory at all, but instead should use your local texmf folder. On a typical Linux system, your local texmf folder is located in ~/texmf; on a Mac, it's ~/Library/texmf; in Windows it's \texmf in your user folder. See How to have local package override default package for some more information on your local texmf folder and how it is used and organized.

So here's a basic organization first Linux/Mac, then Windows paths:

  • /usr/local/texlive/<year> Windows: C:\texlive\<year>
    • Used only TeXLive; leave this one alone
  • /usr/local/texlive/texmf-local Windows C:\texlive\texmf-local
    • System wide additions to your TeX distribution
  • /texmf (Linux); ~/Library/texmf (Mac); %USERPROFILE%\texmf (Windows)
    • User additions to your TeX distribution

Any other document that you create (i.e. any regular user document created with TeX) should simply be placed in any folder that makes sense for your personal organization. For example, I have a folder for each course I teach, and subfolders for different semesters. I have folders for research topics and then subfolders for articles I'm writing on those topics. But these choices are very personal, and you should place your TeX documents in whatever folder structure makes sense for you just like you would any other kind of document you produce.


There are two good reasons for storing files under texmf-local:

  1. You (and/or any other users on your system) need to have access to packages that are not distributed automatically with TeXLive (or its close sibling, MacTeX). This may be because of licensing restrictions or because the package is non-free (e.g., a font-related package such as mtpro2). That way, if and when you update from TeXLive2012 to TeXLive2013, etc., these files will remain accessible to you.

  2. You wish to use a "beta" version of a package, where the (established, non-beta) version is distributed with MacTeX but the beta version is not. This is the case, for instance, with the microtype package: The official version, distributed with TeXLive, is still 2.4; a beta edition of version 2.5, which may be found on the 'Net, possesses features that you may sorely need and wish to have access to now. By installing the beta version in the local-texmf folder, it will be "found" by TeXLive before the official version.

    Note that the doc subfolder below texmf-local should be used for the user guides and other such files that come with your manually installed packages. That way, you may access the user guides via the texdoc command.

All other TeX-related files of yours, such as your TeX documents, should not be placed anywhere below texmf-local.

  • True, but unless you have multiple users/accounts on your machine, there's little advantage to using texmf-local vs. your user texmf folder, I think. – Alan Munn Dec 5 '12 at 16:24
  • @AlanMunn: I guess that if you can be absolutely sure that there will never be any other users on your computer system, then there's definitely no advantage to using texmf-local rather than ~/texmf for these packages. On the other hand, if you think there's at least an outside chance that more than one user will operate on your computer, there's no downside (and quite some upside, AFAICT) to storing these additional packages under local-texmf from the get-go. – Mico Dec 5 '12 at 16:28
  • At least on a Mac, dealing with things in /usr/local requires admin privileges, and the relevant folders are not trivially accessible via the Finder (although since Lion even ~/Library is no longer directly accessible in the Finder) so depending on the user skills, using texmf-local is just more of a pain. I don't know if this is as true for Windows or Linux, however. – Alan Munn Dec 5 '12 at 17:43
  • 1
    @Mico You need to texhash texmf-local, whereas your personal tree is always searched and does not need to be hashed. So there are some advantages to using the personal tree, particularly if you want to regularly alter the content. – Joseph Wright Dec 5 '12 at 19:00
  • @JosephWright -- point well taken. Speaking strictly for myself, I find it quite advantageous at times (mostly because I tend to commit fewer silly mistakes that way!) to have to perform certain activities in sudo mode. I find that I run tlmgr about twice a week anyway to keep up with new and updated packages; given this setup, having to run texhash (via sudo) isn't really much of an extra chore. Naturally, others may well feel rather differently about the burden imposed by these chores. – Mico Dec 5 '12 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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