1. Destination texmf-local: your local TeX tree
The first step is to determine in what directory the new font will live. You can't choose just any directory, it has to be part of the TeX hierarchy. The best choice is your “local texmf” tree, which you can determine as follows:- MiKTeX
- Navigate through the MiKTeX program:
Start > Programs > MiKTeX > Maintenance > Roots
(or MiKTeX Settings, in older versions). Some paths shown there have a Description such as Install, UserConfig, or UserData. A tree labeledUserConfig (but not any of the others) is an acceptable target for your new fonts, if you have no permission to create a new tree. However, it is better to use a tree without a description, as follows:You can create a new local tree by clicking on Add. The folder must not contain files at its root level or MiKTeX will reject it. Files in the folder must be in subfolders similar to the subfolders in the Install root. (MiKTeX info.) - TeX Live and MacTeX
- From a system terminal (aka command prompt, shell window) enter the command kpsewhich --var-value TEXMFLOCAL to see the directory name. The default on Unix is /usr/local/texlive/texmf-local.
2. Manual Package Installation
2.1 MikTex
If you want to install your own.sty
files, then you should copy the files into the directory tex/latex/mystuff
relative to a new TEXMF root directory.Example:
- Create a new TEXMF root:
mkdir ~/mytexmf
- Create a sub directory:
mkdir -p ~/mytexmf/tex/latex/mystuff
- Copy your
.cls
and/or.sty
files to~/mytexmf/tex/latex/mystuff
- Register the TEXMF root directory
~/mytexmf
2.2 TeX Live and MacTeX
The following are the steps that you should follow to install a new LaTeX package into your own home directory.- Download the package file(s) from wherever they are available. Most packages are available from CTAN; enter appropriate keywords in the search fields to find the files.
- Packages may be distributed in different ways. Many packages on CTAN, for instance, come with a .dtx file and a .ins file. If the package you are installing comes with these files, you will have to process them with latex to create the actual files that make up the package. That is, type
latex filename.dtx and/or latex filename.ins
to unpackage the various .sty and other files in the package. - Create a directory ~Library/texmf in your home directory, if there is not one there already.
- Install the various package files into subdirectories of texmf as follows:
- All .bst and .bib files into texmf/bibtex (or subdirectories)
- All font-related files into texmf/fonts (or subdirectories)
- All documentation files into texmf/docs
- All other files (.sty, .cls, .tex, etc.) should go into texmf/tex.
Source: [1, 2, 3, 4]
No comments:
Post a Comment