我把两张桌子并排放置,但是无法正确放置标签。
\begin{table}[ht]
\begin{minipage}[b]{0.45\linewidth}\centering
\begin{tabular} {l | l | l}
a & a & a
\end{tabular}
\label{tab:NotreDame}
\caption{Training on Yosemite dataset and testing on Notre-Dame dataset}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\begin{tabular} {l | l | l}
b & b & b
\end{tabular}
\label{tab:Liberty}
\caption{Training on Yosemite dataset and testing on Liberty dataset}
\end{minipage}
\end{table}
当我编译我的代码时,我得到的是问号而不是正确的引用。
答案1
除了把 放在标题后面外,把 放在 里面label
也可以。label
caption
代码:
\documentclass{article}
\usepackage[demo]{graphicx} % for inclusion of graphics
\begin{document}
\begin{table}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
\begin{tabular} {l | l | l}
a & a & a
\end{tabular}
\caption{Training on Yosemite dataset and testing on Notre-Dame dataset}
\label{tab:NotreDame}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\begin{tabular} {l | l | l}
b & b & b
\end{tabular}
\caption{Training on Yosemite dataset and testing on Liberty dataset \label{tab:Liberty} }
\end{minipage}
\end{table}
This is Table \ref{tab:NotreDame} and Table \ref{tab:Liberty}
\end{document}