[Tex/LaTex] Check installed packages on Mac OS X and install new ones


When trying to compile a new LaTeX document, this line


produces the error

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.1 <
     !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

although the first lines are

\begin{frontmatter}                           % The preamble begins here.

If I remove the mentioned line, everything compiles without problem although not with the desired output.

I am new to LaTeX on the Mac. I guess the error has to do with the package [mtplusscr,mtbold]{mathtime} which is not installed. I therefore wonder how can I check whether a package is installed on a Mac and then how can I install it?

Best Answer

As suggested by @Alan Munn, I turn my comment into an answer.

  • times This package change the text body font to ptm, sans serif to phv and typewriter font to pcr. These are the postscript fonts Times Roman (maybe Times New Roman, can't remember), Helvetica, and Courier, respectively. They are distributed with standard TeX distributions like TeXLive. If I remember correctly, these are fonts denoted by URW++. times does not touch the math fonts at all and the Helvetica and Courier are not properly scaled either.

  • mathptmx This package change the default roman fonts to ptm, just as times. It does not change sans serif and typewriter fonts. In addition it change the math fonts to a virtual font mathptmx, which is basically Times Italic. Additional symbols and alphabets are borrowed from Computer Modern and RSFS.

Information of the above two packages can be found in detail from the documents psnfss2e.pdf and psfonts.pdf, distributed with TeXLive, etc.

  • mathtime This package is for use with the commercial font MathTime and MathTime Plus, distributed by Y&Y (now defunct). It changes the text fonts the same as times. (My comment seems not to be entirely correct. After check the code of the package, it looks like it does change text fonts, including, rm, sf and tt). However this is now deprecated. But it is widely used in industry, including Springer and Elsevier. And quite popular in academic before, just like Y&Y. So it is very possible that you got a document still use it.

  • mtpro2. This package is for use with the commercial font MathTime Professional 2, distributed by PCTeX. It has much improvement over MathTime. This package does not set any text fonts. It can be viewed as a successor to the MathTime. If you use mtpro2, it is better to set text font by \def\rmdefault{ptm}.

Loading two packages that change text fonts are usually okay. The latter will normally overwritten the first one. However math fonts is much more complicated. And I don't recommend one to load mathptmx and mathtime or mtpro2 together. I don't have MathTime on my computer and I cannot check what will happen. But the limitations on math fonts are very likely to cause problem. (Mainly the limitations on number of math fonts family and other problems can be caused by math fonts setup commands like \DeclareMathSymbol.)

Related Question