我有一个使用 parbox、spacebox 和一些更简单的空格的宏。每次使用宏时,都会生成“缺失数字,视为零。”错误。它仍然可以在至少一些发行版中成功编译为 PDF。(Overleaf 成功;Windows MikTeX 失败某物在文件中,但我不确定是否是这个。)但是发生了什么?
\newcommand{\PersonalEntry}[2]{
\noindent\hangafter % Indentation
\parbox{\spacebox}{ % Box to align text
\textit{#1}}#2 \par} % Entry value
(...)
\PersonalEntry{Phone}{555 555 5555}
完整错误信息:
! Missing number, treated as zero.
<to be read again>
\protect
\parbox ->\protect
\parbox
\PersonalEntry ...-> \noindent \hangafter \parbox
{\spacebox }{ \textit {#1}...
l.128 \PersonalEntry{Phone}{555 555 5555}
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)