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).
Creating a Personal TEX Directory- 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:
Open a file-manager window (eg
Thunar,
Nautilus,
Dolphin, etc) on
your Home directory
Right-click in an empty area of your Home
directory so the menu dialog appears
Click
Type the new folder name
texmf
Press the Enter
key
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
or type Terminal into
Spotlight) and type
mkdir ~/Library/texmf
- Or
use the Finder:
Open the Finder on your Home folder
Click on
Click on
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
Click
Name the new folder
texmf
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 ) 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:
Open My
Computer (just called
Computer in older
Windows systems)
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)
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.
Click the Start or
Windows button and run the
MiKTEX Options (maintenance) program (it should be
shown among your recent programs).
Click the Roots tab and the
Add button, and navigate in
the window to the place where you created the
texmf folder above
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)
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.