1

I really want to make a table like this in LaTeX:

enter image description here

Could someone help me do that? I'm new to using LaTeX, thanks!

5
  • 1
    Rather than splitting a column into three separate columns, you could view the task as "How to make one cell spread across three columns?" For this approach, you may want to start with a seven column table and use \multicolumn{3}{c}{MNI coordinates} in order to ensure that the column header spreads across three columns.
    – leandriis
    May 17, 2022 at 12:17
  • For an improved alignment of nubers inside the table, you may also want to take a look at the S column type provided by siunitx.
    – leandriis
    May 17, 2022 at 12:20
  • Are the six data columns supposed to have equal widths?
    – Mico
    May 17, 2022 at 12:34
  • 1
    I think so, yes! May 17, 2022 at 12:35
  • Welcome to TeX.SE.
    – Mico
    May 17, 2022 at 12:57

1 Answer 1

1

Rather than divide an existing column into three (sub)columns, I'd create 2 more columns to begin with and write \multicolumn{3}{c}{MNI coordinates} to specify the header that spans the three columns in question. To assure equal column widths for columns 3 thru 7, I suggest you employ a tabularx environment and a centered form of the package's X column type. That said, I wouldn't use bold at all.

enter image description here

\documentclass{article} % or some other suitable doc. class
\usepackage{siunitx,tabularx,ragged2e,booktabs}
\newcolumntype{C}{>{\Centering}X}
\newcommand\mC[1]{\multicolumn{1}{C}{#1}} % handy shortcut macro
\newcommand\mytab[1]{\smash{\begin{tabular}[t]{@{}C@{}} #1 \end{tabular}}}
\newcolumntype{T}[1]{S[table-format=#1]}

\begin{document}

\begin{table}[ht!]
\begin{tabularx}{\textwidth}{@{} l c T{2.0} *{3}{T{-2.0}} T{1.2} @{}}
\toprule
Region &
\mC{Side} &
\mytab{Cluster size} &
\multicolumn{3}{c}{MNI coordinates} &
\mC{$t$} \\
\cmidrule(lr){4-6}
& & & \mC{X} & \mC{Y} & \mC{Z} \\
\midrule
\multicolumn{7}{@{}l}{\em Parametric modulation with SCR}\\
Thalamus                 & R & 56 &   6 & -24 &   8 & 4.7  \\
Substantia nigra         & L & 39 & -13 & -13 & -12 & 3.91 \\
Dentate   \\
Fastigium \\
Anterior cerebellar lobe & R & 42 &   5 & -48 & -33 & 5.94 \\
\addlinespace
\multicolumn{7}{@{}l}{\em Parametric modulation with PDR} \\
Thalamus                 & R & 33 &   4 & -18 &   8 & 3.17 \\
\dots \\
\bottomrule
\end{tabularx} 
\end{table}

\end{document} 

You must log in to answer this question.

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