5

I am using tex-maker on manjaro-linux. During compilation I got an error:

! Fatal fontspec error: "cannot-use-pdftex"!
! The fontspec package requires either XeTeX or LuaTeX.!
! 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>.
!............................................... \msg_fatal:nn {fontspec} {cannot-use-pdftex}

How to fix it ?

4
  • 9
    Don't compile with pdflatex but with xelatex or lualatex. Commented Sep 4, 2017 at 18:43
  • How to choose compiler? Commented Sep 4, 2017 at 18:44
  • 2
    If you are using an editor/IDE then most provide commands for each engine. If you're using the command line, then xelatex ... or lualatex ... will work. But without more details it's hard to answer this.
    – Alan Munn
    Commented Sep 4, 2017 at 18:47
  • @AlanMunn This must be a duplicate, don't you think?
    – cfr
    Commented Sep 4, 2017 at 19:05

1 Answer 1

4

In the tools menu you have XeLaTeX submenu, but the simplest is certainly to go to the Options -> Configure TeXmaker menu and either define a shortcut for XeLaTeX (there's none by default) or choose xelatex as compilation engine for QuickBuild (shortcut F1): enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .