I am using ACM conference template sample-sigconf.tex from HERE for an ACM conference.
I have a table that is slightly wider than the column width. I have limited space so I do not want to make it in the center using {table*} as this will waste some empty space that I need. This illustrates the issue:
How can I fit the table in a column even if this will shrink it a little bit?
Here is the script:
\documentclass[sigconf]{acmart}
\usepackage[T1]{fontenc} %to solve the font error
\usepackage{lmodern} %to solve the font error
\usepackage{underscore} %underscores
%-------------------------for the table-----------------------------
\usepackage{array}
\usepackage{booktabs}
\usepackage{multirow}
\newcommand{\head}[1]{\textnormal{\textbf{#1}}}
\newcommand{\normal}[1]{\multicolumn{1}{l}{#1}}
\usepackage{amssymb}% http://ctan.org/pkg/amssymb
\usepackage{pifont}% http://ctan.org/pkg/pifont
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
\newcommand*\rot{\rotatebox{90}}
\usepackage{tabularx}
\usepackage{threeparttable, tablefootnote}
%-------------------------end table-----------------------------
\usepackage{lipsum}
% Copyright
%\setcopyright{none}
%\setcopyright{acmcopyright}
%\setcopyright{acmlicensed}
\setcopyright{rightsretained}
%\setcopyright{usgov}
%\setcopyright{usgovmixed}
%\setcopyright{cagov}
%\setcopyright{cagovmixed}
\begin{document}
\title{Title}
\subtitle{Test}
\author{Author}
\affiliation{%
\institution{XYZ}}
\email{abc@xyz}
\begin{abstract}
Abstract goes here.
\end{abstract}
\maketitle
\section{Introduction}
\lipsum
\begin{table}[tp]
\caption{Levels.}
\vspace*{-5mm}
\label{table:levels}
\centering
\begin{tabular}{ll}
\\ \toprule
A & B \\ \midrule
AA and BBBB & \begin{tabular}{l} aaaaabbbbccccddddeeeeffffgggghhhhiiiijjjj \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \end{tabular} \\
\hline
AA and BBBB & \begin{tabular}{l} aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \end{tabular} \\
\hline
AA and BBBB & \begin{tabular}{l} aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \\
aaaaabbbbccccddddeeeeffffggggh \end{tabular} \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
Best Answer
EDIT: I had a closer look at your not so minimal MWE. You're already loading
tabularx
andmultirow
anyway. So there you go: