8

Consider the following code:

\documentclass{report}
\usepackage[utf8]{inputenc} 
\usepackage{fontspec} %compile with xelatex
%\setmainfont{Times New Roman}                                                                                                                                                                              
\begin{document}
\textsc{Small Caps}
\end{document}

No small caps are obtained when I uncomment the line \setmainfont{Times New Roman}. There is a warning:

LaTeX Font Warning: Font shape `TU/TimesNewRoman(0)/m/sc' undefined
(Font)              using `TU/TimesNewRoman(0)/m/n' instead on input line 6.

How to both have Times New Roman font style and small caps?

Viesturs
  • 7,895
  • 4
    The line \usepackage[utf8]{inputenc} %compile with xelatex seems strange, you should never use inputenc with xelatex (it does nothing other than give a warning that it should not be used) – David Carlisle Jan 16 '19 at 16:44
  • 1
    On windows it works fine (without the inputenc which is wrong). times.ttf has small caps. – Ulrike Fischer Jan 16 '19 at 16:45
  • It works on windows as Ulrike says, or you could use a clone font such as TeX Gyre Termes – David Carlisle Jan 16 '19 at 16:49
  • @UlrikeFischer, I work in Ubuntu. I downloaded separately the Times New Roman font. Perhaps, I need to do a special download of small caps? – Viesturs Jan 16 '19 at 16:49
  • @DavidCarlisle what is meant by a clone font? How to use the Tex Gyre Termes? – Viesturs Jan 16 '19 at 16:50
  • Maybe this is a duplicate: https://tex.stackexchange.com/q/187398/4427 – egreg Jan 16 '19 at 16:51
  • In windows the small caps are in the times.ttf. I don't know if there exist a free font usable in ubuntu. To use tex gyre see egreg's link. – Ulrike Fischer Jan 16 '19 at 16:52
  • use \setmainfont{TeX Gyre Termes} – David Carlisle Jan 16 '19 at 17:07
  • @DavidCarlisle, I don't have Tex Gyre Termes installed. ! Package fontspec Error: The font "Tex Gyre Termes" cannot be found. How to install it? – Viesturs Jan 16 '19 at 17:13
  • That is part of texlive or miktex so you should be able to just use your tex system package updater unlike times new roman which is a font that you have to pay for (but comes with windows) – David Carlisle Jan 16 '19 at 17:19
  • @DavidCarlisle , I am using already a very new version This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex 2018.11.18) 16 JAN 2019 19:11. Do I still need some additional update? – Viesturs Jan 16 '19 at 17:39
  • TeX Gyre fonts have been in texlive for years so you don't need a new one but you presumably didn't choose a full installation, try tlmgr install tex-gyre – David Carlisle Jan 16 '19 at 17:42
  • @DavidCarlisle, I don't have tlmgr. How to install it? I installed TexLive from here https://www.tug.org/texlive/quickinstall.html – Viesturs Jan 16 '19 at 22:04
  • you do have tlmgr if you got texlive from there – David Carlisle Jan 16 '19 at 22:09

1 Answers1

15

This is a problem on Macs as well as Linux. Newer versions of Times New Roman have small capitals as well as lowercase/old-style numerals as OpenType features. Unfortunately, other operating systems still tend to distribute older versions. The version of Times New Roman bundled with macOS, 5.01.3x, doesn't include small caps; but Office for Mac has version 7.00, which includes the newer OpenType features.

Alternatively, as already suggested in the comments, you could use the TeX Gyre Termes clone of Times:

\documentclass{report}
\usepackage{fontspec}
\setmainfont{TeX Gyre Termes}

\begin{document}
\textsc{Small Caps}
\end{document}
Andrew Dunning
  • 1,714
  • 13
  • 21