# What is the minimum cell's table width?

I'm kind of stuck in the middle of nowhere because I want to make this table (48 columns I know it's huge... but I need this) fit in a4paper but it seems there is a cell's table minimum width, isn't it ? For instance, there is no difference between 1pt and 0.001pt.

Thanks for helping.

\documentclass[a4paper,12pt]{article}

\usepackage{array}

\begin{document}

\begin{table}[htp]
\begin{center}
\begin{tabular*}{\textwidth}{| *{48}{>{\centering\arraybackslash}m{0.1pt}|}}
\hline
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & \\
\hline
\end{tabular*}
\end{center}
\end{table}

\end{document}

• You have a \tabcolsep of 6pt and and the rules have a width of 0.4pt. This already fills up the textwidth. – Ulrike Fischer Sep 12 '18 at 7:58

The is a minimum distance between columns which is called tabcolsep. You can set this to zero --- and then manage the thing manually:

\setlength{\tabcolsep}{0pt}


Look:

\documentclass[a4paper,12pt]{article}
\usepackage{array}
\begin{document}
\begin{table}[htp]
\begin{center}
\setlength{\tabcolsep}{0pt}
\begin{tabular*}{\textwidth}{| *{48}{>{\centering\arraybackslash}m{5pt}|}}
\hline
& & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & \\
\hline
\end{tabular*}
\end{center}
\end{table}
\end{document}


You have to consider the vertical line width (I think it's 0.4pt by default), and in this case you'll need some stretch to "fill the space" (it's underfull now), like:

 \setlength{\tabcolsep}{0pt}
\begin{tabular*}{\textwidth}{| *{48}{%
@{\extracolsep{\fill}}%
>{\centering\arraybackslash} m{7pt}|%
@{\extracolsep{\fill}}}%
}
\hline
.& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .& .\\
\hline
\end{tabular*}


For more complex distribution of space, maybe tabularx is a better option.

You can make the content width of p (or m or b) columns as small as you wish (0pt for example) however columns by default have \tabcolsep space either side and that defaults to 6pt so you may want \setlength\tabcolsep{0pt} here.

Also note you should use

\begin{tabular}


not

\begin{tabular*}{\textwidth}


If you do use tabular* then you need to use @{\extracolsep{\fill}} to allow additional space between columns so tex can achieve the stated width.

• Works like a charm ! Thanks a lot David. – rhum187 Sep 12 '18 at 8:03