[Tex/LaTex] Install font easily – product integral

fontsinstallingUbuntu

Is there a way to install fonts easily from a tar.gz file? I'm looking to install http://www.math.leidenuniv.nl/~gill/prodint.tgz. The README states:

  1. Copy "prodint.tfm" and "prodint.pfb" where the LaTeX fonts live.

  2. Add to your "fonts.map" (usually in "/usr/share/texmf/dvips/config")
    the entry:

    prodint prodint < prodint.pfb
    
  3. Copy "prodint.sty" where LaTeX can see it.

  4. Execute `mktexlsr' or whatever you need to do to update the ls-R file.

"prodint.sty" defines the product-integral symbol in three sizes:

\prodi   ----- text
\Prodi   ----- display
\PRODI   ----- big

check "prodint.ps" to see how these look like.

You can generate "prodint.ps" without installing the LaTeX prodint

files by typing

latex prodint; dvips -o prodint.ps -P prodint prodint

in this directory.

I'm on Ubuntu, and I'd like a process to install this easily whenever I'm on a new computer. Or can I create a LaTeX package somehow so I can have this font installed easily? Additional information about further definition that I need to define in my LaTeX source file to get it working is here http://wiki.contextgarden.net/Product_integral. I'd like to be able to do something like \usepackage{prodint} and be able to use the commands. Let me know if this is possible. Thanks!

Best Answer

Here is a quick and dirty bash script to copy the files into the local TeX tree and call the commands to activate the configuration. If you save the file as installprodint in the directory where you put prodint.tgz, run it using sudo bash installprodint from this directory.

#!/bin/bash
texdir=$(kpsewhich -expand-var='$TEXMFLOCAL' | sed 's/:.*//')
tar -xzf ./prodint.tgz
mkdir -p $texdir/fonts/map/dvips/prodint
cp prodint/*.map $texdir/fonts/map/dvips/prodint
mkdir -p $texdir/fonts/tfm/public/prodint
cp prodint/*.tfm $texdir/fonts/tfm/public/prodint
mkdir -p $texdir/fonts/type1/public/prodint
cp prodint/*.pfb $texdir/fonts/type1/public/prodint
mkdir -p $texdir/tex/latex/prodint
cp prodint/*.sty $texdir/tex/latex/prodint
rm -rf prodint
mktexlsr
updmap-sys --enable Map=prodint.map

The cleaner way is to build a Debian package (also usable with Ubuntu) that installs the font and the necessary style files. See here how to make a Debian/Ubuntu package.

I wonder why the package is not on CTAN. Maybe you could ask the author of the package to put the package on CTAN so it can be included in TeX Live.