8

I installed MacTeX Basic on my laptop (OS X 10.10), and I got 2 binaries, luatex and lualatex. Those 2 binaries behave totally differently (lualatex is able to parse \documentclass, the other is not), even though lualatex seems to be a symbolic link to luatex...

○ which luatex
/usr/texbin/luatex
○ which lualatex
/usr/texbin/lualatex
○ ls -al /usr/texbin/lualatex
lrwxr-xr-x 1 bastien wheel 6 Nov 24 15:01 /usr/texbin/lualatex -> luatex

What am I not understanding here?

In addition I try to run LaTeX on a server (Debian 7.6), and I installed texlive-luatex there, but I only got the luatex binary, hence I can't process LaTeX files...

1

1 Answer 1

12

(Note: The following explanation is specific to TeXLive. I don't know how other TeX distributions -- e.g., MikTeX, PCTeX, Scientific Workplace -- handle this matter.)

You've discovered that there's a single executable program, luatex, and that lualatex is "merely" a symbolic link to luatex. By the way, the single-executable-program-name matter isn't confined to luatex/lualatex: Check out the pdftex/pdflatex and xetex/xelatex pairs.

To understand what's going on, one needs to distinguish between a TeX engine -- an executable program which knows about a number of so-called "primitive" commands -- and a TeX format -- essentially, a group of predefined macros and environments that make the TeX primitives usable for humans. Examples of TeX engines are pdftex, xetex, and luatex, and examples of TeX formats are "Plain TeX" and "LaTeX".

One of the very first steps the engine, i.e., the executable program, does upon starting up is to check how it was invoked. If it was invoked as "pdftex", the Plain-TeX format (purists will want to note that it's the Plain-eTeX format...) is loaded. Conversely, if the command was "pdflatex", the LaTeX (or LaTeX2e) format is loaded. Similarly, "lualatex" loads the LaTeX format, while "luatex" loads the PlainTeX format (which, as you've noted, doesn't recognize the instruction \documentclass, which isn't suprising since \documentclass is LaTeX-specific).

5
  • Thanks for the explanation. I'm not 100% sure to understand the design decisions behind those binaries (having them check for how they've been invoked) and why there is no command line option to trigger the LaTeX format...
    – b4stien
    Commented Nov 26, 2014 at 18:21
  • @b4stien - I'm afraid I have no particular knowledge of the design issues that led to the system we have at the moment. I can only speculate that one reason for having only one real executable was to economize on hard disk space. However, this is nothing but a guess.
    – Mico
    Commented Nov 26, 2014 at 19:47
  • You mention Scientific Workplace, which is used by several of my colleagues. It is worthy to note that, to the best we can tell, it does not currently support e-tex extensions. Since packages like etoolbox are becoming more pervasively used, we have found it increasingly difficult to extend support to Scientific Workplace platforms when styles or classes make use of these extensions. Commented Feb 10, 2015 at 19:02
  • 1
    @b4stien there is a command line way, but most users prefer the separate name. You can of course do pdftex '&latex' to get LaTeX format, but don't forget the quotes, etc.
    – norbert
    Commented Jun 7, 2015 at 6:56
  • 2
    @b4stien forgot: the design decision is simple: there is no fixed list of formats that can be built into the exe as cmd line options. The link mechanism allows to load arbitrary formats, the original author never heard of (like lollypop ;-)
    – norbert
    Commented Jun 7, 2015 at 6:58

Not the answer you're looking for? Browse other questions tagged .