[Tex/LaTex] Changing font in LuaLaTeX

fontsfontspecluatextimes

I'm required to have my dissertation in Times New Roman. I'm using LuaLaTeX because it lets me use figures which are too big for the usual compiler. I've tried several ways to change the font:

\usepackage{times}

was already in the template provided, but doesn't seem to do anything (the document appears in the normal LaTeX font).

\usepackage{fontspec}
\setmainfont{Times New Roman}

gives me undefined control sequence errors.

EDIT to give the whole code: My document is now like this:

\documentclass[10pt, twocolumn]{revtex4}    % Font size (10,11 or 12pt) and column number (one or two).

\usepackage{fontspec}
%\setmainfont{Times New Roman}
\setmainfont{times}[
  Extension      = .ttf ,
  BoldFont       = *bd ,
  ItalicFont     = *i ,
  BoldItalicFont = *bi
]

\usepackage[a4paper, left=1.85cm, right=1.85cm,
 top=1.85cm, bottom=1.85cm]{geometry}       % Defines paper size and margin length

%%%%% Document %%%%%
\begin{document}                     
Hello 123.
\end{document}

This gives a PDF in Times New Roman but with lots of Undefined Control Sequence Errors (none of which seem to be particularly helpful) and the top of the PDF looks like the picture below.
enter image description here

The log file is here: https://drive.google.com/file/d/1e9IwV-Nmbza2UDfbFEDmv3xarpbJrfOB/view?usp=sharing

Am I doing something wrong – is there a simple way to change the font type that I'm missing? Thanks in advance.

Best Answer

Unless your TeX distribution is of neolithic vintage, the following code should work for you. Observe that loading the fontspec package is optional. The newtxtext and newtxmath font packages contain code that adjusts various settings depending on whether the document is compiled with pdfLaTeX, XeLaTeX, or LuaLaTeX.

Aside: Instead of specifying left=1.85cm, right=1.85cm, top=1.85cm, bottom=1.85cm while loading the geometry package, do consider writing just margin=1.85cm.

\documentclass[10pt,twocolumn]{revtex4}
\usepackage[a4paper,margin=1.85cm]{geometry}  

%\usepackage{fontspec} % optional
\usepackage{newtxtext,newtxmath}

\begin{document}                     
Hello 123.
\end{document}

Addendum: There can be little justification these days for loading the times package, which was last updated ca 15 years ago. Its operational content consists of only three instructions:

\renewcommand{\sfdefault}{phv}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\ttdefault}{pcr}

This not only sets the document's "Roman" font to Times, but the default sans-serif font to Helvetica and (most problematically) the default monospaced font to Courier. You will most likely wish to exercise more specific control over the default sans-serif and monospaced fonts of your document.