2

I want to make a table that one of the columns must be fat! could some one fix it?

    \begin{table}[!h]\label{Table}
    \caption{random symmetrized instances}
    \begin{center}
    \begin{tabular}{|c|c|c|}
Name  &   The generators of the symmetry group & Dimension & \\
 \hline
NS1     &   $(1,7,12,16,19,21,6)(2,8,13,17,20,5,11)(3,9,14,18,4,10,15),
  (4,6,5)(9,11,10)(13,15,14)(16,18,17)(19,20,21)$  &  21 \\
 \hline
NS2   &   $ (1,2,3,4,5)$  & 5
 \hline

    \end{tabular}
    \end{center}
    \end{table}

enter image description here

  • The table is just way too wide for the page. Consider splitting the entry into several lines (could perhaps use the p{<width>} specifier here?), or print the table sideways. – vonbrand Feb 17 at 3:00
4

tabularx allows you to have a column "as wide as possible".

\documentclass{article} 
\usepackage{tabularx}
\usepackage{booktabs}
\begin{document}
\begin{table}[!h]\label{Table}
  \caption{random symmetrized instances.}
  \begin{tabularx}{\textwidth}{c>{\centering}Xc}
  \toprule
      Name  &   The generators of the symmetry group & Dimension  \\
  \midrule
  NS1     &   $(1,7,12,16,19,21,6)$, $(2,8,13,17,20,5,11)$, $(3,9,14,18,4,10,15)$,
  $(4,6,5)$, $(9,11,10)$, $(13,15,14)$, $(16,18,17)$, $(19,20,21)$  &  21 \\
  \midrule
  NS2   &   $ (1,2,3,4,5)$  & 5\\
  \bottomrule
  \end{tabularx}
\end{table}
\end{document}

enter image description here

There are different philosophies on the market that concern tables. Some say one should bookmarks, which I have done here. My personal philosophy, however, is that the best tables are those which one can avoid. ;-) Yet sometimes it is not possible to do that. Then bookmarks is a decent tool.

|improve this answer|||||

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.