I bought a new computer with windows10, which I installed MikTeX2.9. The previous LaTeX file failed to compile in this new system. The follwing is a min. example:
\documentclass{book}
\usepackage{fontspec}
\usepackage[BoldFont,SlantFont,CheckSingle=true]{xeCJK}
\usepackage{CJKnumb}
\setmainfont{Times New Roman}
\setCJKmainfont{DFT_HZ5.TTC}
\begin{document}
請見本書第\CJKnumber{\ref{coding}}章)。
\end{document}
You do not need to use DFT_HZ5.TTC any other Chinese font is the same. The following is the log file:
....
....
Font) TU/TimesNewRoman(0)/m/n --> TU/TimesNewRoman(0)/b/n on
input line 7.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold'
(Font) OT1/cmr/bx/it --> TU/TimesNewRoman(0)/b/it on input lin
e 7.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold'
(Font) OT1/cmss/bx/n --> TU/lmss/b/n on input line 7.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'
(Font) OT1/cmtt/m/n --> TU/lmtt/b/n on input line 7.
! Missing number, treated as zero.
<to be read again>
\protect
l.8 隢?
It is not peculiar, because what is inside \CJKnumber is undefined. The program should popup and ask me, and I simple need to hit a return But it did not popup. The program simply break here.
However, if I remove the other Chinese character, the program become
\documentclass{book}
\usepackage{fontspec}
\usepackage[BoldFont,SlantFont,CheckSingle=true]{xeCJK}
\usepackage{CJKnumb}
\setmainfont{Times New Roman}
\setCJKmainfont{DFT_HZ5.TTC}
\begin{document}
\CJKnumber{\ref{coding}}
\end{document}
It is fine. What is wrong with my system setup?
\label{coding}? – egreg Jun 17 '20 at 23:14