I have trouble referencing papers in a table. I want to reference papers in a table, where the caption's font is defined using the "caption" package. However, I get ?? in the references in the following code:
\documentclass{article}
\usepackage[numbers,sort]{natbib}
\usepackage[backref,pageanchor=true,plainpages=false, pdfpagelabels, bookmarks,bookmarksnumbered]{hyperref}
\usepackage[font=footnotesize, labelfont=bf]{caption}
\begin{document}
\begin{table}[t]
\centering
\begin{tabular}{ c | l }
\citep{citation1} & cell\\
\end{tabular}
\caption[short caption]{long caption}
\label{tab:label}
\end{table}
citation in text \citep{citation1}.
\bibliographystyle{plainnat}
\bibliography{cite}
\end{document}
It also gives me warnings that say "Package caption Warning: \label
without proper \caption
on input line 13" and "LaTex Warning" Reference '??' on page 1 undefined on input line 12. The generated text looks like
If I comment out the \usepackage[font=footnotesize, labelfont=bf]{caption}
command the result looks like
, where the reference generate a pointer only to the text not to the table.
Ultimately, I want to use the "caption" package to define the caption fonts.
caption
package should be loaded beforehyperref
.