答案1
\documentclass{article}
\usepackage{tabularray}
\NewColumnType{C}{>{$}c<{$}}
\begin{document}
\begin{table}[h]
\caption{Table caption}
\begin{tblr}{colspec={l>{$}c<{$}}}
text & \alpha
\end{tblr}
\end{table}
\begin{table}[h]
\caption{Table caption}
\begin{tblr}{colspec={lC}}
text & \alpha
\end{tblr}
\end{table}
\end{document}
答案2
自 2021P 版本起,tabularray
包中有单元格/行/列的选项$
。$$
\documentclass{article}
\usepackage{amsmath}
\usepackage{tabularray}
\begin{document}
\begin{tblr}{colspec={lQ[c,$]Q[r,$$]},hlines}
text & \frac{1}{2} & -\frac{3}{4} \\
text & \frac{5}{6} & -\frac{7}{8}
\end{tblr}
\end{document}