如何在 IEEE 模板中强制将表格设置为单列?

如何在 IEEE 模板中强制将表格设置为单列?

我尝试使用 IEEE 模板将表格放入附录中。我尝试添加的表格对于列来说太宽,需要将其放进去。还必须将该表格添加到文档附录中的列中。

这个问题和这里的问题非常相似https://stackoverflow.com/questions/33971693/latex-ieee-template-use-single-column-table-in-multicolumn-latex-content

我添加了一个特定的表格,试图将其放入下面的文档中,然后是完整的包并尝试添加表格。我在网上找到了类似的问题,但似乎没有什么用。提前感谢您的帮助。

    % Please add the following required packages to your document preamble:
% \usepackage{graphicx}
\begin{table}[]
\resizebox{\textwidth}{!}{%
\begin{tabular}{lll}
Simulation   & Description                                              & Language \\
Markov Chain:            & Simultaneous and ergodic simulations of Markov chains, to understand implementation.                                       & Python \\
Multiarm bandit problem: & In order to compare greedy epsilon at different hyper-parameters \textbackslash{}varepsilon and optimistic value approach. & Python \\
Tic-tac-toe: & Implemented in R, to illustrate learning from a data-set & R        \\
Tic-tac-toe: & Implemented in Python.                                   & Python   \\
Grid World:  & Implemented in R.                                        & R        \\
Grid world:  & Implemented in Python.                                   & Python   \\
AI gym:      & Discrete Cart-pole AI gym.                               & Python  
\end{tabular}%
}
\end{table}

我使用的模板的源代码可以在下面的链接中找到: https://www.overleaf.com/articles/adaptive-learning-rate-clipping-stabilizes-learning/tssrqcwknfch

答案1

进一步阐述我的评论:

\documentclass[a4paper, 10pt, conference]{IEEEconf}      

\usepackage[column=O]{cellspace}
\setlength\cellspacebottomlimit{0.5em}
\setlength\cellspacetoplimit{0.5em}
\usepackage{booktabs}
\usepackage{adjustbox}
\usepackage{tabularx}
\usepackage[none]{hyphenat}
\usepackage{lipsum}

\title{\LARGE \bf Reinforcement learning}
\author{Thamu Mnyulwa} 

\begin{document}
\maketitle

\begin{abstract}
    \lipsum[1][1-30]{lipsum}
\end{abstract}

\section{Test}

As you can see in table \ref{tab:table}.

\begin{appendix}
    \section{Supplementary Material}

    \lipsum[1-2][1-30]{lipsum}
    \begin{adjustbox}{captionabove={Caption}, label=tab:table, nofloat=table, addcode={\bigskip}{\bigskip}}
        \small
        \begin{tabularx}{\linewidth}{@{}O{X}>{\raggedright}O{p{0.5\linewidth}}O{l}}
            \toprule
            Simulation                                         & Description                                              & Lang. \\ \midrule
            Markov Chain                                       & Simultaneous and ergodic simulations of Markov chains, to understand
            implementation.                                    & Py \\
            \parbox[t]{0.3\linewidth}{Multiarm bandit problem} & In order to compare greedy epsilon at different hyper-parameters varepsilon and optimistic value approach. & Py \\
            Tic-tac-toe                                        & Implemented in R, to illustrate learning from a data-set & R        \\
            Tic-tac-toe                                        & Implemented in Py.                                   & Py   \\
            Grid World                                         & Implemented in R.                                        & R        \\
            Grid World                                         & Implemented in Py.                                   & Py   \\
            AI gym                                             & Discrete Cart-pole AI gym.                               & Py \\ \bottomrule
        \end{tabularx}
    \end{adjustbox}
\end{appendix}
\end{document}

在此处输入图片描述

答案2

@leandriis 在上面的评论中提供的答案是使用 \begin{table} \small \begin{tabularx}{\linewidth}{p{1.75cm}> {\raggedright\arraybackslash}Xl}

翻译过来就是:

\begin{table} \small \begin{tabularx}{\linewidth}{p{1.75cm}>{\raggedright\arraybackslash}Xl}
Simulation   & Description                                              & Language \\
Markov Chain:            & Simultaneous and ergodic simulations of Markov chains, to understand implementation.                                       & Python \\
Multiarm bandit problem: & In order to compare greedy epsilon at different hyper-parameters \textbackslash{}varepsilon and optimistic value approach. & Python \\
Tic-tac-toe: & Implemented in R, to illustrate learning from a data-set & R        \\
Tic-tac-toe: & Implemented in Python.                                   & Python   \\
Grid World:  & Implemented in R.                                        & R        \\
Grid world:  & Implemented in Python.                                   & Python   \\
AI gym:      & Discrete Cart-pole AI gym.                               & Python  
\end{tabularx}%
\end{table}
\end{appendix}```

相关内容