# Why do luatex and lualatex commands work differently? [duplicate]

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?

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

• 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
• 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).
• 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