Kaisar Jamil
Kaisar Jamil

Reputation: 125

Table in LaTeX: Place the table in single column using the two column template

I am working on the LaTeX overleaf. I am using the IEEE access template which is two column. I have to fix my table in a single column. Can you tell me how can i do this?

Code:

\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}

Upvotes: 9

Views: 15963

Answers (1)

MattAllegro
MattAllegro

Reputation: 7345

The IEEEtran.cls documentclass provides the environment table*, arranged on one column instead of the default two columns:

\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}

I used the package lipsum only to produce as much blind text as I needed. The output:

screenshot of output pdf

Also, see this very related thread.

Upvotes: 10

Related Questions