我想对齐\angle
。有什么想法吗?
\begin{tabular}{|c|c|}
\hline
Frequency & S-Parameters $ (\mathrm{dB \ \angle \ deg}) $\\ \hline
4.2 GHz & $ \begin{pmatrix}
-11.04 \ \angle \ 59.12 & -0.44 \ \angle \ -12.20 \\
-0.44 \ \angle \ -12.20 & -10.15 \ \angle \ 96.15
\end{pmatrix} $ \\ \hline
4.6 GHz & $ \begin{pmatrix}
-13.44 \ \angle \ -29.33 & -0.26 \ \angle \ -36.23 \\
-0.26 \ \angle \ -36.23 & -13.96\ \angle \ 117.83
\end{pmatrix} $ \\ \hline
5.0 GHz & $ \begin{pmatrix}
-10.48 \ \angle \ -89.92 & -0.47 \ \angle \ -58.12 \\
-0.47 \ \angle \ -58.12 & -10.25 \ \angle \ 156.05
\end{pmatrix} $ \\ \hline
5.4 GHz & $ \begin{pmatrix}
-7.66 \ \angle \ -126.98 & -0.90 \ \angle \ -75.93 \\
-0.90 \ \angle \ -75.93 & -8.72 \ \angle \ 150.32
\end{pmatrix} $ \\ \hline
\end{tabular}
答案1
已编辑,以在每个上方和下方提供 3pt stackgap pmatrix
。
\documentclass{article}
\usepackage{amsmath,stackengine}
\stackMath
\def\Mangle{\mathbin{\angle}}
\begin{document}
\begin{tabular}{|c|c|}
\hline
Frequency & S-Parameters $ (\mathrm{dB \angle deg}) $\\ \hline
4.2 GHz & $ \addstackgap{\begin{pmatrix}\begin{aligned}
-11.04 &\Mangle 59.12 & -0.44 &\Mangle -12.20 \\
-0.44 &\Mangle -12.20 & -10.15 &\Mangle 96.15
\end{aligned}\end{pmatrix}} $ \\ \hline
4.6 GHz & $ \addstackgap{\begin{pmatrix}\begin{aligned}
-13.44 &\Mangle -29.33 & -0.26 &\Mangle -36.23 \\
-0.26 &\Mangle -36.23 & -13.96&\Mangle 117.83
\end{aligned}\end{pmatrix}} $ \\ \hline
5.0 GHz & $ \addstackgap{\begin{pmatrix}\begin{aligned}
-10.48 &\Mangle -89.92 & -0.47 &\Mangle -58.12 \\
-0.47 &\Mangle -58.12 & -10.25 &\Mangle 156.05
\end{aligned}\end{pmatrix}} $ \\ \hline
5.4 GHz & $ \addstackgap{\begin{pmatrix}\begin{aligned}
-7.66 &\Mangle -126.98 & -0.90 &\Mangle -75.93 \\
-0.90 &\Mangle -75.93 & -8.72 &\Mangle 150.32
\end{aligned}\end{pmatrix}} $ \\ \hline
\end{tabular}
\end{document}
答案2
您可以将对齐点加倍。我也偏爱steinmetz
这种工作,当然,booktabs
我推荐siunitx
单位。
\documentclass{article}
\usepackage{amsmath,booktabs,steinmetz,siunitx}
\newenvironment{phasematrix}[1]
{\left(\renewcommand{\arraystretch}{1.25}
\begin{array}{@{} *{#1}{r@{\,}l} @{}}}
{\end{array}\right)}
\begin{document}
\begin{tabular}{cc}
\toprule
Frequency & S-Parameters (\si{\dB}\phase{\mathrm{deg}}) \\
\midrule
\SI{4.2}{\GHz} &
$\begin{phasematrix}{2}
-11.04 & \phase{59.12} & -0.44 & \phase{-12.20} \\
-0.44 & \phase{-12.20} & -10.15 & \phase{96.15}
\end{phasematrix}$
\\\addlinespace
\SI{4.6}{\GHz} &
$\begin{phasematrix}{2}
-13.44 & \phase{-29.33} & - 0.26 & \phase{-36.23} \\
-0.26 & \phase{-36.23} & -13.96 & \phase{117.83}
\end{phasematrix}$
\\
\bottomrule
\end{tabular}
\end{document}
如果你不喜欢这个\phase
渲染,只需删除steinmetz
并添加
\newcommand{\phase}[1]{\ensuremath{\angle\mathopen{\,}#1}}
答案3
使用array
和cellspace
包装:
\documentclass{article}
\usepackage{amsmath,cellspace}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}
\begin{document}
\begin{tabular}{|c|Sc|}
\hline
Frequency & S-Parameters $(\mathrm{dB \angle deg})$\\
\hline
4.2 GHz & $\left(\begin{array}{r@{\,}l r@{\,}l}
-11.04 &\angle 59.12 & {-}0.44 &\angle -12.20 \\
-0.44 &\angle{-}12.20 & {-}10.15 &\angle 96.15
\end{array}\right)$ \\
\hline
4.6 GHz & $\left(\begin{array}{r@{\,}l r@{\,}l}
-13.44 &\angle{-}29.33 & {-} 0.26 &\angle -36.23 \\
-0.26 &\angle{-}36.23 & {-}13.96 &\angle 117.83
\end{array}\right)$ \\
\hline
5.0 GHz & $\left(\begin{array}{r@{\,}l r@{\,}l}
-10.48 &\angle{-}89.92 & {-} 0.47 &\angle -58.12 \\
- 0.47 &\angle{-}58.12 & {-}10.25 &\angle 156.05
\end{array}\right)$ \\
\hline
5.4 GHz & $\left(\begin{array}{r@{\,}l r@{\,}l}
-7.66 &\angle{-}126.98 & {-} 0.90 &\angle -75.93 \\
-0.90 &\angle{-} 75.93 & {-} 8.72 &\angle 150.32
\end{array}\right)$ \\
\hline
\end{tabular}
\end{document}
编辑:{-}
按照建议使用埃格尔(感谢您指出这一点)在他的评论中,这些数字现在可见为负数,而不是从中减去\angle
。