0

I've been trying to use this beamer theme: https://github.com/ppletscher/beamerthemezurich/. When I try to compile the sample .tex file included it gives me an error that reads:

! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.38 }
|'''''''''''''''''''''''''''''''''''''''''''''''
| This is a fatal error: LaTeX will abort
|...............................................
) ) ) )
(\end occurred when \ifx on line 20 was incomplete)
(\end occurred when \ifx on line 20 was incomplete)
(\end occurred when \ifx on line 6 was incomplete)
(\end occurred when \ifx on line 6 was incomplete)
Here is how much of TeX's memory you used:
22086 strings out of 493921
418411 string characters out of 3147276
482941 words of memory out of 3000000
24934 multiletter control sequences out of 15000+200000
5018 words of font info for 17 fonts, out of 3000000 for 9000
841 hyphenation exceptions out of 8191
61i,1n,70p,412b,277s stack positions out of 5000i,500n,10000p,200000b,50000s
No pages of output.
PDF statistics:
9 PDF objects out of 1000 (max. 8388607)
0 named destinations out of 1000 (max. 500000)
31 words of extra memory for PDF output out of 10000 (max. 10000000)

How can I solve this problem? I'm still fairly new to LaTeX. I have tried switching the typesetting engine to XeTeX and LuaLaTeX on TeXMaker 4.3

marked as duplicate by Sean Allred, Masroor, Jesse, Guido, Svend Tveskæg Jan 20 '15 at 2:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • What happened when you switched engines? This problem would have been fixed -- did you run into another? – Sean Allred Jan 20 '15 at 1:23
  • It kept on giving me the same error. – 1028 Jan 20 '15 at 1:24
  • Are you sure TeXmaker was actually switching the engines? Can you edit-in exactly how you were compiling? You may be making a setting, but not actually applying it. (That's the trouble with some interfaces -- you can never be sure of when settings are actually set.) – Sean Allred Jan 20 '15 at 1:25
  • I did what you said and it did help somewhat, now the compiler claims "! fontspec error: "font-not-found" ! ! The font "Gill Sans" cannot be found. ! ! See the fontspec documentation for further information. – 1028 Jan 20 '15 at 1:34
  • 1
    You will have to download Gill Sans (and any other fonts it wants) from the web or configure the theme to use a different font. \setmainfont and \setsansfont should be sufficient; see these lines. Basically, replace instances of Gill Sans with a font you have installed :) – Sean Allred Jan 20 '15 at 1:38