2

My table is so big that it doesn't fit into the column, is there a way to make it thinner and make it fit into the column? enter image description here

\documentclass[10pt,conference]{IEEEtran} 
\IEEEoverridecommandlockouts

\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{graphicx}
\usepackage{changepage}
\usepackage{lipsum}
\usepackage{ctable}% http://ctan.org/pkg/ctable
\usepackage{color, colortbl}
\begin{table}[]

\caption{Quantifying the requirement-to-method Input Gold Standard}
\label{GoldStandardInputCompleteness}
\begin{adjustwidth}{-1cm}{-1cm}
    \begin{tabular}{|c|c|c|c|c|c|c|c|}
        \hline   \textbf{App}
        & \textbf{T\textsubscript{m}(\#)} & \textbf{N\textsubscript{m}(\#)} & \textbf{E\textsubscript{m}(\#)} & \textbf{T\textsubscript{m}(\%)} & \textbf{N\textsubscript{m}(\%)} & \textbf{E\textsubscript{m}(\%)} & \textbf{Total} \\ \hline
        \textbf{Chess} & 563 & 2389 & 3064 & 9.36 & 39.71 & 50.93 & 6016 \\ \hline
        \textbf{Gantt} & 1429 & 26842 & 61963 & 1.58 & 24.75 & 68.67 & 90234 \\ \hline
        \textbf{iTrust} & 307 & 7173 & 159358 & 0.18 & 4.30 & 95.52 & 166838 \\ \hline
        \textbf{JHot.} & 936 & 13382 & 122602 & 0.68 & 9.77 & 89.54 & 136920 \\ \hline
    \end{tabular}
\end{adjustwidth}

\end{table}
\end{document}
1
  • What about the obvious choice, font size?
    – bers
    May 7, 2019 at 11:18

4 Answers 4

1

For your table the easiest way seems to change the intercolumn space, e.g. by \setlength{\tabcolsep}{4.1pt}

\documentclass[10pt,conference]{IEEEtran} 
\IEEEoverridecommandlockouts

\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{graphicx}
\usepackage{changepage}
\usepackage{lipsum}
\usepackage{ctable}% http://ctan.org/pkg/ctable
\usepackage{color, colortbl}

\begin{document}

\lipsum[2]

\begin{table}[htbp]
\caption{Quantifying the requirement-to-method Input Gold Standard}
\label{GoldStandardInputCompleteness}
%\begin{adjustwidth}{-1cm}{-1cm}
\setlength{\tabcolsep}{4.1pt}
    \begin{tabular}{|c|c|c|c|c|c|c|c|}
        \hline   \textbf{App}
        & \textbf{T\textsubscript{m}(\#)} & \textbf{N\textsubscript{m}(\#)} & \textbf{E\textsubscript{m}(\#)} & \textbf{T\textsubscript{m}(\%)} & \textbf{N\textsubscript{m}(\%)} & \textbf{E\textsubscript{m}(\%)} & \textbf{Total} \\ \hline
        \textbf{Chess} & 563 & 2389 & 3064 & 9.36 & 39.71 & 50.93 & 6016 \\ \hline
        \textbf{Gantt} & 1429 & 26842 & 61963 & 1.58 & 24.75 & 68.67 & 90234 \\ \hline
        \textbf{iTrust} & 307 & 7173 & 159358 & 0.18 & 4.30 & 95.52 & 166838 \\ \hline
        \textbf{JHot.} & 936 & 13382 & 122602 & 0.68 & 9.77 & 89.54 & 136920 \\ \hline
    \end{tabular}
%\end{adjustwidth}

\end{table}

\lipsum
\end{document}

enter image description here

2
\begin{table}
\caption{Quantifying the requirement-to-method Input Gold Standard}
\label{GoldStandardInputCompleteness}
\tabcolsep=2.5pt
    \begin{tabular}{|c|c|c|c|c|c|c|c|}
        \hline   \textbf{App}
        & \textbf{T\textsubscript{m}(\#)} & \textbf{N\textsubscript{m}(\#)} & 
        \textbf{E\textsubscript{m}(\#)} & \textbf{T\textsubscript{m}(\%)} & 
        \textbf{N\textsubscript{m}(\%)} & \textbf{E\textsubscript{m}(\%)} & 
        \textbf{Total} \\ \hline
        \textbf{Chess} & 563 & 2389 & 3064 & 9.36 & 39.71 & 50.93 & 6016 \\ \hline
        \textbf{Gantt} & 1429 & 26842 & 61963 & 1.58 & 24.75 & 68.67 & 90234 \\ 
        \hline
        \textbf{iTrust} & 307 & 7173 & 159358 & 0.18 & 4.30 & 95.52 & 166838 \\ 
        \hline
        \textbf{JHot.} & 936 & 13382 & 122602 & 0.68 & 9.77 & 89.54 & 136920 \\ 
        \hline
    \end{tabular}
 \end{table}

enter image description here

2

How about you write the columns as rows and rows as columns. Like this:

Output

\documentclass[10pt,conference]{IEEEtran} 
\IEEEoverridecommandlockouts

\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{graphicx}
\usepackage{changepage}
\usepackage{lipsum}
\usepackage{ctable}% http://ctan.org/pkg/ctable
\usepackage{color, colortbl}

\begin{document}

\lipsum[2]

\begin{table}[htbp]
\centering
\caption{Quantifying the requirement-to-method Input Gold Standard}
\label{GoldStandardInputCompleteness}
    \begin{tabular}{|c|c|c|c|c|}
        \hline   
        \textbf{App}                    & \textbf{Chess}    & \textbf{Gantt}    & \textbf{iTrust}   & \textbf{JHot.}\\\hline
        \textbf{T\textsubscript{m}(\#)} & 563               & 1429              & 307               & 936           \\\hline
        \textbf{N\textsubscript{m}(\#)} & 2389              & 26842             & 7173              & 13382         \\\hline
        \textbf{E\textsubscript{m}(\#)} & 3064              & 61963             & 159358            & 122602        \\\hline
        \textbf{T\textsubscript{m}(\%)} & 9.36              & 1.58              & 0.18              & 0.68          \\\hline
        \textbf{N\textsubscript{m}(\%)} & 39.71             & 24.75             & 4.30              & 9.77          \\\hline
        \textbf{E\textsubscript{m}(\%)} & 50.93             & 68.67             & 95.52             & 89.54         \\\hline
        \textbf{Total}                  & 6016              & 90234             & 166838            & 136920        \\\hline
    \end{tabular}
\end{table}

\lipsum
\end{document}
2

i would make this table in the same way as your big table in {previous question):

enter image description here

\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts

\usepackage{xcolor}                             % changed
\usepackage{array, booktabs, makecell, multirow}% new
\renewcommand\theadfont{\small\bfseries}
\renewcommand\theadgape{}
\usepackage{siunitx}
\usepackage{etoolbox}

\usepackage{lipsum}
\begin{document}
\lipsum[66]
\begin{table}[htb]
\caption{Quantifying the requirement-to-method Input Gold Standard}
\label{GoldStandardInputCompleteness}
\setlength\tabcolsep{0pt}
\sisetup{group-four-digits}
\begin{tabular*}{\columnwidth}{@{\extracolsep{\fill}}
             >{\bfseries}c
                         S[table-format=4.0]
                         S[table-format=5.0]
                         S[table-format=6.0]
                         S[table-format=1.2]
                    *{2}{S[table-format=2.2]}
                         S[table-format=6.0]
            }
    \toprule
App     & {\thead{T\textsubscript{m}(\#)}} & {\thead{N\textsubscript{m}(\#)}}
        & {\thead{E\textsubscript{m}(\#)}} & {\thead{T\textsubscript{m}(\%)}}
        & {\thead{N\textsubscript{m}(\%)}} & {\thead{E\textsubscript{m}(\%)}}
        & {\thead{Total}}                                       \\
    \midrule
Chess   & 563  & 2389  & 3064   & 9.36 & 39.71 & 50.93 & 6016   \\
Gantt   & 1429 & 26842 & 61963  & 1.58 & 24.75 & 68.67 & 90234  \\
iTrust  & 307  & 7173  & 159358 & 0.18 & 4.30 & 95.52  & 166838 \\
JHot.   & 936  & 13382 & 122602 & 0.68 & 9.77 & 89.54  & 136920 \\
    \bottomrule
\end{tabular*}
\end{table}
\lipsum[66]
\end{document}

You must log in to answer this question.

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