I need to set main font of my document using Times New Roman font. But I just found one solution that is to compile document using xelatex. But my document built since first typing using pdflatex, so when I switch the enggine to xelatex there are so many error I found. And I cannot fix that error immediately. So I need to find solution to set a font to Times New Roman in pdfLatex.
Asked
Active
Viewed 2.5k times
4
1 Answers
8
If you are using pdflatex, you can try setting in your preamble:
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathptmx}
Something like this would be a MWE where you'll get times new roman as your font for the whole document:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathptmx}
\begin{document}
Hello. This is in Times New Roman font.
\end{document}
Mario S. E.
- 18,609
-
1sory but when I compile my document using mathptmx package, the output was not similar to that in Times News Roman font. I get some suggestion in other post to use package \usepackage{newtxtext} but not exactly similar to Times News Roman – Mohammad Fajar Apr 22 '14 at 01:32
-
1
inputencnot thefontencpackages. Alsonot all functionalities ofmicrotypeare availablewith xelatex. Finally you'd better loadpolyglossiarather thanbabelsince the former is specifically designed for xelatex. That's about all, as far as I know. – Bernard Apr 21 '14 at 22:47babelbut notpolyglossiaso this is not an option for all of us! – cfr Apr 21 '14 at 23:48