This question already has an answer here:

As written in the page below, lualatex seems to be a symbolic link or an lias to luatex. Difference between luatex and lualatex binaries

However, they don't work the same way. lualatex compiles latex format documents while luatex compiles plain tex documents.

This means they are not the same 'UNIX executable' or lualatex isn't just an alias of luatex. Why do they work differently?

Thank you in advance.

marked as duplicate by egreg, Andrew, Zarko, user36296, Przemysław Scherwentke Jul 6 '16 at 17:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Welcome to the site, but what about Joseph's comment to your prior similar question (tex.stackexchange.com/questions/318267/…)? I think it answers the current question, too. luatex and lualatex are two different programs, using different input formats, that should not be aliased to each other. – Steven B. Segletes Jul 6 '16 at 14:57
  • @StevenB.Segletes Thank you. Thanks to the page, I understand well that luatex compiles plain tex format documents and lualatex compiles latex format documents. However, it is the fact that luatex is a Unix executable the size of 17.1MB and lualatex is "apparently" just an alias of luatex and the size of only 6B. – ynn Jul 6 '16 at 15:07
  • 4
  • 1
    Analogy: let's presume your Japanese name is Yuki and your English name is ynn. When I call you ynn, you reply in English, but when someone calls you Yuki, you reply in Japanese. Your are the same piece of software (and hardware) but you are programmed to reply differently, depending how you were called (this is more common in Taiwan for example). – alwaysask Jul 6 '16 at 15:56
  • @egreg Thank you for your comment. I'll read them for further understanding. – ynn Jul 6 '16 at 17:04

In many programming languages, it is possible to detect the name by which an executable is invoked. In C this is by examining the field args[0], in Bash this is given by $0, and in TeX a similar thing is \jobname (see, e.g. this answer).

The program can thus be designed to behave differently depending on how it is called.

An extreme example of this is the busybox suite of programs. With one executable and many different aliases you can recreate most of the tools one needs to operate in a *nix commandline environment.

  • Thank you for your answer. So the command detects whether it has been called luatex or lualatex and works differently. Now I understand well. – ynn Jul 6 '16 at 17:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.