0

This code seems to work:

\documentclass{article}
\usepackage{times}

\begin{document}

This is a test. 

\end{document}  %End of document.

But, I have had no luck with any fonts other than Times and Computer Modern. I ran the code here (http://gael-varoquaux.info/computers/garamond/) to attempt Garamond, and I received the following error:

pdflatex> LaTeX font warning: Font shape `T1/pgm/m/n' undefined

This spirals, and I finally get the LaTeX font warning that "some fonts were not available, defaults substituted."

Even if I run the deceptively simple:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{garamond}

\begin{document}

This is a test.

\end{document}

It doesn't work and I still get the same pdflatex error message. I've also tried running this in LuaLaTeX and XeLaTeX, and it doesn't work.

Further, this seems to happen with many, many font distributions. I can use LuaLaTeX and an ODF or TT font; this seems to work, but I don't like the mixture of regular math and the ODF/TT. I can't even use Euler for math!

I am running a Windows 8 machine with TeXnicCenter. This originally started in LyX, where I tried changing the fonts through the menu, and I received very similar error messages. When I do an internet search, there seems to be a lot of Windows 8 machines that have the same problem. Or is it something that I am doing incorrectly?

I'm a bit of a novice, but I'm willing to try to fix the problem. I want a different font :/

Thanks!

  • Welcome to TeX.SX! If you use XeLaTeXyou need to add few lines to your preamble for avoid errors and can use the right fonts you want and have installed on your machine. Also I don't understand what is exactly what you want to do with fonts. – Aradnix Sep 2 '14 at 4:45
  • Which TeX distribution do you use: TeXLive or MikTeX? – Mico Sep 2 '14 at 5:04
  • I use MikTeX. Regarding XeLaTeX -- I'd prefer to use Pdflatex, which is the default... I was hoping to use Garamond. But none of the fonts work except for Times and Computer Modern. – CPS Sep 2 '14 at 5:16
  • Try \usepackage{garamondx}. – Ulrike Fischer Sep 2 '14 at 8:41
  • Or \usepackage{ebgaramond}. – cfr Sep 2 '14 at 20:48
1

To use a particular font with pdfLaTeX or LaTeX (as opposed to LuaLaTeX or XeLaTeX), you need to know either the name of a package which activates the font or the name of the font family as it is defined for LaTeX. This is not necessarily the name of the font. So although there is a package times, for example, there is no package, garamond.

The easiest way to find fonts you can use with (pdf)LaTeX is to use the LaTeX Font Catalogue. If you want a serif font, say, click on the relevant link to get a list of possibilities. Then click on a particular font to get details of availability and usage. Some fonts may not be readily available to you but many will. For example, clicking through, I find EBGaramond12, URW Garamond, Garamond Expert with mathdesign and Garamond Expert with newtxmath. Each page lists the lines you need to include in your preamble in order to use the font. It also tells you whether the package is part of TeX Live though I think that MiKTeX should install most things on-the-fly as necessary if you do not already have them.

Note that times is deprecated. You should use the instructions here for the URW look-alike (which is what times uses) or you might prefer something like TeX Gyre Termes.

  • This doesn't work. I ran the following code: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{garamondx} \usepackage[garamondx,cmbraces]{newtxmath} \begin{document} \normalfont This is a test. \end{document} I get the following error: !pdfTeX error: pdflatex.exe (file zgmr8r): Font zgmr8r at 600 not found. – CPS Sep 2 '14 at 23:30
  • @CPS garamondx is included in MiKTeX but not TeX Live. For TL, there is a script you can use to install it. Is MiKTeX configured to install stuff on-the-fly? I think sometimes it does not install fonts entirely correctly, but is garamondx shown as installed in the package manager? But I can't really help you if the fonts are not installed as I have never used MiKTeX. – cfr Sep 2 '14 at 23:42
  • The most probable cause for the error is a local map file which hasn't been updated yet. Run updmap on the command line. – Ulrike Fischer Sep 3 '14 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.