1

I trying to fit a table into an appendix using IEEE template. The table I am trying to add is too wide for a column and needs to be fit. The table also has to be added to a column in the appendix of the document.

This question is very similar to the one found here https://stackoverflow.com/questions/33971693/latex-ieee-template-use-single-column-table-in-multicolumn-latex-content .

I have added the particular table that I have been trying to fit into the document below, followed by the complete package and attempt at adding a the table. I have been finding similar questions online but nothing seemed to work. Thanks for your help in advance.

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

The source code for the template that I am using can be in the link below: https://www.overleaf.com/articles/adaptive-learning-rate-clipping-stabilizes-learning/tssrqcwknfch

9
  • Do not use resizebox on a table as this will give you inconsistent font sizes.
    – leandriis
    Apr 2, 2020 at 19:31
  • Please also make your code compilable. Currently it results in a bunch of error messages
    – leandriis
    Apr 2, 2020 at 19:32
  • Thanks @leandriis must have removed something whilst trying to break it to the minimum, I'll just add the code from the template instead.
    – user4933
    Apr 2, 2020 at 19:34
  • Do you want to make your table fit inot one column or should it fit into two columns?
    – leandriis
    Apr 2, 2020 at 19:34
  • 1
    \begin{table} \small \begin{tabularx}{\linewidth}{p{1.75cm}>{\raggedright\arraybackslash}Xl} or \begin{table*} \begin{tabularx}{\linewidth}{l>{\raggedright\arraybackslash}Xl}might work.
    – leandriis
    Apr 2, 2020 at 19:37

2 Answers 2

1

To further elaborate on my comment:

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

enter image description here

2
  • 1
    Thank you @user1146332, It works great!
    – user4933
    Apr 2, 2020 at 21:15
  • You're welcome! Apr 2, 2020 at 21:18
0

The answer provided by @leandriis in the comments above is use \begin{table} \small \begin{tabularx}{\linewidth}{p{1.75cm}> {\raggedright\arraybackslash}Xl}

This translated to:

\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}```
2
  • I wouldn't implement the table as a float. In a multicolumn layout floats are a difficult concept. Apr 2, 2020 at 19:56
  • @user1146332 I am not so well versed in latex. Only started a year ago, could you elaborate further. I'm quite a NOOB but would love to do it better.
    – user4933
    Apr 2, 2020 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .