Installing LaTeX fonts for TeTeX

For some reason, there is little documentation on installing LaTeX fonts. It is actually quite easy. All that is needed is a Metafont (.mf) font definition file. This example also shows how to get large Greek letters in LaTeX.

Installing fonts

  1. Download font from CTAN Web site
  2. tar -xzvf yannis.tar.gz in a local directory
  3. cd /usr/share/texmf/fonts/source/public (as root)
  4. mkdir greek
  5. cd greek
  6. Copy all the files to the new directory: cp /home/bubba/text/fonts/yannis/* (or wherever).
  7. for each .tfm file in the directory, run mktextfm:
    • mktextfm rgrsl10
    • mktextfm mrgrbf10
    • mktextfm mrgrrg10
    • mktextfm rgrrg10
    • mktextfm rgrti10
  8. If all you have is .mf files, run mf first:
    • mf '\mode:=localmode; mag := magstep1; input teng10'
  9. ls /var/cache/fonts/tfm/public/greek/ should show a number of new tfm files
  10. texhash
  11. Put a line in your latex file:
    \font\greekba = mrgrbf10 scaled \magstep 1
  12. Now using
    \greekba abcde 
    in your LaTeX file will use the new fonts while remaining in text mode.

Sometimes the above simple procedure is not enough. In this case, it is necessary to perform additional steps.

  1. Some packages come with a .ins (install) file and a .dtx or .tex (documentation) file. If so, you are in luck. Run the commands
          latex <package-name>.ins 
          latex <package-name>.dtx 
          latex <package-name>.tex     
    . Most likely, this will give you an opportunity to see what happens when somebody writes an install file that does not work:
          latex abcdtex.ins
          This is TeX, Version 3.14159 (Web2C 7.3.7)
          LaTeX2e <2001/06/01>
          Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n
          ohyphenation, loaded.
          (./abcdnft.tex Version 5.20 -- DECEMBER 6th, 1996
          ! Undefined control sequence.
          l.9 \rm
          ? x
          No pages of output.
          Transcript written on abcdtex.log.  
    However, sometimes one or more of the .tex files will work, and you can obtain some documentation on how to use the package.
  2. Check in /etc/texmf/texmf.cnf to find the paths for .tfm, .mf, and .sty on your system. Or do it the way most people find them:
         locate tex | grep .tfm$
         locate tex | grep .mf$
         locate tex | grep .sty$     
  3. Put each file type in the location specified in texmf.cnf. This will only work if the tfm fonts are already built. For example:
         makedir /usr/share/texmf/fonts/source/public/abcd
         cp *.mf /usr/share/texmf/fonts/source/public/abcd/
         makedir /usr/share/texmf/fonts/tfm/public/abcd
         cp *.tfm /usr/share/texmf/fonts/tfm/public/abcd/
         makedir /usr/share/texmf/tex/latex/abcd
         cp *.sty /usr/share/texmf/tex/latex/abcd/
         cp *.def /usr/share/texmf/tex/latex/abcd/  
    Do the same if the package has .vf files. Double-check to make sure the new directories are readable
         drwxr-xr-x    2 root     root         3952 Aug 18 15:30 abcdtex 
    Sometimes, the fonts will be incompatible with your installation (e.g., 300 dpi instead of 600 dpi, etc.). If the LaTeX file compiles, xdvi should create some .600pk files automatically. These should turn up in your font cache directory:
         find /var | grep .600pk$
         ls -lrt /var/cache/fonts/pk/ljfour/public/abcd/
         -rw-r--r--    1 tjnelson users       15320 Aug 18 16:45 abcd13.600pk
         -rw-r--r--    1 tjnelson users       15320 Aug 18 16:45 abcd20.600pk  
  4. For teTeX or fpTeX, type `texhash' to update the filename database. For mikTeX, the command is `initexmf -update-fndb'.
  5. Sometimes .tex files are included. If you get errors, try running them with tex instead of latex.
  6. It should be working now.

Using large Greek letters in LaTeX

It is often difficult or impossible to get Greek letters and other symbols available in math mode to display larger than 12 points. This is inconvenient for many purposes, such as creating figures for publication. Here are four ways to do it.

Method 1

The best way is to avoid math mode altogether and install Greek fonts as shown above, or use the psyro or sy fonts which are part of the TeTeX distribution. Magstep can be 1 to 5. The disadvantage of using non-standard fonts is that publishers will not be able to use your LaTeX file. Send them PDFs instead.
  1. Install yannis fonts as described above
  2. Add a line to your latex file:
         % Greek bold slanted
         \font\greeke = psyro scaled \magstep 5 
         \font\greekbse = sy scaled \magstep 5 
         % yannis fonts (Greek upright)
         \font\greekre = rgrrg10 scaled \magstep 5
         % yannis fonts (Greek bold upright)        
         \font\greekba = mrgrbf10 scaled \magstep 5
         % yannis fonts (Greek italic)        
         \font\greekbe = rgrti10 scaled \magstep 5     
  3. Use
     \greeke a 
    in your LaTeX file to get a text-mode `alpha'.

Method 2

This is a kludge from the TeXbook which copies the pixels in several locations to make it bigger. Even so, it still looks tolerable when printed out. Using "\boldmath" will make it bigger. Note that \Large\$\mu$ does not usually work by itself.
    1.23\boldmicro M    

Method 3

Create a small file in math mode at the normal size, then edit the PostScript output. After the line
Add the line:
    2 2 scale
to make it 2 times larger. It may be necessary to add "translate" commands to keep the image on the page, e.g.
    -100 200 translate 
Then incorporate the PostScript into your document using the \picture{} environment:
    \put(0, 0){\epsfig{,height=3.5 in}}
It is not really necessary to edit the PostScript if you use the `height' option, although it does add give it that hacker ambience. This is the only easy way to mix extremely large characters with normal-sized text.

Method 4

The simplest method uses \Large to make the entire math section bigger; however, it doesn't seem to work on all LaTeX installations.
    \Large$\mu\times cos\theta$
    \LARGE$\mu\times cos\theta$

    \boldmath$\mu$ \Large$\mu\times cos\theta$ \\