gpt4 book ai didi

latex - 在 latex 中并排标记表格

转载 作者:行者123 更新时间:2023-12-02 03:24:26 27 4
gpt4 key购买 nike

我在 latex 中有两个并排的表格,但是,我不能单独标记它们以在 ref 标签中使用。有什么方法可以使用 ref 标签在我的文本中引用他们的名字吗?例如,我需要在表 1 ... 和表 2 中说......

有什么意见吗?

\begin{table}[ht]
\parbox{.45\linewidth}{
\centering
\begin{tabular}{|l|l|l|}
\hline
person id & seq id & feature vector$_1$ \\\hline
1 & 1 & 1 \\
1 & 2 & 1 \\ \hline
1 & 1 & 1 \\ \hline
1 & 1 & 1 \\ \hline

\end{tabular}
\caption{HRV Dataset}
}
\hfill
\parbox{.45\linewidth}{
\centering
\begin{tabular}{|l|l|l|l|}
\hline
person id & seq id & feature vector$_1$ & feature vector$_2$ \\\hline

1 & 1 &1 \\
1 & 2 & 1 \\ \hline
1 & 1 &1\\ \hline
1 & 1 & 1 \\ \hline
% \begin{tabular}{|l|l|l|l|}


% \end{tabular}
\end{tabular}
\caption{BAC Dataset}}
\end{table}

最佳答案

您可以在标题中包含标签,这将允许您稍后在文档中分别\ref每个表格。

\documentclass{article} 

\begin{document}

\begin{table}[ht]
\parbox{.40\linewidth}{
\centering
\begin{tabular}{|l|l|l|}
\hline
person id & seq id & feature vector$_1$ \\\hline
1 & 1 & 1 \\
1 & 2 & 1 \\ \hline
1 & 1 & 1 \\ \hline
1 & 1 & 1 \\ \hline

\end{tabular}
\caption{HRV Dataset \label{HRVtable}}
}
\hfill
\parbox{.45\linewidth}{
\centering
\begin{tabular}{|l|l|l|l|}
\hline
person id & seq id & feature vector$_1$ & feature vector$_2$ \\\hline

1 & 1 &1 &1 \\
1 & 2 & 1&1 \\ \hline
1 & 1 &1 &1\\ \hline
1 & 1 & 1 &1 \\ \hline
\end{tabular}
\caption{BAC Dataset \label{BACtable}}}
\end{table}

HRV data in Table \ref{HRVtable} and BAC data in Table \ref{BACtable}.

\end{document}

enter image description here

关于latex - 在 latex 中并排标记表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53819902/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com