答案1
看看以下解决方案是否满足您的期望:
\documentclass[12pt]{article}
\usepackage[table]{xcolor} %to use direct sum symbol
\usepackage{mathtools} % <---
\usepackage{cellspace} % <---
\setlength\cellspacetoplimit{3pt} % <---
\setlength\cellspacebottomlimit{3pt}% <---
\begin{document}
\begin{center}
\rowcolors{2}{gray!25}{white}
\begin{tabular}{cSc}
1 & 7 \\
2 & \(
\begin{dcases} % <---
a & \quad b\\
c & \quad d
\end{dcases}\) \\
3 & 4
\end{tabular}
\end{center}
\end{document}