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:
xetexoutputs (preloaded format=xetex)xelatexoutputs (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!
xetexexecutable 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