Archive for March, 2008

TeXShop, TeX Live, IEEEtran & Fonts (Oh dear!)

Monday, March 17th, 2008

Hopefully this will help somebody else avoid the ‘fun’ of trying to track down why, exactly, LaTeX has suddenly gotten cranky, and (under OSX) the TeXShop ‘typeset’ command suddenly started dying miserably with:

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

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

A few quick basics — I’m running TeXShop as my front end, with the handy BasicTeX package (discussed halfway down the page) for a lightweight TeX backend on OS X 10.4.11.

It’s a bit embarrassing to admit that I hadn’t noticed that there was an issue with generating pdfs from TeXShop until some well intentioned directory cleanup. It appears that TeXShop will cheerfully show you an existing pdf by the appropriate name if one exists, and it can’t actually typeset the new version… sans error!

Once I’d discovered that there was a problem, the yak shaving began. Skipping over the chasing faint hints and vague suggestions, I found the following:

  • IEEEtran clearly included something problematic
  • This debian bug report which pointed out that the ‘ptmr7t’ font wasn’t included in the base TeX Live install.
  • An exceedingly simple document resulted in the failure:
        \documentclass{article}
          \usepackage{times}
          \title{Brief Article}
          \author{The Author}
          \begin{document}
          \maketitle
          This is a test!
        \end{document} 
  • It’s bloody hard to find what’s actually missing.

As it turns out, the problem seems to be that the PSNFSS macros only included the font description (.fd) and style (.sty) files … which wouldn’t matter if the psnfss definitions weren’t used for a number of basic things, including various math functions.

You can download the whole PSNFSS package — but the missing fonts for ptmr7t et al were in lw35nfss.zip.

From there, I extracted the fonts, and:

  • Copied the extracted fonts from ./psnfss/fonts/[vf|tfm] over to $texlive/…/texmf-dist/fonts/[vf|tfm]
  • Ran ‘texhash’ and ‘mktexlsr’ (it’s possible that I only needed one or the other, but I wasn’t about to try and break things again, just to see)

Hope that helps… or at least reduces your yak shaving!