[Tex/LaTex] Frequently loaded packages: Differences between pdfLaTeX and LuaLaTeX


I'm in the process of switching my LaTeX document from pdflatex to lualatex. Similar to Frequently loaded packages: Differences between pdfLaTeX and XeLaTeX I would like to know, what are typical packages loaded with LuaLaTeX and which typical pdfLaTeX packages should be removed or replaced?

The following are the main difference I found so far:

  • Don't use inputenc, but instead save your plain files in utf-8 and add the following as the first line: % !Mode:: "TeX:UTF-8".
  • Don't use font-packages but instead load fontspec with \setmainfont{FONT_NAME}, \setsansfont{FONT_NAME}, \setmonofont{FONT_NAME}.
  • In order to make microtype work with fontspec, use the beta version of microtype (At least with TeX Live 2011). See more details.
  • hyperref should be loaded with the option unicode.

What other packages do you use? What about babel and textcomp? And are there some "killer-packages" that are only working with lualatex besides fontspec?

Best Answer

Besides supporting a Lua interpreter, LuaTeX brings to pdfTeX quite the same changes as XeLaTeX (native Unicode support, support for system fonts).

For this reason, the question you linked to applies to LuaTeX as well, modulo the answers to this question about migrating from XeTeX to LuaTeX, which shows that apart from microtype support and font names, LuaTeX- and XeTeX-specific codes are mostly compatible.

babel works fine with LuaTeX as far as I can tell. At least with frenchb, I haven't had any issues.

Besides fontspec (which also works with XeTeX), there's more and more packages that use Lua to provide features. As an example, I have recently released the impnattypo package which has some LuaTeX specific features (thanks to Patrick), and I have more coming (such as the unreleased overcolored package).