LuaTeX and selnolig

_johnny7_ger at _johnny7_ger at
Wed May 5 08:06:27 UTC 2021

I have a German document that I have always compiled with (the default)
pdflatex. Now I want to suppress bad ligatures with the package selnolig
that only works with LuaTeX. So I add \usepackage[ngerman]{selnolig} to
my preamble, click on view with LuaTeX and get an error "TeX capacity
exceeded, sorry [input stack size=5000]." Description: "
So the Umlaute äöü are somehow not correctly encoded.
Without using the package, LuaTeX compiles fine; I am on TeX Live 2019
if this is relevant.
The package documentation says selnolig should be loaded after babel,
this is not how LyX does it, right, as the preamble is loaded first? It
also says the package works better with babel than with the LaTeX
package ngerman but I suppose I use babel? And I have to use the package
fontspec and I don't know what LyX uses under the hood.
Does the encoding play a role as LuaTeX only knows UTF-8? Under Document
Settings - Language, I have chosen Language default as encoding (what is
actually what for German?).
Any ideas are much appreciated, thank you!

More information about the lyx-users mailing list