zauguin / luaul

7 stars 3 forks source link

Conflict with selnolig package (load order matters) #3

Closed sieversMartin closed 3 years ago

sieversMartin commented 3 years ago

When the selnolig package has been loaded before, defining lua-ul functions fails:

Lua function luaul.reset_underline_func = 14...-dist/tex/lualatex/lua-ul/pre_app
end_to_vlist_filter.lua:30: attempt to index a boolean value (global 'debug').
l.30 \directlua{require'lua-ul'}

The lua interpreter ran into a problem, so the
remainder of this lua chunk will be ignored.

Changing the load order solves the issue. This should at least be documented or if possible be fixed.

MWE:

\documentclass{article}
\usepackage{fontspec}
\usepackage{selnolig}
\usepackage[soul]{lua-ul}
\begin{document}
   Test\st{Test} \ul{TEST}
\end{document}
zauguin commented 3 years ago

This is a bug in selnolig. (Basically selnolig completely overwrites the Lua standard debug library with some unfortunatly named debug flag) There could be a work-around, but since the current mechanism which needs the debug library is no longer needed with current LaTeX kernel versions the next version will simply use a more streight-forward approach which as a side effect also doesn't depend on debug being available.

The actual issue should be solved by a new selnolig version though. (See https://github.com/micoloretan/selnolig/pull/10)

zauguin commented 3 years ago

Fixed / Worked around in v0.1.1