LaTeX 中的表格:使用两列模板将表格放置在单列中

Kai*_*mil 9 latex tabular

我正在研究乳胶背页。我正在使用 IEEE 访问模板,它有两列。我必须将表格修复为单列。你能告诉我我该怎么做吗?

代码:

\begin{table}[h]
\centering
\caption{Comparison table}
\label{tab2}
\begin{tabular}{@{}p{3cm}lllll@{}}
\toprule
\multicolumn{1}{}{}Metric
&\cite{dagher2018ancile} &\cite{tripathi2020sms} &\cite{zheng2018blockchain} &\cite{gordon2018blockchain}
&Our architecture\\ \midrule

User Centric         & Y & N & Y & Y & Y\\
User Authentication  & N & N & N & N & Y \\
Privacy of data owner  & Y & Y & Y & Y & Y\\
Store personal data into blockchain & N & N & N & N & Y\\
Transparent policy & N & N & N & N & Y\\
Use of cryptographic functions & N & Y & Y & N & Y\\
Blockchain based &  Y & Y & Y & Y & Y\\
\bottomrule
\end{tabular}
\end{table}
Run Code Online (Sandbox Code Playgroud)

Mat*_*gro 10

documentclassIEEEtran.cls提供了 环境table*,排列在一列而不是默认的两列上:

\documentclass{IEEEtran}
\usepackage{lipsum,booktabs}

\begin{document}
\lipsum[1]

\begin{table*}[h]
  \centering
  \caption{Comparison table}
  \label{tab2}
  \begin{tabular}{@{}p{3cm}lllll@{}}
    \toprule
    \multicolumn{1}{}{}Metric & \cite{dagher2018ancile} & \cite{tripathi2020sms} & %
      \cite{zheng2018blockchain} & \cite{gordon2018blockchain} & Our architecture\\
    \midrule
    User Centric                        & Y & N & Y & Y & Y\\
    User Authentication                 & N & N & N & N & Y \\
    Privacy of data owner               & Y & Y & Y & Y & Y\\
    Store personal data into blockchain & N & N & N & N & Y\\
    Transparent policy                  & N & N & N & N & Y\\
    Use of cryptographic functions      & N & Y & Y & N & Y\\
    Blockchain based                    & Y & Y & Y & Y & Y\\
    \bottomrule
  \end{tabular}
\end{table*}

\lipsum[2-16]

\end{document}
Run Code Online (Sandbox Code Playgroud)

我使用这个包lipsum只是为了生成我需要的盲文。输出:

输出pdf的屏幕截图

另外,请参阅这个非常相关的线程