I'm trying to use Cambria in an article; I'm using Windows (XP, but I have the font installed), MiKTeX 2.8 and WinEdt 6.0. (Yes, I know Cambria is not available on all machines, but it's not a concern this time, it's a document for only a few people).

I have


in my article, but receive the following error.

("C:\Program Files\MiKTeX 2.8\tex\xelatex\fontspec\fontspec.sty"
("C:\Program Files\MiKTeX 2.8\tex\latex\ifxetex\ifxetex.sty")
 * XeTeX is required to compile this document.
 * Sorry!
\RequireXeTeX ...********************************}
                                                  \endgroup \fi 
l.18 \RequireXeTeX


I've also tried to load the font without fontspec as seen at https://tex.stackexchange.com/a/10714

\font\x="Cambria" at 12 pt \x hello

but receive a different error:

Running miktex-makemf.exe...
miktex-makemf: The Cambria source file could not be found.

Running hbf2gf.exe...

hbf2gf (CJK ver. 4.8.0)

Couldn't find `Cambr.cfg'

miktex-maketfm: No creation rule for font Cambria.

! Font \x=Cambria at 12.0pt not loadable: Metric (TFM) file not found.
l.9 \font\x="Cambria" at 12 pt
  • 1
    Have you tried to compile with XeLaTeX? – Peter Grill Nov 19 '12 at 1:45
  • 2
    May I remark: the actual versions are MiKTeX 2.9 and WinEdt 7. – Mensch Nov 19 '12 at 1:55
  • @PeterGrill: Oops, I didn't (I hadn't used it in more than a year and forgot it could be there). OK, so this time it worked but, interestingly, the output is hyphenated (it wasn't before) and in one case one letter bled over beyond the right margin. I shouldn't go astray with this different problem in the comment thread, however (if you happen to have an insight into the different output, please follow-up). If you post your suggestion as an answer, I'll accept it. Thanks again. – wishihadabettername Nov 19 '12 at 2:01
  • @wishihadabettername: Answer posted as requested. Sorry, I don't know about the hyphenating, My ingenious insight was solely based on the error message. :-) And, I know how you feel given that I have asked a few embarrassing questions myself. Funny thing is that I can sort of recognize beforehand when they are going to be embarrassing and on the last two I correctly predicted that the answer was going to be embarrassing. – Peter Grill Nov 19 '12 at 2:10

Based on the error message:

XeTeX is required to compile this document. * Sorry!

using XeLaTeX should remedy the problem.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.