## LaTeX forum ⇒ Others ⇒ Help with error: XeTeX is required to compile this document Topic is solved

Information and discussion about other TeX distributions not listed above; installation, administration; field reports
Jamwa
Posts: 10
Joined: Mon May 07, 2012 2:56 pm

### Help with error: XeTeX is required to compile this document

I am fairly experienced with \LaTeX. So I wanted to change the default font and I have Googled around to find out I need to use and fontspec is what is recommended. Here we go:

\documentclass{article}\usepackage{fontspec}\usepackage{lipsum}\setmainfont{Palatino Linotype}\begin{document}\lipsum[1-3]\end{document}

When I try to compile it,

latex test_latex.tex

I get an error, the most glaring of which is

********************************************  * XeTeX is required to compile this document.  * Sorry!  ********************************************

So I try another (the recommended?) approach but still errors abound:

sh-4.1$xetex test_latex.tex This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6) %&-line parsing enabled.entering extended mode(./test_latex.tex! Undefined control sequence.l.1 \documentclass {article}?  What am I doing wrong? Last edited by cgnieder on Tue Oct 16, 2012 7:54 pm, edited 1 time in total. Reason: added correct code markup Stefan Kottwitz Site Admin Posts: 8708 Joined: Mon Mar 10, 2008 9:44 pm Location: Hamburg, Germany Contact: Hi Jamwa, use xelatex, Stefan Site admin Jamwa Posts: 10 Joined: Mon May 07, 2012 2:56 pm Hi Stefan, use xelatex I have just done that and quite a lot of output I get, but still error: sh-4.1$ xelatex test_latex.tex This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6)  %&-line parsing enabled.kpathsea: Running mktexfmt xelatex.fmtfmtutil: running xetex -ini   -jobname=xelatex -progname=xelatex -etex xelatex.ini' ...This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6) (INITEX)  %&-line parsing enabled.entering extended mode(/usr/share/texmf/tex/latex/latexconfig/xelatex.ini(/usr/share/texmf/tex/generic/xetexconfig/unicode-letters.tex)(/usr/share/texmf/tex/latex/base/latex.ltx(/usr/share/texmf/tex/latex/base/texsys.cfg)./texsys.aux found  \@currdir set to: ./.  Assuming \openin and \input have the same search path.  Defining UNIX/DOS style filename parser. catcodes, registers, compatibility for TeX 2,  parameters, !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! You are attempting to make a LaTeX format from a source file! That is more than five years old.!! If you enter <return> to scroll past this message then the format! will be built, but please consider obtaining newer source files! before continuing to build LaTeX.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! LaTeX source files more than 5 years old!.l.545 ...aTeX source files more than 5 years old!} ? ! Emergency stop.l.545 ...aTeX source files more than 5 years old!} No pages of output.Transcript written on xelatex.log.Error: xetex -ini  -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed ###############################################################################fmtutil: Error! Not all formats have been built successfully.Visit the log files in directory   /home/arthur/.texlive2007/texmf-var/web2cfor details.############################################################################### This is a summary of all failed' messages and warnings:xetex -ini  -jobname=xelatex -progname=xelatex -etex xelatex.ini' failedwarning: kpathsea: mktexfmt output This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6) (INITEX)  %&-line parsing enabled.entering extended mode(/usr/share/texmf/tex/latex/latexconfig/xelatex.ini(/usr/share/texmf/tex/generic/xetexconfig/unicode-letters.tex)(/usr/share/texmf/tex/latex/base/latex.ltx(/usr/share/texmf/tex/latex/base/texsys.cfg)./texsys.aux found  \@currdir set to: ./.  Assuming \openin and \input have the same search path.  Defining UNIX/DOS style filename parser. catcodes, registers, compatibility for TeX 2,  parameters, !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! You are attempting to make a LaTeX format from a source file! That is more than five years old.!! If you enter <return> to scroll past this message then the format! will be built, but please consider obtaining newer source files! before continuing to build LaTeX.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! LaTeX source files more than 5 years old!.l.545 ...aTeX source files more than 5 years old!} ? ! Emergency stop.l.545 ...aTeX source files more than 5 years old!} No pages of output.Transcript written on xelatex.log.' instead of a filename.I can't find the format file xelatex.fmt'!sh-4.1\$

No PDF file is produced at the end of it all

Stefan Kottwitz
Posts: 8708
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
That's much better. But did you read the output? You need to update your LaTeX, it's too old.

Stefan

Jamwa
Posts: 10
Joined: Mon May 07, 2012 2:56 pm
Let me upgrade and I will post the outcome

Jamwa
Posts: 10
Joined: Mon May 07, 2012 2:56 pm
Thanks Stefan. The code now generates a pdf well:

\documentclass{article}\usepackage{fontspec}\usepackage{lipsum}\setmainfont{Cantarell}\begin{document}\lipsum[1-3]\end{document}
Last edited by cgnieder on Thu Oct 18, 2012 11:16 am, edited 1 time in total.
Reason: inline code changed to code block