<div dir="ltr">Sorry my mistake. LaTeX would not allow to define anything that starts with &quot;end&quot; with \newcommand macro and it had nothing to do with luatex.<br></div>