2

I have the following table

\documentclass[10pt,twocolumn,letterpaper]{article}

\usepackage{graphicx}
\usepackage{array}

\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}


\begin{document}
\section{Results}
\label{Sec:results}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       Table          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \begin{table}[tb]
    \centering  
    \tabcolsep = 0.01\textwidth %0.18cm
    \begin{tabular}{| m{0.17\textwidth} | M{0.1\textwidth} | M{0.1\textwidth}|}
    \hline
     \centering\textbf{Method} & \textbf{Input} & \textbf{Accuracy}
     \tabularnewline
    \hline
        3DShapeNets  & volumetric & 84.7\\
        Voxnet  & volumetric & 85.9\\
    \hline
        PointNet  & points & 89.2 \\
        PointNet++  & points & 90.7 \\
        Kd-network& points & 91.8 / 90.6 \\
    \hline
    Ours & points & ? \\
    \hline
    \end{tabular}
    \caption{Classification Accuracy on ModelNet40 dataset}
    \label{table:ClassificationAcc}
\end{table}

    \begin{table}[tb]
    \centering  
    \tabcolsep = 0.01\textwidth %0.18cm
    \begin{tabular}{|m{0.12\textwidth}|M{0.1\textwidth}|M{0.15\textwidth}|M{0.08\textwidth}|}
    \hline
    \centering\textbf{Method} &  \textbf{ Data} & \textbf{Permutations} & \textbf{Points}  
     \tabularnewline
    \hline
        PointNet &  & &\\
        PointNet++ &  &  &\\
        Kd-Network &  & &\\
    \hline
    \end{tabular}
    \caption{Challenges summary }
    \label{table:ChallangeComp}
\end{table}


    \subsection{Architecture Design Analysis}
    \label{SubSec:Arch_Dn_Analysis}

    \subsection{Visualizations}
    \label{SubSec:Vis}

\end{document}

I get a warning Overfull \hbox (... too wide) ... Why is this happening and how can I solve it ?

  • 2
    Please provide a full minimal working example starting with \documentclass{...} and ending with \end{document} instead of code snippets. How are we supposed to know how you defined the column type M? – campa Aug 24 '17 at 11:39
  • if i changeM to m, i cant reproduce your problem. without knowing your document preamble is not possible to help you. consider above comment. – Zarko Aug 24 '17 at 11:45
  • In a standard document that table does not produce an overfull box. If I however do \documentclass[twocolumn]{article} then I do get an overfull warning, as the table is wider than a single column. And the solution is then obvious: make the columns of the table narrower. But it's not really clear what your setup is, so please elaborate. – Torbjørn T. Aug 24 '17 at 11:53
  • In general "overfull \hbox" means that a content of a \hbox is too wide for the box. You can solve it by either reducing the stuff inside the box in question, or by increasing the box's size. – Skillmon Aug 24 '17 at 11:53
  • I edited to have a minimal working example ( sorry) – itzik Ben Shabat Aug 24 '17 at 12:56
3

problematic is your second table. it is wider than column width. it is possible to make it narrower, however content of table is unknown, so the obtained result probably in real document will not works.

enter image description here

as you can see, i change table layout. for my taste now looks better. for this i add two new packages: booktabs for rules and siunitx for S column type. i also assume that content of column header is the widest cells contents.

\documentclass[10pt,twocolumn,letterpaper]{article}
\usepackage{siunitx}
\usepackage{array, booktabs}
\newcommand\mc[1]{\multicolumn{1}{>{\bfseries}c}{#1}}

\usepackage{lipsum}

\begin{document}
    \section{Results}
    \label{Sec:results}
\lipsum[22]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       Table
    \begin{table}[htb]
    \centering
\begin{tabular}{l l S[table-format=2.1]}
    \toprule
\mc{Method} & \mc{Input}    & \mc{Accuracy} \\
    \midrule
3DShapeNets & volumetric    & 84.7          \\
Voxnet      & volumetric    & 85.9          \\
    \midrule
PointNet    & points        & 89.2          \\
PointNet++  & points        & 90.7          \\
Kd-network  & points        & {91.8 / 90.6} \\
    \midrule
Ours        & points        & {?}           \\
    \bottomrule
    \end{tabular}
\caption{Classification Accuracy on ModelNet40 dataset}
    \label{table:ClassificationAcc}
\end{table}
\lipsum[44]
    \begin{table}[htb]
    \centering
\begin{tabular}{ l l l l}
    \toprule
\mc{Method} & \mc{Data}     & \mc{Permutations} & \mc{Points}   \\
    \midrule
PointNet    &               &                   &               \\
PointNet++  &               &                   &               \\
Kd-Network  &               &                   &               \\
    \bottomrule
\end{tabular}
\caption{Challenges summary }
    \label{table:ChallangeComp}
\end{table}
\lipsum

    \subsection{Architecture Design Analysis}
    \label{SubSec:Arch_Dn_Analysis}

    \subsection{Visualizations}
    \label{SubSec:Vis}
\end{document}

above mwe gives no error, no warning, no bad boxes.

  • WOW. Thanks. I was hoping for something simpler. In addition, I am not sure yet if the content of the column header is the widest. Maybe my best option is to make this table go across the two columns. – itzik Ben Shabat Aug 24 '17 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.