Josef-Friedrich / nodetree

LuaTeX package to visualize node lists in a tree view.
https://www.ctan.org/pkg/nodetree
LaTeX Project Public License v1.3c
14 stars 2 forks source link

utf8 not in Lua 5.1 #8

Closed pgundlach closed 3 years ago

pgundlach commented 3 years ago

nodetree.lua line 29:

local utfchar           = utf8.char

Lua 5.1 does not have the utf8 library (Lua 5.1 is the default version in LuajitTeX). So I get an error

attempt to index global 'utf8' (a nil value)

LuaJitTeX does include the slnunicode library. So a solution could be to write:

utf8 = utf8 or unicode.utf8

beforehand.

(nodetree version 2.1)

Josef-Friedrich commented 3 years ago

Thank you for your bug report. Could you please review the commit, so that I can upload a new version to CTAN.

pgundlach commented 3 years ago

Works fine, thank you very much. (BTW: nodetree is very useful!)