title: Table labeling and referencing in Rmarkdown
body: <p>I'm using markdown to render in PDF format.</p>
  
  <p>I am able to cross-reference plot, but when I build a table in LaTeX, I can't do it somehow. An example:</p>
  
  <p>We plot in Figure <code>\@ref(fig:plotseries)</code> the three Index series and their log return series. In Table  <code>\@ref(tab:summindex_stargazer)</code> the main characteristics...</p>
  
  <p>while the table has been coded as follow:</p>
  
  <pre><code>\begin{table}[!htbp] \centering 
    \caption[Summary statistics for token indexes under study.]{Summary statistics for large cap (L.MWI), medium cap (M.MWI), and small cap (S.MWI) indexes log return series. \label{tab:summindex_stargazer}} 
  \footnotesize 
  \begin{tabular}{@{\extracolsep{5pt}} cccc} 
  \\[-1.8ex]\hline 
  \hline \\[-1.8ex] 
   &amp; L.MWI Returns &amp; M.MWI Returns &amp; S.MWI Returns \\ 
  \hline \\[-1.8ex] 
  nobs &amp; $1,524$ &amp; $1,380$ &amp; $1,362$ \\ 
  NAs &amp; $0$ &amp; $0$ &amp; $0$ \\ 
  Minimum &amp; $-0.351$ &amp; $-0.549$ &amp; $-0.933$ \\ 
  Maximum &amp; $0.464$ &amp; $0.699$ &amp; $1.010$ \\ 
  1. Quartile &amp; $-0.031$ &amp; $-0.034$ &amp; $-0.052$ \\ 
  3. Quartile &amp; $0.036$ &amp; $0.039$ &amp; $0.050$ \\ 
  Mean &amp; $0.003$ &amp; $0.004$ &amp; $0.002$ \\ 
  Median &amp; $0.002$ &amp; $0.004$ &amp; $-0.003$ \\ 
  Sum &amp; $4.144$ &amp; $5.333$ &amp; $2.863$ \\ 
  SE Mean &amp; $0.002$ &amp; $0.002$ &amp; $0.004$ \\ 
  LCL Mean &amp; $-0.001$ &amp; $0.000$ &amp; $-0.005$ \\ 
  UCL Mean &amp; $0.006$ &amp; $0.008$ &amp; $0.009$ \\ 
  Variance &amp; $0.004$ &amp; $0.005$ &amp; $0.017$ \\ 
  Stdev &amp; $0.066$ &amp; $0.073$ &amp; $0.130$ \\ 
  Skewness &amp; $0.236$ &amp; $0.214$ &amp; $1.000$ \\ 
  Kurtosis &amp; $4.355$ &amp; $11.602$ &amp; $13.393$ \\ 
  \hline \\[-1.8ex] 
  \end{tabular} 
  \end{table} 
  </code></pre>
  
  <p>This is the result.</p>
  
  <p><a href="https://i.stack.imgur.com/cnl1c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cnl1c.png" alt="enter image description here"></a></p>