This is how I am calling LuaLaTeX in TeXstudio:
lualatex.exe -synctex=1 -interaction=nonstopmode --shell-escape %.tex
Doing a test run of my main document, I get this error throughout the document (in all the log files for the externalized TikZ images):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! 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>.
!...............................................
This is my configuration file for fonts:
\usepackage{fontspec}
\usepackage{microtype}
\usepackage{amsmath}
%%%%%%%%
\usepackage{unicode-math}
\setmainfont{TeX Gyre Termes}
\setmathfont{TeX Gyre Termes Math}
\setsansfont[Scale=MatchUppercase]{TeX Gyre Heros}
There is no further line in my document where inputenc or any other problematic tidbit is existent.
Basically, I am clueless. How can I proceed here?
SOLUTION (edit)
One has to add:
\tikzset{
external/system call={lualatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"},
}
TeXstudio's menu bar -> Tools -> Commands. – henry Aug 07 '14 at 08:19