我怎样才能将cell1
、cell4
和放置在列cell7
下方particle
以及cell2
、cell5
和放置在列cell8
下方?mass
family 1
\documentclass[11pt,a4paper]{article}
\usepackage{blindtext}
\usepackage{mathtools}
\DeclareMathOperator{\sgn}{sgn}
\begin{document}
\begin{center}
\begin{tabular}{c c c}
Family 1 & Family 2 & Family 3\\
Particle \hspace{2em} Mass & Particle \hspace{2em} Mass & Particle \hspace{2em} Mass\\
\hline
cell1 & cell2 & cell3 \\
\hline
cell4 & cell5 & cell6 \\
\hline
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\end{center}
\end{document}
答案1
定义 6 列并更改\tabcolsep
为1em
\documentclass[11pt,a4paper]{article}
\usepackage{blindtext}
\usepackage{mathtools}
\DeclareMathOperator{\sgn}{sgn}
\begin{document}
\begin{center}
\setlength{\tabcolsep}{1em}
\begin{tabular}{*{6}{c}}
Family 1 & Family 2 & Family 3\\
Particle & Mass & Particle & Mass & Particle & Mass\\
\hline
cell1 & & cell2 & & cell3 \\
\hline
cell4 && cell5 && cell6 \\
\hline
cell7 && cell8 && cell9 \\
\hline
\end{tabular}
\end{center}
\end{document}