# How to compile a plain LuaTeX file

How do I write and compile a `.tex` file with plain `LuaTeX`? I use `LuaLaTeX` to compile some `.tex` files but how is an example of a plain `LuaTeX` file and how do I compile it? In the reference manual I did not find any example or a tutorial of how to do it. Is there any resource material in which I can learn more about creating and compile `.tex` files with plain `LuaTeX`?

• I don't think there's anything special between plain LuaTeX vs. LuaLaTeX files as compared to how plain TeX vs. LaTeX files differ. You just write a plain TeX file in which you can use the new LuaTeX primitves, and compile that file via `luatex myfile.tex`. – siracusa Aug 22 '19 at 2:31