I had typed my LaTeX article using Computer Modern fonts. Now I want Times New Roman and double spacing. I'm getting so many errors regarding font packages. Please help.


\setmainfont{Times New Roman}

  • 2
    fontspec requires xe- or lualatex as a compilation engine (not pdflatex), which in turn forces you to use unicode encoding and are incompatible with inputenc. So remove the inputenc line and compile with lualatex,
    – Xavier
    Commented Jul 23, 2013 at 5:12
  • still getting the same errors
    – karuna
    Commented Jul 23, 2013 at 5:39
  • is there a way of getting times new roman without using fontspec package so that i dont have to make any other changes in my file.
    – karuna
    Commented Jul 23, 2013 at 5:45
  • 3
    You are doing too many font things and they are incompatible. If you don't like fontspec, get rid of it (and the \setmainfont) and use a 'Times-like' font: TeX Gyre Terms, newtx, mathptmx, or Nimbus Roman. With any of these, keep fontenc and inputenc and compile with latex or pdflatex.
    – jon
    Commented Jul 23, 2013 at 6:11
  • If you want to stay with pdfLaTeX, use packages such as newtxtext and newtxmath to make Times Roman the default text and math font family.
    – Mico
    Commented Jul 26, 2013 at 18:36

1 Answer 1


For the sake of closing this question, here is a summary of the comments:

fontenc and inputenc are incompatible with fontspec.

fontspec with xe- / lualatex

fontspec lets you use any TrueType and OpenType font easily (with commands like \setmainsfont that just need the name of the font you want to use), but require you to compile your document with a modern TeX engine such as xelatex or lualatex. These two engines in return forces you to use utf8 encoding, and are therefore incompatible with \inputenc. Also, as fontspec is a kinda upgrade to fontenc, you shouldn't load fontenc either.
For more information on xelatex / lualatex vs pdflatex, read these questions:

fontenc with pdflatex

If for some reason you want or need to compile with the legacy pdflatex, you will need to find a font that is available in Type1 format, and load it "the old way".

The best option seem to be TeX Gyre Termes, loaded by the tgtermes package. Part of the modern TeX Gyre collection of fonts, an initiative aimed at providing high quality versions of standard fonts for TeX and in OpenType format, it is a replacement for the older URW Nimbus Roman font, that can be loaded by the mathptmx package (AFAIK, mathptmx is nimbus with math support added, but I might be wrong).

Another option is the New TX font, loaded by the newtxtext and newtxmath packages (you need to load both).

Note that for both these options you should also switch to Cork font encoding, i.e. \usepackage[T1]{fontenc}.

For more about Times replacement, you can read What is going on with all these Times clones?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .