Yesterday, I installed TexLive2017 to Linux Mint to use lualatex, and lualatex 1.0.4 is installed now. But so simple a code shown below doesn't work properly.
\documentclass{ltjarticle}
\usepackage{luatexja}
% \documentclass{article}
\begin{document}
\begin{eqnarray}
f(x) = x^2 + 4 \label{eq:1}
\end{eqnarray}
then we can find
\begin{eqnarray}
a = 4.\ \ \ (\mathrm{by\ eq.(\ref{eq:1})})
\end{eqnarray}
\end{document}
The error message is this.
*! You can't use `\spacefactor' in math mode.
\@setref ...d}\else \expandafter #2#1\spacefactor
\@m {}\fi
l.13 a = 4.\ \ \ (\mathrm{by\ eq.(\ref{eq:1})}
)
?
Missing character: There is no è (U+00E8) in font cmex10!
[1*
The code can be complied without any errors if I write the code from scratch and save as new name and compile for the first time. It means the error occurs when \label{eq:1} and \ref{eq:1} are tethered.
How can I solve this problem? This code works properly on my mac (texlive2016, lualtex 0.95.0). If I comment out the first two lines and uncomment the third line, the problem dissolves at once, but I have to use luatex Japanese packages as I'm Japanese.
\text{}command is really helpful and now no problem is left. – ynn Oct 22 '17 at 07:21