title: Referencing a subfigure in LaTeX that doesn't have a caption
body: <p>I have 2 figure side by side in LaTeX using the recommended package <code>subcaption</code>.</p>
  
  <pre><code>\begin{figure}
    \centering
    \begin{subfigure}[b]{0.48\textwidth}
      \includegraphics[width=\textwidth]{events/pad_p2}
      \label{fig:pad_p2}
    \end{subfigure}
    ~
    \begin{subfigure}[b]{0.48\textwidth}
      \includegraphics[width=\textwidth]{events/pad_p8}
      \label{fig:pad_p8}
    \end{subfigure}
  
    \caption{Pads.}
  \end{figure}
  </code></pre>
  
  <p>Then I try to reference them in the text using:</p>
  
  <pre><code>Look at figure~\ref{fig:pad_p8}
  </code></pre>
  
  <p>But I get an error when compiling the document that the reference doesn't exist.</p>
  
  <p>If instead I put a caption in each subfigure then the error goes away, but that's not what I really want to do.</p>
  
  <p>How do I solve the problem without adding the <code>caption</code> for each subfigure?</p>