0

Hello I am trying to fit a table into half column for a IEEE paper. In order to replicate the problem I prepared a small example:

This is what I have so far but this is the incorrect behavior, notice the absence of spaces between the caption and the absence of space between the table and the paragraph:

enter image description here

\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{siunitx}    % v3!
\usepackage{ragged2e}
\usepackage{caption} 

\usepackage{booktabs}
\usepackage{hyperref}
\usepackage{booktabs}
\usepackage{mwe}

\usepackage{booktabs, makecell, multirow, tabularx}
\setcellgapes{2pt}
\newcolumntype{L}[1]{>{\RaggedRight\hspace{0pt}%
                     \hsize=#1\hsize}X}
\usepackage{lipsum}
\setlength\intextsep{0pt}


%\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{xcolor}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
    T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\begin{document}

% Some paragraphs........

\section{Systematic literature review}\label{sec:systematic_review}

\subsection{Analysis of publication data}

Wacker (1998), who identified two broad macrocategories of research methods (analytical and empirical) further divided
into six categories (analytical: conceptual, mathematical and statistical; empirical: experimental design, statistical sam-
pling and case studies). The classification developed by Wacker has already been used by Burgess, Singh, and Korogl
    
\begin{table}[ht]
\centering
\small
\setlength{\tabcolsep}{4pt}
\makegapedcells
\begin{tabularx}{\columnwidth}{@{}L{0.8}L{1.1}L{1.1} @{}}
    \toprule
Type of document    &   Frequency  &   Proportion (\%) \\
    \midrule
    Journal   &   930   &   23\% \\
    Conference Proceeding   &   168   &   23\% \\
    Book series   &   111   &   23\% \\
    Book   &   5   &   23\% \\
    \bottomrule
\end{tabularx}
\caption{Types of retrieved documents for 3D ultrasound query}
\label{tab:values}
\end{table}

Wacker (1998), who identified two broad macrocategories of research methods (analytical and empirical) further divided
into six categories (analytical: conceptual, mathematical and statistical; empirical: experimental design, statistical sam-
pling and case studies). The classification developed by Wacker has already been used by Burgess, Singh, and Korogl

I am looking for a behavior that occupys the column ad that provides the proper IEEE spaces, an example is like the one below, notice the proper spacing:

enter image description here

I order to solve the problem I went on the official website of overleaf (which is the editor I am using) and studied this reference which I applied but could not really arrive to what I am looking for.

Also after searching I came across this post which helped but up to a certain point.

I don't understand what I am missing. Thanks for pointing to the right direction.

5
  • 1
    we can't run the code fragment you have posted and the spacing is due to code not shown so it is hard to comment. The space above and below should be \intextsep which you can set with \setlength but no idea why it is so small in your image. Jun 25, 2021 at 15:54
  • How or where is the L column type defined?
    – Mico
    Jun 25, 2021 at 15:55
  • Hello @DavidCarlisle, and thanks for stopping by. I just added the additional packages I am using so the example should be complete to replicate. Let me know if you need additional details, and thanks for reading the question :)
    – Emanuele
    Jun 25, 2021 at 16:04
  • 1
    Don't set \Intextsep=0pt. That is typically only done with wrapfig, which you shouldn't be using anyway. Jun 25, 2021 at 17:20
  • @JohnKormylo, thanks for the input! After eliminating \Intextsep=0pt I have the proper spacing! :)
    – Emanuele
    Jun 25, 2021 at 17:26

1 Answer 1

1

IEEEtran require that table captions are above table. So, your MWE (a bit modified) should be something like this:

\documentclass{ieeetran}
\usepackage{booktabs, makecell}
\setcellgapes{3pt}
\usepackage{siunitx} % consider is v3

\begin{document}
\section{Systematic literature review}\label{sec:systematic_review}

\subsection{Analysis of publication data}

Wacker (1998), who identified two broad macrocategories of research methods (analytical and empirical) further divided
into six categories (analytical: conceptual, mathematical and statistical; empirical: experimental design, statistical sam-
pling and case studies). The classification developed by Wacker has already been used by Burgess, Singh, and Korogl

    \begin{table}[ht]
\caption{Types of retrieved documents for 3D ultrasound query}
\label{tab:values}
\centering
\makegapedcells
\begin{tabular}{l
                S[table-format=3.0]
                S[table-format=2.0{\,\%}] 
                }
    \toprule Type of document        &   {Frequency} &   {Proportion (\%)}   \\
    \midrule
Journal                 &   930         &   23\,\%          \\
Conference Proceeding   &   168         &   23\,\%          \\
Book series             &   111         &   23\,\%          \\
Book                    &   5           &   23\,\%          \\
    \bottomrule
\end{tabular}
    \end{table}

Wacker (1998), who identified two broad macrocategories of research methods (analytical and empirical) further divided
into six categories (analytical: conceptual, mathematical and statistical; empirical: experimental design, statistical sam-
pling and case studies). The classification developed by Wacker has already been used by Burgess, Singh, and Korogl
\end{document}

enter image description here

Edit: In the case, that you have available siunitx package version 2, than specification for additional space for \,% in oS` columns is slightly different:

    \begin{table}[ht]
\caption{Types of retrieved documents for 3D ultrasound query}
\label{tab:values}
\centering
\makegapedcells
\begin{tabular}{l
                S[table-format=3.0]
                S[table-format=2.0,
                  table-space-text-post={\,\%}] % when you have installed siunitx version 2}
    \toprule Type of document        &   {Frequency} &   {Proportion (\%)}   \\
    \midrule
Journal                 &   930         &   23\,\%          \\
Conference Proceeding   &   168         &   23\,\%          \\
Book series             &   111         &   23\,\%          \\
Book                    &   5           &   23\,\%          \\
    \bottomrule
\end{tabular}
    \end{table}

Result is the same as before.

5
  • Thanks, it almost works. I have a strange error. How do I solve this?
    – Emanuele
    Jun 25, 2021 at 16:54
  • @Emanuele, hm, it seems that Overleaf hasn't recent version of siunitx package. I would add solution for older version (v2) ASAP.
    – Zarko
    Jun 25, 2021 at 16:57
  • I tried to solve the problem using \usepackage{siunitx}[=v2] but didn/t work, is there a temporary solution?
    – Emanuele
    Jun 25, 2021 at 17:01
  • @Emanuele, see edited answer.
    – Zarko
    Jun 25, 2021 at 17:11
  • Thanks I appreciate your help, it works!
    – Emanuele
    Jun 25, 2021 at 17:25

You must log in to answer this question.

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