0

What is the difference between the command xetex and xelatex in a TeX Live 2020/Debian installation?

AFAICS xelatex is a symbolic link to xetex:

lrwxrwxrwx 1 root root       5 17. Feb 2021  /usr/bin/xelatex -> xetex
-rwxr-xr-x 1 root root 2723136 13. Mär 2021  /usr/bin/xetex

But when calling xetex filename.tex I get an undefined control sequence at \documentclass. Calling xelatex filename.tex works fine.

I see that they have different outputs:

  • xetex outputs (preloaded format=xetex)
  • xelatex outputs (preloaded format=xelatex)

Note: This is not a duplicate of Questions regarding the distinction between XeTeX and XeLaTeX and how they relate to TeX and LaTeX?. There the question was about the general differences in xetex and xelatex. Here I'm asking about why the symbolic link xelatex works different than its target xetex!

wolfrevo
  • 513
  • 2
    Xelatex loads the latex format which you need for documents starting with documentclass. xetex loads the plainyex format – Ulrike Fischer Apr 05 '23 at 11:58
  • 1
    The first thing the xetex executable does it to check how it was called. If it was called as "xetex", the program will next load the "PlainTeX" format (to be precise: the etex variant of the plainTeX format). If, OTOH; if it was called as "xelatex", the program will next load the "LaTeX" format. – Mico Apr 05 '23 at 12:47
  • Pdflatex and pdftex does the same, look at the program name it is called by and adjust it's output after it. This is quite normal – daleif Apr 06 '23 at 12:20

0 Answers0