# XeTeX hangs on article documentclass, while LaTeX-Mk with XeLaTeX works perfectly

I have this code:

\documentclass{article}
\usepackage{fontspec}

\begin{document}
\thispagestyle{empty}
\pagestyle{empty}

äätewää--llll
\end{document}


## XeTeX

xetex xetex-acutex.tex produces:

(even xetex -recorder xetex-acutex.tex does, as latexmk uses it -- see its log)

This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/dev/Debian) (preloaded format=xetex)
restricted \write18 enabled.
entering extended mode
(./xetex-acutex.tex
! Undefined control sequence.
l.1 \documentclass
{article}
? X
No pages of output.
Transcript written on xetex-acutex.log.


## LaTeX-Mk

latexmk -xelatex xetex-acutex.tex produces:

Latexmk: This is Latexmk, John Collins, 10 Nov 2013, version: 4.39.
**** Report bugs etc to John Collins <collins at phys.psu.edu>. ****
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': File changes, etc:
Changed files, or newly in use since previous run(s):
'xetex-acutex.tex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'xelatex  -recorder  "xetex-acutex.tex"'
------------
This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/dev/Debian) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./xetex-acutex.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3-code.tex
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3unicode-data.def)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def))
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-patches.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/share/texlive/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/share/texmf/tex/latex/tipa/t3enc.def
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmss.fd))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/xelatex/xetex-def/xetex.def))))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(./xetex-acutex.aux) (/usr/share/texmf/tex/latex/tipa/t3cmr.fd) [1]
(./xetex-acutex.aux) )
Output written on xetex-acutex.pdf (1 page).
Transcript written on xetex-acutex.log.
Latexmk: Log file says output to 'xetex-acutex.pdf'
Latexmk: All targets (xetex-acutex.pdf) are up-to-date


What has to be done that XeTeX also works perfectly? Why does XeTeX have problems with the code?

• Essentially the same issue as tex.stackexchange.com/questions/41031/…: you are trying to use plain XeTeX for a XeLaTeX document. – Joseph Wright Apr 24 '16 at 16:49
• oh, okay. i didn't know there is a difference between them. What would a plain XeTex file look like? – toogley Apr 24 '16 at 16:53
• @JosephWright ah, the answer regarding the differnece seems already included in your linked question. I just didn't read the whole answer. Do you want to morph your comment into an answer, so that i can accept it? – toogley Apr 24 '16 at 17:12
• @cfr I'm not sure. I personally could definetly conclude the answer to my problem of that linked question. But on the other hand, the questions are clearly different because of flavour used. Therefore i think it is at least very similar. – toogley Apr 24 '16 at 19:20
• Well, we can let @JosephWright decide in that case ;). As a moderator, he can either make that call or provide an answer as you suggested. If he can't decide, he can claim the authority to improvise :-). – cfr Apr 24 '16 at 19:24

• A file starting \documentclass requires the LaTeX format, which using the XeTeX engine means xelatex
• A file ending \bye requires the plain TeX format, which using the XeTeX engine means xetex