I need to write in Times New Roman (using TexStudio, the OS is EndeavourOS (Arch based))

fontsfontspeclinuxpdftextexstudio

As the topics says I have to write my thesis in Times New Roman on my machine. It uses EndeavourOS, and I am compiling the LaTeX code using Texstudio.

  1. Can anyone offer me instructions on how to check if the font is installed on my Computer ? (I installed the ttf-croscore package which contains it, but I'm not sure.)
  2. How do I use the "exact" Times New Roman font. (either using Pdflatex or something else)
    This is what my preamble looks like:
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{float}
\usepackage{soul}
\usepackage{fontspec}
\graphicspath{{/home/agnelo/Documents/BUT\ Machine\ HAMK\ Template\ version/images/}}
\usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry}
\setmainfont{Times New Roman}

I get an error that "Times New Roman" cannot be found.

PS: This is my first time posting, so I apologize for any errors.

Best Answer

The code will work as written with lualatex or xelatex but you should delete inputenc which does nothing but warn that it should not be used with those engines.

Times New Roman is a standard Windows font but distributed under a licence that allows it to be installed on other platforms. Most Linux package managers will install it as part of the Microsoft Core Fonts package (mscorefonts or similar name, depending on your linux package manager details)