0

can't solve this problem. For my thesis I am forced to use ugly "times new roman", using the free "times" won't do it. That's why I tried {font spec} (only under XelatTex) to include my own font files from my mac. The paths are correct, if I change the filename it gives me an error. It will work for the main text, but of some reasons I can't get it worked for bold and italics as in headlines. Interestingly, that stuff continues to be then "times". even tough, it hasn't been defined.

Does anybody know how to solve this? Submission is tomorrow and I can't get it straight :/

\documentclass[a4paper]{article} 

\usepackage{fontspec} 
\setmainfont[ 
Extension = .ttf, 
BoldFont=Times_New_Roman_Bold , 
ItalicFont=Times_New_Roman_Italic , 
BoldItalicFont=Times_New_Roman_Bold_Italic, 
]{Times_New_Roman} 

\begin{document} 
\subsection{this stuff becomes times} 
This will be times new roman. As wanted.
\end{document}    

migrated from stackoverflow.com Apr 7 '16 at 9:06

This question came from our site for professional and enthusiast programmers.

  • Are you using LaTeX, or XeLaTeX? If the latter, please update your post so you don't suggest you're using LaTeX. As for the fontspec use, this is literally explained in the manual, in section 4.2 – Mike 'Pomax' Kamermans Mar 30 '16 at 19:05
  • xelatex. I followed the manual, but can't get it working for the bold and italics. – joseph Mar 30 '16 at 22:46
1

Why the underscores ?

Try this:

\documentclass[a4paper]{article}

\usepackage{fontspec}

\setmainfont{Times New Roman}

\begin{document} 
\section{This stuff becomes times} 
This will be Times New Roman. As wanted.
\textbf{\textit{And this too is ok}}.
\end{document}
% Local Variables:
% TeX-engine: xetex
% End:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy