I would like to develop LuaLatex packages. I am very interested by the scripting capability of LuaLatex, so I'd like to use it as much as possible instead of Latex or Tex.

Is there a "standard" or "time-tested" way to write a LuaLatex packages?

What is the main differences/similarities between Latex packaging and LuaLatex packaging?

  • Welcome to TeX.SX. I think you must differ between a latex .sty and a direct .lua package.
    – user31729
    Commented Mar 1, 2015 at 10:51
  • You mean, instead of using: \usepackage{myPackage} I should use: dofile("myPackage.lua")
    – jvtrudel
    Commented Mar 1, 2015 at 10:54
  • 1
    No, in writing ... Some .lua code packages are included within an importing .sty file, most times having the same basename, i.e. foo.sty imports foo.lua, but I am not an expert in luatex, others should provide more profound answers
    – user31729
    Commented Mar 1, 2015 at 10:55
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Commented Mar 2, 2015 at 0:50

1 Answer 1


It all depends...

luatex is a two-language system and a lualatex package can use either language.

You could write a package written just as a classic latex package but using some of the extended tex commands available in luatex, such as \umathchar etc.

You could write code that is almost all Lua, with just a very thin TeX wrapper mypackage.sty that just does \directlua{require("mypackage")} (luaotfload comes to mind)

There isn't really a lot in common between these kinds of packages other than that the end user doesn't necessarily need to know anything about the implementation language, and can just do


In one case, The coding practices are just as in classic TeX, in the other case, the coding practices are those of Lua (mostly).

You must log in to answer this question.

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