When I compile the following MWE with xelatex, compilation goes fine but I get this warning message: Font shape T1/TimesNewRoman(0)/m/n undefined(Font) using T1/cmr/m/n instead. The problem appeared after updating to MacTeX 2016 (the problem shows from terminal, from TeXshop and from TeXstudio 2.11.0), and it doesn't show up if I comment out the Sweave package.



    \setmainfont{Times New Roman}




  • sweave must be forcing T1 encoding, a bad idea for xetex, can you not swap the order and load sweave first? – David Carlisle Aug 4 '16 at 16:25
  • 3
    if your sweave.sty is svn.r-project.org/R/trunk/share/texmf/tex/latex/Sweave.sty then it looks like you want the [noae] option to stop it loading fontenc. – David Carlisle Aug 4 '16 at 16:30
  • @DavidCarlisle It's a bad idea also to load ae, by the way. – egreg Aug 4 '16 at 16:37
  • 1
    using the option or switching the order fixed it, if you put it as an answer I'll mark it as accepted! – Stefano Aug 4 '16 at 21:39

Your Answer

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

Browse other questions tagged or ask your own question.