[OS X TeX] XeLaTeX and fontspec issue
Herbert Schulz
herbs2 at mac.com
Wed Dec 3 18:15:10 EST 2025
> On Dec 3, 2025, at 3:54 PM, Jeffrey W Roland <jroland at lsu.edu> wrote:
>
> Hi all,
>
> I’m preparing a final book MS and it turns out the publisher only uses four fonts in the series where the book will appear. Of course, none of them are standard LaTeX fonts. The MS is currently set up for pdfLaTeX and I’m trying to move to XeLaTeX so that I can use Times New Roman as the main font. The problem is that what seems like it should be easy (according to all I’ve read) isn’t working at all for me. Here’s a MWE:
>
> % !TEX TS-program = XeLaTeX
>
> \documentclass{memoir}
> \usepackage{fontspec}
> \setmainfont{Times New Roman}
>
> \begin{document}
> Hey hey, my my.
> \end{document}
>
> When I try to typeset this, I get an undefined control sequence error on '\setmainfont{Times New Roman}’. Two carriage returns produces an output, but not the right one. (’Times New Roman’ is printed as a line of text.)
>
> I’m using TeXShop 5.57 on a 2025 M4 MB Air running Sequoia 15.7.2 and the current version of MacTeX (installed today, in case that was the problem).
>
> I must be making a silly mistake, but for the life of me I can’t figure out what it is. Thoughts?
>
> TIA,
>
> Jeff
> --
> Jeffrey Roland, PhD
> Associate Professor
> Department of Philosophy
> 102 Coates Hall
> Louisiana State University
> Baton Rouge LA 70803
> (e) jroland[at]lsu.edu
> (p) 225.578.2220
> (f) 225.578.4897
Howdy,
Note that you are calling for a font using a font name rather than the fone file name. This is fine with XeLaTeX which uses the Mac font system to find the file. Please open Font Book.app and check there if the system `sees' Times New Roman. If it does then try typesetting again. Hopefully if it shows up in Font Book.app XeLaTeX will now be able to find it.
PS: I have no problem typesetting your sample document.
PPS: if you have any Math, Sans or Typewriter text in your document you'll have to set those fonts up too. Also, you might want to force the use of the standard TeX Ligatures by adding the optional argument Ligatures=TeX, e.g.
\setmainfont{Times New Roman}[Ligatures=TeX]
for your document.
Good Luck,
Herb Schulz
herbs2 at mac.com
More information about the MacOSX-TeX
mailing list