Today, I wanted to compile a document that worked flawlessly earlier that year. However, LuaLaTex was complaining about some code lines inside of a C++ listing. I boiled the problem down to the following minimal example:
test.tex:
\documentclass{article}
\usepackage{unicode-math}
\usepackage{listings}
\lstset{basicstyle=\scriptsize}
\begin{document}
\lstinputlisting{test.cpp}
\end{document}
test.cpp:
int main()
{
return (int)(-1.l);
}
If I compile with lualatex test.tex
I get the following :
(./test.cpp
! Missing number, treated as zero.
<to be read again>
global
l.3 return (int)(-1.l
);
?
If I uncomment the unicode-math package or the lstset command or use xelatex, it compiles just fine. What's wrong?
lualatex --version
? It works fine for me :/\documentclass{article} \usepackage{unicode-math} \usepackage{listings} \lstset{basicstyle=\scriptsize} \begin{document} \begin{lstlisting} - \end{lstlisting} \end{document}