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.

Emanuele
  • 143
  • 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. – David Carlisle Jun 25 '21 at 15:54
  • How or where is the L column type defined? – Mico Jun 25 '21 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 '21 at 16:04
  • 1
    Don't set \Intextsep=0pt. That is typically only done with wrapfig, which you shouldn't be using anyway. – John Kormylo Jun 25 '21 at 17:20
  • @JohnKormylo, thanks for the input! After eliminating \Intextsep=0pt I have the proper spacing! :) – Emanuele Jun 25 '21 at 17:26

1 Answers1

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.

Zarko
  • 296,517