Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this document

Formatting Information — An introduction to typesetting with LATEX

Appendix A: Installation

Section 3: Your Personal TEX Directory

There are always new packages coming out, and others being updated. There are also times when you may want to add a new or uncommon class or package by hand — perhaps a private one from a company or organisation (so LATEX and CTAN won’t know about it), or even one you are writing yourself.

To do this, you need a place to put the files where they won’t get mixed up with your documents or with TEX’s own files. This is the ‘The Right Place’ to put files mentioned in step 3 above, and it’s known as your Personal TEX Directory (PTD) or Personal TEX Folder (PTF).

LATEX will automatically check this place first for classes and packages, so anything you put in your Personal TEX Directory will be found before any file of the same name in your main TEX installation. This is why it’s important for manual updates, and for special or private classes, packages, styles, and fonts.

The folder is called texmf (short for TEX and METAFONT), and it goes in your home or login directory. On Unix & GNU/Linux systems, including Apple Macintosh OS X, and on TEX Live systems on Microsoft Windows, you just need to create the folder. In MiKTEX and ProTEXt you need to tell MiKTEX where it is (see the procedure ‘Click the Start or Windows button …’ below).

Unix and GNU/Linux

You can either use the terminal or the file manager:

Either

open a terminal (console) window and type

mkdir ~/texmf
Or

use a file-manager:

  1. Open a file-manager window (eg Thunar, Nautilus, Dolphin, etc) on your Home directory

  2. Right-click in an empty area of your Home directory so the menu dialog appears

  3. Click Create New Folder

  4. Type the new folder name texmf

  5. Press the Enter key

  6. Close the file-manager

Now create the TDS subdirectory structure

At the barest minimum, you MUST create the directory and subdirectory tex/latex inside your new Personal TEX Directory (PTD).

If you want to recreate the entire subdirectory tree, there are instructions in § 3.2.3 above.

Apple Mac OS X

You can either use the terminal or the file manager:

Either

open a Terminal window (find Terminal in ApplicationsUtilities or type Terminal into Spotlight) and type

mkdir ~/Library/texmf
Or

use the Finder:

  1. Open the Finder on your Home folder

  2. Click on ViewAs Columns

  3. Click on ViewShow View Options and in the Options dialog which appears, make sure that Show Library Folder is checked, then close the dialog window and select Library in the list of folders

  4. Click FileNew Folder

  5. Name the new folder texmf

  6. Close the Finder

Now create the TDS subdirectory structure

At the barest minimum, you MUST create the directory and subdirectory tex/latex inside your new Personal TEX Directory (PTD).

If you want to recreate the entire subdirectory tree, there are instructions in § 3.2.3 above.

Microsoft Windows

You can either use the terminal or the file manager:

Either

open a Command window (find Command in All Programs) and type

cd %USERPROFILE% 
md texmf

On older Windows systems (7/8/95/XP/ME) use %HOME% instead of %USERPROFILE%.

Or

use the directory manager:

  1. Open My Computer (just called Computer in older Windows systems)

  2. Create a new subfolder called texmf

    • in the C: drive (older Windows)

    • in Computer\System\Users\your~name\texmf (Win 7/8)

    • in C:\Users\your~name\texmf (Win 10 and up)

    texmf-addnewfolder
  3. Type in the new folder name texmf (make sure it is called texmf in all lowercase) and press the Enter key.

    If Windows makes the T capital, change it to lowercase t.

Now create the TDS subfolder structure

At the barest minimum, you MUST create the folder and subfolder tex/latex inside your new Personal TEX Directory (PTD).

If you want to recreate the entire subdirectory tree, there are instructions in § 3.2.3 above which can be adapted for Windows systems.

Finally…if you use MiKTEX or ProTEXt

If you use MiKTEX or ProTEXt you MUST now tell MiKTEX to add this folder to its File Name Database (FNDB). This step is compulsory: without it, nothing will work.

  1. Click the Start or Windows button and run the MiKTEX Options (maintenance) program (it should be shown among your recent programs).

  2. Click the Roots tab and the Add button, and navigate in the window to the place where you created the texmf folder above

    miktex-add-directory
  3. Click on the General tab and tell MiKTEX to update its FNDB along with its other folders by clicking the Refresh FNDB button (the mediaobject ‘…’ below)

    miktex-update-fndb

Warning

In MiKTEX you MUST click on the Refresh FNDB button any time you make changes to the contents of your Personal TEX Directory (the texmf folder), otherwise MiKTEX will not be able to find the files.