Simon Heimlicher

Simon Heimlicher's Homepage

ACM Template With Basic TeX Live

If you use the BasicTeX LaTeX distribution[^basic-tex] for OS X, you may run into issues with missing fonts.

If for example the font "Helvetica" is missing, pdlatex will output a log similar to the following:

  kpathsea: Running mktextfm phvb8t
  mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input phvb8t
  This is METAFONT, Version 2.718281 (TeX Live 2011)

  kpathsea: Running mktexmf phvb8t
  ! I can't find file `phvb8t'.
  <*> ...:=ljfour; mag:=1; nonstopmode; input phvb8t

  Please type another input file name
  ! Emergency stop.
  <*> ...:=ljfour; mag:=1; nonstopmode; input phvb8t

  Transcript written on mfput.log.
  grep: phvb8t.log: No such file or directory
  mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input phvb8t' failed to make phvb8t.tfm.
  kpathsea: Appending font creation commands to missfont.log.
  ! Font \ttlfnt=phvb8t at 18.0pt not loadable: Metric (TFM) file not found.
  <to be read again> 
  l.318 \newfont{\ttlfnt}{phvb8t at 18pt}

The solution in case of the ACM sig-alternate.cls template is to install the helvetic package manually, by running

sudo tlmgr install helvetic

Alternatively, a more through solution is to install all fonts in the texlive-fonts-recommended package, which can be accomplished with the following snippet:

curl | sed -En 's!/usr/share/texmf-texlive/fonts/tfm/.*/([^/]+)/[^/]+\.tfm$!\1!p' | sort -u | while read font; do sudo tlmgr install $font; done

This fetches the list of files that are installed by the Ubuntu package texlive-fonts-recommended and extracts all font names. Then it uses tlmgr to install these fonts one by one.

[^basic-tex]: Why would one use the BasicTeX distribution instead of the full MacTeX version? The BasicTeX distribution is only 69MiB, whereas the full release is 1.8GiB.