1

(my first question here) I'm using xelatex to compile this code:

\documentclass{book}
\usepackage{fontspec}

\begin{document}

%This is a Greek text ``Ελλάδα''
text

\end{document}

and receive this error :

("C:\Program Files\MiKTeX 2.9\tex\latex\fontspec\fontspec.cfg")
! Undefined control sequence.
<argument> \LaTeX3 error: 
                           Erroneous variable \c__fontspec_shape_n_n_tl used!
l.3806 \emfontdeclare{ \emshape, \eminnershape }

My aim is to make LaTeX compile greek letters properly in my pdf, but that's a different issue.

Mensch
  • 65,388
alfred
  • 607

3 Answers3

1

Updating Miktex solved the problem of compiling

\usepackage{fontspec}

and using the font

\setmainfont{CMU Serif}

allowed greek alphabet to be recognized.

Thanks all for your help.

alfred
  • 607
  • Apparently, MikTeX issues the occasional "release" with fixed packages that must be updated, even after initial install. Behavior may be different if you install via the online method, where it doesn't begin with much, then grabs more packages. –  Dec 21 '17 at 00:17
0

Place the line

\listfiles

and typeset the document. I have no problem typesetting it with a fully updated TeX Live 2017 and I have the file versions:

 *File List*
    book.cls    2014/09/29 v1.4h Standard LaTeX document class
    bk10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
fontspec.sty    2017/09/22 v2.6e Font selection for XeLaTeX and         LuaLaTeX
   expl3.sty    2017/09/18 L3 programming layer (loader) 
expl3-code.tex    2017/09/18 L3 programming layer 
l3xdvipdfmx.def    
  xparse.sty    2017/09/18 L3 Experimental document command parser
fontspec-xetex.sty    2017/09/22 v2.6e Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty
   tuenc.def    2017/04/05 v2.0i Standard LaTeX file
fontspec.cfg
 ***********
Herb Schulz
  • 3,410
0

I had the same problem and it was persistent. I finally uninstalled and re-installed the 'fontspec' package (using MiKTeX Package Manager) and the problem was solved.

Alkis
  • 101