This is my code:

\item {客户端发出登录请求}
\item {服务器返回一个随机值,并在会话中记录这个随机值}
\item {客户端将该随机值作为密钥,用户密码进行HMAC运算,然后提交给服务器}
\item {服务器读取用户数据库中的用户密码和步骤2中发送的随机值做与客户端一样的HMAC运算,然后与用户发送的结果比较,如果结果一致则验证用户合法}

When compile,throw this error:

! Missing number, treated as zero

what should I do to fix this problem?

  • 3
    The first thing you should do is to show a small but complete example. And you should tell how you are compiling. Feb 21, 2020 at 10:10
  • 1
    Please give a fully compilable code.
    – AndréC
    Feb 21, 2020 at 10:21

1 Answer 1


(too long for a comment, hence posted as an answer)

I experience no problems of any kind as long as I issue the instruction \usepackage[UTF8]{ctex} in the preamble, employ the article document class, and compile the test document with pdfLaTeX.

That said, don't encase the contents of each \item in matching curly braces. The curly braces are both unnecessary and undesirable; all they do is to create code clutter.

enter image description here

\item {客户端发出登录请求}
\item 服务器返回一个随机值,并在会话中记录这个随机值
\item 客户端将该随机值作为密钥,用户密码进行HMAC运算,然后提交给服务器
\item 服务器读取用户数据库中的用户密码和步骤2中发送的随机值做与客户端一样的HMAC运算,然后与用户发送的结果比较,如果结果一致则验证用户合法

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .