1

I'm trying to get three centred columns, evenly spaced under the (rather long) column heading (...). Can anyone help? Thanks!

    \begin{table}[!]
    \centering
    \begin{tabular}{ c c c | c c c |c c  c  }
     $Z$ &  &$\Delta z$ [cm] & \multicolumn{3}{c}{$\langle dE/dX \rangle$ [MeV     g$^{-1}$cm$^{2}$]} &  \multicolumn{3}{|c}{$\Delta E$~[MeV]} \\
    \hline
    1 & LH$_{2}$ & $35$ & 5.10   &4.39  & 4.21 & 12.63 & 10.86 & 10.42   \\
     \hline
    & & $p_z$~[MeV/c] & 140 & 200 & 240 & 140 & 200 & 240\\
    \hline
\hline
\end{tabular}
\label{tab:Targets}
\end{table} 

1 Answer 1

1

You can use the tabularx package as follows:

Sample output

\documentclass{article}

\usepackage{tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{document}

\begin{table}[htp]
  \centering
  \begin{tabularx}{\textwidth}{ c c c |  C C C |c c  c  }
    $Z$ &  &$\Delta z$ [cm] & \multicolumn{3}{c}{$\langle dE/dX \rangle$ [MeV     g$^{-1}$cm$^{2}$]} &  \multicolumn{3}{|c}{$\Delta E$~[MeV]} \\
    \hline
    1 & LH$_{2}$ & $35$ & 5.10   &4.39  & 4.21 & 12.63 & 10.86 & 10.42   \\
    \hline
    & & $p_z$~[MeV/c] & 140 & 200 & 240 & 140 & 200 & 240\\
    \hline \hline
  \end{tabularx}
  \label{tab:Targets}
\end{table} 

\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .