0

(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.

  • Please, first update your MiKTeX, then retry. – egreg Oct 8 '17 at 15:47
  • Does tex.stackexchange.com/a/228676/124842 work for you? Otherwise check you packages : How do I update my TeX distribution? – Bobyandbob Oct 8 '17 at 15:47
  • I installed three days ago, that's why i didnt excpect a version problem; I'll check this and come back.. – alfred Oct 8 '17 at 15:50
  • no tex.stackexchange.com/a/228676/124842 doesnt work, same problem with fontspec. I installed basic-miktex-2.9.6361-x64. do I need still to update ? – alfred Oct 8 '17 at 16:04
  • show your full log you probably have incompatible versions of packages on your path but hard to see from the information provided – David Carlisle Oct 8 '17 at 16:12
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
 ***********
0

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.

  • 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. – user139954 Dec 21 '17 at 0:17
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.

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.