表格中的 \hbox 过宽

表格中的 \hbox 过宽

我有下表

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

我收到一个警告Overfull \hbox (... too wide)...为什么会发生这种情况?我该如何解决?

答案1

有问题的是你的第二个表格。它比列宽还宽。可以使它变窄,但是表格的内容是未知的,因此在实际文档中获得的结果可能不起作用。

在此处输入图片描述

如您所见,我改变了表格布局。现在看起来更好了。为此,我添加了两个新包:booktabs用于规则和siunitx用于S列类型。我还假设列标题的内容是最宽的单元格内容。

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

多于姆韦没有错误,没有警告,没有坏框。

相关内容