Both LuaTeX and XeTeX are UTF-8 engines for processing TeX documents. This means that the input (.tex files) can contain characters that with pdfTeX are difficult to use directly. Both can also use system fonts, again in contrast to pdfTeX. However, the two are very different in approach.
XeTeX uses system-specific libraries to work. This means that it is very easy to use 'out of the box' for loading system fonts and other UTF-8 tasks. Indeed, it was written for this purpose: supporting languages, etc., that traditional TeX struggles with. This makes for an easy to use engine for end users, particularly if you use the fontspec package on LaTeX. However, because things are 'farmed out' to the OS, there is a trade-off in flexibility terms.
In contrast, LuaTeX has bigger aims. The idea is to add a scripting language (Lua) to TeX, and to open up the internals of TeX to this language. The result is that a lot is possible, but it has to be programmed in. There is growing LaTeX support for LuaTeX: fontspec v2 supports it, and new packages are being written to use more of the new features.
At the moment, I'd use XeTeX for UTF-8 and font support, unless I was after particular effects that only LuaTeX does well (Arabic typography is a particular challenge). The choice btween XeTeX and LuaTeX is 'tight': both have advantages depending on your exact requirements. (I'm on the LaTeX kernel team, so as a programmer I'm very keen on exploiting LuaTeX.)
ConTeXt is not an engine, and so is in a slightly different place here. ConTeXt is a format for TeX, like LaTeX, but is newer and much larger. ConTeXt Mark IV is a LuaTeX-only implementation. The people behind ConTeXt are very active in developing LuaTeX, and are using the new features to extend TeX and what ConTeXt can do. I've already pointed out that I'm working on LaTeX, so of course I'd like to see new features in LaTeX do the same. This is something I and the other members of the LaTeX project are working on.
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).
Best Answer
I think we don't need to do much. The only incompatible thing I know is the
UTF-8
encoding.To answer the sub-questions:
Any package related to input encodings and font encodings:
inputenc
. You should always useUTF-8
encoding to input the text. For backward compatibility, useluainputenc
instead.fontenc
. Don't use it withfontspec
explictly.textcomp
. Usexunicode
instead, which is loaded byfontspec
.XITS
,TeX Gyre Termes
orLinux Libertine O
fonts withfontspec
instead oftimes
package, and use Unicode fonts for main text together withmathptmx
andtxfonts
(font math fonts only) to get proper text fonts.CJK
is not compatible with LuaTeX. Today only a few unofficial LaTeX packages in Korea and Japan are available. This may be not very important for western users.fontspec
. To load TrueType/OpenType fonts. This is the only necessary one, I think. Also,luacode
andunicode-math
are useful.