1

We know the engines to the TeX family are binary executables that compile TeX files. People sometimes mention XeLaTeX as being an engine; so here's the question: Is it wrong to call XeLaTeX an engine? If it's not, then what to call it?

Qaher
  • 1,242
  • 3
    XeTeX is the engine, XeLaTeX is a format built for that engine. – Skillmon Aug 18 '19 at 17:51
  • @Skillmon Is it wrong to call XeLaTeX, the format, as an engine or a compiler? or they are conceptually different? – Qaher Aug 18 '19 at 18:35
  • 1
    A format in the TeX world is something like a byte-dump of an engines state at some point. The mis-concept that XeLaTeX is an engine or binary stems from the fact that xelatex in most TeX distributions is the call for something like xetex -fmt="xelatex", so the xelatex binary is no binary but a link to the xetex binary with the XeLaTeX format preloaded. – Skillmon Aug 18 '19 at 19:29
  • Related: https://tex.stackexchange.com/a/499438/134574. – Phelype Oleinik Aug 18 '19 at 20:55
  • It should be noted that initex creates an executable by stopping the TeX engine after adding all the standard macros. See https://tex.stackexchange.com/questions/116709/if-latex-is-only-a-macro-package-why-does-it-have-its-own-executable/116711?r=SearchResults&s=2|0.0000#116711 – John Kormylo Aug 19 '19 at 15:26

1 Answers1

1

This is a fairly opinion-based answer, as I'm not sure if there actually is a general reference for all this terminology.

I usually use "...TeX" (spelled with alternating upper-/lowercase letters) when I mean the language, i.e. the collection of all predefined macros, assignments, specific primitives etc. which can be used in this specific TeX variant.

On the other hand, I use ...tex (all lowercase letters, and often with monospace markup) when I mean a specific compiler, i.e. a compiled binary that implements a certain set of primitive commands and behavior, or when I mean a precompiled format, which is just a pre-compiled set of definitions used by a compiler.

The latter makes things a bit more complicated, as with modern TeX distributions the distinction between compiler and format isn't so clear anymore. For example, if you'd like to compile a XeLaTeX file, you'd run a command like xelatex myfile.tex. Here xelatex behaves like a compiler but (as far as I know) actually is just a wrapper binary around the call of the xetex compiler which preloads the xelatex format which in turn defines all the macros used by the XeLaTeX language.

Because of this distinction, I tend to avoid the term "engine". One could call only compilers an engine, because only they provide the core functionality that is necessary to compile files of a certain language. But one could also use the term for compilers and formats, because for all the common format variants they are basically the same from a user's perspective. At least I would never use the term "engine" for the language.

siracusa
  • 13,411
  • Thanks for sharing your words, finally I don't know, is it right to call as an engine or not? or what should we call it in general? This guy Ian Thompson, in this link "https://tex.stackexchange.com/a/63995/71461" says pdflatex (like the xelatex) is a terminal command (as you mentioned) -- But just a terminal command not anything else! I'm confused now, what is truly right and straight to call xelatex in default, since it can be considered as a compiler from a user's perspective? – Qaher Aug 18 '19 at 18:30
  • 1
    I must admit that the concepts in the TeX world are not that clearly separated as for most other programming languages. For example, the distinction between C, the language, and gcc, the compiler, is much clearer than between XeLaTeX and xelatex. In theory we could have several different implementations for the XeLaTeX language with different names. So to me there's still a difference between the language per se and the loaded format file, while both can be referred to as "XeLaTeX". I try to make the distinction clearer by using a different spelling/markup. – siracusa Aug 18 '19 at 19:05
  • 2
    xelatex is not a wrapper around xetex but a symbolic link to xetex so they are actually the same file. On startup, the executable checks the name it was called with and if the name ends with latex, the LaTeX format is preloaded. – Henri Menke Aug 18 '19 at 21:33