# cleveref package only print the first reference, the rest are just question marks

I want to cross reference multiple equations at a single place and I found that cleveref package is what I need. But I find that cleveref can not work properly: it only print the first equation ref correctly.

The MWE is as follows:

\documentclass{article}
\usepackage{cleveref}

\begin{document}

$$\label{eq1} a = b+c$$
$$\label{eq2} e = mc^2$$

$$\label{eq3} r = d +e$$

$$\label{eq4} f = j + m$$

$$\label{eq5} s = p +b$$

\end{document}


The above code produces something like this:

Only one equaiton reference is printed correctly. What is problem?

Cleveref is sensitive to the space in the label and as a result, you cannot have spaces after the comma. It is trying to find the reference ' eq2' as opposed to 'eq2' (the ' are there to make the space salient).

Here's the fixed version:

\documentclass{article}
\usepackage{cleveref}

\begin{document}
$$\label{eq1} a = b+c$$
$$\label{eq2} e = mc^2$$
$$\label{eq3} r = d +e$$
$$\label{eq4} f = j + m$$
$$\label{eq5} s = p +b$$