您好,Tex StackExchange 社区,
我在尝试使用 IEEE 会议模板创建表格时遇到了 LaTeX 问题。如所附第一张图片所示,表格未按预期显示。我的目标是第二张图片中显示的格式。
以下是我正在使用的代码片段:
\begin{table}
\caption{Research questions for review}
\label{exp}
\begin{tabularx}{\columnwidth}{ @{} LL @{} }
\toprule
\# & Questions \\
\midrule % optional, feel free to omit
RQ1 & How does SOA contribute to green computing in data centers, focusing on energy efficiency and sustainability? \\
RQ2 & What are the most effective SOA-based strategies for reducing electricity usage and carbon footprint in data centers, while maintaining performance? \\
RQ3 & How do green computing techniques integrate with SOA to achieve sustainability goals in data centers, and what challenges and opportunities arise in their implementation? \\
\bottomrule
\end{tabularx}
\end{table}
有人对如何纠正这个问题并实现所需的表格格式有什么建议吗?
提前感谢您的帮助!
答案1
使用X
来自的列规范tabularx
:
\documentclass[conference]{IEEEtran}
\usepackage{tabularx}
\usepackage{booktabs}
\begin{document}
\begin{table}
\caption{Research questions for review}\label{exp}
\begin{tabularx}{\linewidth}{ lX } % <-- \columnwidth is also okay here, but \linewidth is more general
\toprule
\# & Questions \\
\midrule % optional, feel free to omit
RQ1 & How does SOA contribute to green computing in data centers, focusing on energy efficiency and sustainability? \\
RQ2 & What are the most effective SOA-based strategies for reducing electricity usage and carbon footprint in data centers, while maintaining performance? \\
RQ3 & How do green computing techniques integrate with SOA to achieve sustainability goals in data centers, and what challenges and opportunities arise in their implementation? \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
此外,如果添加@{}
,表格两侧的边距将被删除。恕我直言,这样看起来不太好。