I am trying to compile the following code:
\documentclass{article}
\usepackage{graphicx,algpseudocode,algorithm,multirow,hyperref,subfig,cancel,natbib,epstopdf,xspace}
\begin{document}
\clubpenalty=10000
\widowpenalty = 10000
\begin{table}
%\newcommand{\tabcolwidth}[1]{\parbox[c]{3cm}{\centering #1}}
\renewcommand\multirowsetup{\centering}
\caption{caption}
\subfloat
{
\resizebox{1.0\linewidth}{!}
{
\begin{tabular}{lrrrr}
\hline
\multirow{2}{*}{A} & \multicolumn{4}{c}{B} \\
& $20 \%$ & $40 \%$ & $60 \%$ & $80 \%$ \\
\hline
Alg1 & $48.21$ & $48.64$ & $51.13$ & $52.46$ \\
Alg2 & $42.72$ & $46.31$ & $48.56$ & $51.64$ \\
\hline
\end{tabular}
}
}\\
\end{table}
\end{document}
using pdflatex.
I am getting the following errors during compilation:
Overfull \hbox (6.71255pt too wide) in paragraph at lines 28--29
[][]
Underfull \hbox (badness 10000) in paragraph at lines 28--29
I am not able to figure out the reason here!
\resizeboxand\subfloatwrappers. A centeredtabularis more that enough, or alternatively, only atabular*,tabularxortabulary, if you are obsessed about make the with of the table equal to\linewidth. I will not say that use\hlineit is also a problem, but I would change it forbooktabscommands. – Fran Jan 25 '17 at 09:29\centeringintable. But also how to useminipageorsubfigure. – Schweinebacke Jan 25 '17 at 10:23tabulars is enough. About subfigures positions and captions there are several alternatives: runtexdoc subfig,texdoc subcaptionandtexdoc subfloats(o search this packages in CTAN) for some information. – Fran Jan 25 '17 at 10:39