A noob is again in need.
I was told to use \usepackage{newtxtext, newtxmath} instead of \setmainfont{Times New Roman} (I assume I will still have the font in Times New Roman. Also, use \usepackage[T1]{fontenc} instead of \usepackage{fontspec}.
So, if I use:
\usepackage{fontspec}
\setmainfont{Times New Roman}
everything is fine.
But, If I use:
\usepackage[T1]{fontenc}
\usepackage{newtxtext, newtxmath}
instead of the above, it produces 6 errors (1 in red and 5 in orange). I will include them below:
1) (RED) LaTeX Error: Command `\Bbbk' already defined.
Package fontspec Warning: OpenType feature 'VerticalPosition=ScientificInferior' (sinf) not available for font 'TeXGyreTermesX-Regular' with script 'CustomDefault' and language 'Default'.
Package fontspec Warning: OpenType feature 'VerticalPosition=ScientificInferior' (sinf) not available for font 'TeXGyreTermesX-Italic' with script 'CustomDefault' and language 'Default'.
Package fontspec Warning: OpenType feature 'VerticalPosition=ScientificInferior' (sinf) not available for font 'TeXGyreTermesX-Slanted' with script 'CustomDefault' and language 'Default'.
Package fontspec Warning: OpenType feature 'VerticalPosition=ScientificInferior' (sinf) not available for font 'TeXGyreTermesX-BoldItalic' with script 'CustomDefault' and language 'Default'.
Package fontspec Warning: OpenType feature 'VerticalPosition=ScientificInferior' (sinf) not available for font 'TeXGyreTermesX-BoldSlanted' with script 'CustomDefault' and language 'Default'.
What are the differences between these 2, which should I use and how do I get rid of the errors?
fontspecpackage can't be correct either, as otherwise you wouldn't be receiving warning and error messages related to using thefontspecpackage. – Mico Nov 26 '23 at 20:17[T1]{fontenc}andnewtxthen use pdflatex (which is the default at overleaf) not xelatex. – David Carlisle Nov 26 '23 at 22:07