[Tex/LaTex] How to adjust column width of a table

columnstableswidth

I have a table in the following code:

\documentclass{revtex4-1}

\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{multirow}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{bm}
\usepackage{tabularx}

\begin{document}
\begin{table*}
  \footnotesize
  \caption{\label{tab:dimensionlessnumber}
  Definitions and physical meanings of dimensionless quantities.}
  \begin{ruledtabular}
  \begin{tabularx}{\textwidth}{llX}
  \textrm{number group} & \textrm{Definition} & \textrm{Physical meaning}  \\
  \colrule
  Density ratio               & $D=\frac{\rho_1}{\rho_2}$
  & A measure of the ratio of the A to B densities            \\
  Reactive number             & $R=\frac{s\Delta p}{a b C}$
  & The ratio of two very different quantities, a measure of the rate of reaction (very complicated), different from another definition in the reference                         \\
  Non-dimensional non-trivial parameter & $N=bk/aC$
  & A measure of the non-trivial degree at another side       \\
  \end{tabularx}
  \end{ruledtabular}
\end{table*}

\end{document}

It gives

enter image description here

In this table,

  1. The 2nd row of the 3rd column cannot be shown completely. Is there any way to
    automatically split the long entry in multi-lines with an appropriate column width so that text wider than the column width will be put on a new line?

  2. The 3rd row of the 1st column was obviously longer than the length of others.
    I have tried \\ to break it on a new line. But in this way,
    the entry of the second column, e.g., the definition of $N$, will then follow the second row, see the next figure. Instead, I want it in the first row.

To solve the problem, I have used tabularx environment (with width set to \textwidth, as shown in the this question and the other question. I even used \footnotesize to reduce the font of the table. But the problems remain. Thanks for any suggestion!

enter image description here

Best Answer

Remove ruledtabular and use p type for the first column. Also to make the table a bit more readable, you can increase line spacing by \renewcommand{\arraystretch}{1.5}. Finally, instead of multiple \hlines, you may consider using booktabs for much better output.

\documentclass{revtex4-1}

\usepackage{amsmath}
\usepackage{mathrsfs}
\usepackage{multirow}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{bm}
\usepackage{tabularx}

\begin{document}
\begin{table*}
  \renewcommand{\arraystretch}{1.5}
  \caption{\label{tab:dimensionlessnumber}
  Definitions and physical meanings of dimensionless quantities.}
  %\begin{ruledtabular}
  \begin{tabularx}{\textwidth}{ >{\raggedright}p{10em} l X }
  \hline \hline
  \textrm{number group} & \textrm{Definition} & \textrm{Physical meaning}  \\
  \hline
  Density ratio               & $D=\frac{\rho_1}{\rho_2}$
  & A measure of the ratio of the A to B densities            \\
  Reactive number             & $R=\frac{s\Delta p}{a b C}$
  & The ratio of two very different quantities, a measure of the rate of reaction (very complicated), different from another definition in the reference                         \\
  Non-dimensional non-trivial parameter & $N=bk/aC$
  & A measure of the non-trivial degree at another side       \\ \hline\hline
  \end{tabularx}
  %\end{ruledtabular}
\end{table*}

\end{document}

enter image description here

Related Question