adding-fonts-tetex

If you, as I, can live with the thought of having binary data in your $HOME, having a texmf directory in $HOME which you can keep in sync with a simple rsync -vauR $HOME/texmf target: is a lot easier than execute all commands needed to install fonts into tetex, the system-wide way.

I wanted to have the font garamond available to tetex on the computers I regularly work on. Here is a howto do add a font to tetex without having to use root priviledges.

And remember, do it once and then use $ rsync -vauR texmf target:

1. install unzip, obtain the font from ctan, and unzip it.

$ sudo apt-get install unzip
$ wget -nd http://www.ctan.org/get/fonts/urw/garamond.zip
$ unzip garamond.zip
$ cd garamond

2. create $HOME/texmf if you haven't already, and copy the font files to appropriate places in the tree.

$ mkdir -p texmf/fonts/type1/urw/garamond
$ cp -v garamond/*.pfb texmf/fonts/type1/urw/garamond
$ mkdir -p texmf/fonts/type1/afm/urw/garamond
$ cp -v garamond/*.afm texmf/fonts/type1/afm/urw/garamond

3. create virtual fonts and tex font metrics for garamond by using the script inst-ugm.tex supplied in ugmfnst.zip. If another font package do not provide such a script, see http://linux.about.com/od/howtos/l/blfont9.htm for how to do this step.

$ cd garamond
$ unzip ugmfnst.zip
$ latex inst-ugm.tex
$ for i in *.pl  do pltotf $i done
$ for i in *.vpl  do vptovf $i done

4. move the virtual fonts into $HOME/texmf/

$ mkdir -p $HOME/texmf/fonts/vf/urw/garamond
$ mv -v *.vf $HOME/texmf/fonts/vf/urw/garamond
$ mkdir -p $HOME/texmf/fonts/tfm/urw/garamond
$ mv -v *.tfm $HOME/texmf/fonts/tfm/urw/garamond

5. inform latex about the garamond font

$ unzip ugm.zip
$ mkdir $HOME/texmf/tex
$ mv -v tex/latex $HOME/texmf/tex

Now, you can run latex and it will be able to create a proper dvi-file. If you also want xdvi and dvips to be able to manage the resulting dvi-file, you will have to install a map-file for dvi.

6. inform the dvi/ps/pdf utilities about the garamond font. This is actually the most complex part of the whole process. The debian tetex utitlies differ from the vanilla ones, so most of the non-debian documentation found on the net are not helpful here, I used information from http://www.logic.at/staff/preining/talks/eurotex07-talk.pdf

$ mkdir $HOME/.texmf-config/updmap.d
$ mv -v dvips/config/ugm.map $HOME/.texmf-config/updmap.d/
$ update-updmap
$ TEXMFVAR=$HOME/texmf updmap

7. clean up

$ cd
$ rm -rf garamond
$ rm garamond.zip
$ sudo apt-get remove unzip

comments powered by Disqus


Back to the index

Blog roll

R-bloggers, Debian Weekly
Valid XHTML 1.0 Strict [Valid RSS] Valid CSS! Emacs Muse Last modified: 2007-12-14