创建带边框的 IEEE 会议双列格式的表格

创建带边框的 IEEE 会议双列格式的表格

我是 LaTex 新手。我试图找到一些示例代码,展示如何在双列纸上创建带边框的单列表(如果可能的话,还有灰色标题行)。

答案1

既然您提到了 IEEE,那么在这些文档类别中,table和的星号版本figure占据了整个页面。

要使某行突出显示(彩色),只需rowcolor{your_favorite_color}在相关行之前添加。要使此功能可用,您需要在前言中加载colortbl和(xcolor或)包。color

在我的示例中,该lipsum包只需要生成一些随机文本。

以下是您可以尝试的 MWE(我保留了可下载模板中的标题和作者信息):

\documentclass[conference]{IEEEtran}

\usepackage{xcolor}% you could also use the color package
\usepackage{colortbl}
\usepackage{lipsum}

\begin{document}

\title{Bare Demo of IEEEtran.cls for Conferences}

\author{\authorblockN{Michael Shell}
\authorblockA{School of Electrical and\\Computer Engineering\\
Georgia Institute of Technology\\
Atlanta, Georgia 30332--0250\\
Email: [email protected]}
\and
\authorblockN{Homer Simpson}
\authorblockA{Twentieth Century Fox\\
Springfield, USA\\
Email: [email protected]}
\and
\authorblockN{James Kirk\\ and Montgomery Scott}
\authorblockA{Starfleet Academy\\
San Francisco, California 96678-2391\\
Telephone: (800) 555--1212\\
Fax: (888) 555--1212}}

\maketitle

\begin{abstract}
The abstract goes here.
\end{abstract}

\section{Table Example}

\lipsum[1]

\begin{table*}
\centering
\begin{tabular}{|c|c|c|}
\hline
\rowcolor{gray}
A & B & C\\
\hline
1 & 2 & 3\\
\hline
\end{tabular}
\end{table*}

\lipsum[2-15]

\end{document}

答案2

\documentclass[conference]{IEEEtran}

\usepackage{xcolor}% enables use of color package
\usepackage{colortbl}
\usepackage{lipsum}

\begin{document}

\title{Bare Demo of IEEEtran.cls for Conferences}

\author{Aswani~Kumar~Eedara}

\maketitle

\begin{abstract}
The abstract goes here.
\lipsum[1]
\end{abstract}

\section{ Table spanning two columns of the paper in center}

\begin{table*}
\centering
\begin{tabular}{|c|c|c||c|c|c|}
\hline
\rowcolor{gray}
A & B & C & D & E & F\\    \hline
A & B & C & D & E & F\\    \hline
A & B & C & D & E & F\\    \hline
A & B & C & D & E & F\\    \hline
A & B & C & D & E & F\\    \hline
A & B & C & D & E & F\\    \hline
A & B & C & D & E & F\\    \hline
A & B & C & D & E & F\\    \hline
\end{tabular}
\end{table*}
\lipsum[2-10]%

\section{ Table spanning in single column of the paper in center}
\lipsum[11-30]
\begin{table}
\centering
\begin{tabular}{|c|c|c|}
\hline
\rowcolor{yellow}
A & B & C\\    \hline%hline draws horizontal line
1 & 2 & 3\\    
1 & 2 & 3\\    \hline
1 & 2 & 3\\    \hline
1 & 2 & 3\\    \hline
1 & 2 & 3\\    \hline
1 & 2 & 3\\    \hline
1 & 2 & 3\\    \hline
\end{tabular}
\end{table}
\lipsum[16-50]

\end{document}

相关内容