title: \table in \enumerate environment in latex
body: <p>I want to insert a \table in \enumerate environment and I have something like this:</p>
  
  <pre><code>\begin{enumerate}
      \item Item 1.
      \item Item 2.
      \item \begin{table}[htbp]
          \textbf{\caption{Table1 Caption}}
          \centering  
          \begin{tabular}{c c}
          \hline\hline
          Value 1 &amp; Value 2\\
          \hline
          r1c1 &amp; r2c2\\
          r2c1 &amp; r2c2\\
          r3c1 &amp; r3c2\\           
          \hline
          \end{tabular}
          \label{table1}
          \end{table}
  
      \item \begin{table}[htbp]
          \textbf{\caption{Table 2 Caption}}
          \centering
          \begin{tabular}{ccc}
          \hline\hline
          Value 1 &amp; Value 2 &amp; Value 3\\
          \hline
          r1c1 &amp; r1c2 &amp; r1c3\\
          r2c1 &amp; r2c2 &amp; r2c3\\
          r3c1 &amp; r3c2 &amp; r3c3\\
          \end{tabular}
          \label{table2}
      \end{table}
  
      \item \ref{table1} and \ref{table2}
  \end{enumerate}
  </code></pre>
  
  <p>But when I compile the latex document the \enumerate number are no where near the table. Also when I refer to label "table1" and "table2" it shows up as 3 and 4 respectively (for extra info this part is in subsection 3.3 and these are the only two tables in the whole document). </p>
  
  <p>How do I use \table environment with \enumerate environment. I have seen people use just \tabular with \enumerate but I want to use \table as it gives me an easy option to define \caption and \label.</p>
  
  <p>Also regarding table labeling I am assuming it has something to do with subsection number but I can't really figure it out.</p>
  
  <p>I would really appreciate any help regarding this matter. </p>