There are always new classes and packages coming out, and
others being updated (see the list in § 3.2 above). If you use an automated updater like
TEX Live’s tlmgr or MiKTEX’s
Update-FNDB then updates will get
put in ‘The Right Place’ automatically, and you
don’t need to do anything else.
But there are also times when you may want to add a new or
special class or package by hand; perhaps a public one that
comes from a publisher’s web site rather than
CTAN; maybe a private one from your company
or organisation (so LATEX and CTAN won’t
know about it, and you’re not allowed to share it); or maybe
classes and packages you are writing yourself.
Every users needs a place to put such files where they
won’t get mixed up either with your
documents or with TEX’s own files. This
is the ‘The Right Place’ to put files mentioned
in § 3.2.2 above, and it’s known as
your Personal TEX Directory (PTD)
or Personal TEX
Folder (PTF).
LATEX will automatically check this folder first for
classes and packages, so anything you put in your Personal TEX Directory will be
found before LATEX looks anywhere else.
This is why it’s important for manual updates, and for special
or private classes, packages, styles, and fonts.
For TEX Live on Unix &
GNU/Linux systems, including Apple
Macintosh OS X, you do not need to do anything else, just
put your new files in your Personal TEX Directory and
LATEX will find them;
For MiKTEX (only) you need to tell the MiKTEX
Console afterwards where you created your Personal TEX Directory (see
step 3 below) and update your
FNDB when you add or remove
files.
For TEX Live, the folder
MUST be called
texmf (short for TEX and METAFONT),
and MUST go in your home
(login) directory on Unix &
GNU/Linux systems and Microsoft Windows
running TEX Live,
or in the user’s Library folder on Apple
Macintosh OS X. For MiKTEX you can choose a different name
if you wish.
Creating a Personal TEX Directory
Follow the instructions for your operations system
below.
- Unix and GNU/Linux
You can use either 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
- Apple Mac OS X
You can use either the terminal or the file
manager:
- Either
open a Terminal window 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
- Microsoft Windows
You can use either the terminal or a file
manager:
- Either
open a Command window and type
cd %USERPROFILE%
md texmf
(On older Windows systems (7/8/95/XP/ME)
use %HOME%
instead of %USERPROFILE%.)
- Or
use the File
Explorer:
Open File
Explorer (called
My Computer or
Computer on older
Windows systems)
Make sure it is showing your home
folder: this
C:\Users\your~name
on modern Windows systems (on Windows 7/8
it is
Computer\System\Users\your~name
and on older Windows it is
C:\).
Right-click in your home folder and
pick , then
type in the name
texmf (make sure it
is called texmf in
all lowercase) and press the
Enter key.
Create the TDS subfolder
structure (all systems)
At a minimum, you
SHOULD create the TEX Directory
Structure (TDS) folders and subfolders
tex/latex,
fonts/truetype, and
fonts/opentype
inside your new Personal TEX
Directory because this is where you put the subsubfolders
for classes, packages, and fonts that you add manually,
for example
# I put my homebrew blockchart package in a blockchart directory
texmf/tex/latex/blockchart/
texmf/tex/latex/blockchart/blockchart.sty
# I put my supertramp package in a supertramp directory
texmf/tex/latex/supertramp/
texmf/tex/latex/supertramp/supertramp.cls
# I put Vivian Dehning's SuperTramp font in a dehning directory
texmf/fonts/opentype/dehning/
texmf/fonts/opentype/dehning/SuperTramp.otf
# I put daredemotypo's Faulmann font in a daredemotypo directory
texmf/fonts/truetype/daredemotypo/
texmf/fonts/truetype/daredemotypo/FaulmannFont-JRMgj.ttf
texmf/fonts/truetype/daredemotypo/FaulmannSmp-GO87G.ttf
If you want to recreate the entire
TDS subdirectory tree, there are
instructions for Unix &
GNU/Linux systems in § 3.2.3 above which can also be adapted for
Windows.
Update your FNDB (MiKTEX only)
If you use MiKTEX you
MUST now tell MiKTEX to
add your new Personal TEX 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 Console (maintenance options) 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.