我正在尝试让以下内容发挥作用
梅威瑟:
\documentclass{article}
\usepackage{tabularray}
\usepackage{mathtools}
\newcommand*{\tn}[1]{\textnormal{#1}}
\newcommand*{\Utevolv}{\ensuremath{\hat{\mathcal{U}}}}
\newcommand*{\imag}{\mathrm{i}}
% ------------ braket --------------
% mathtools als Voraussetzung.
\DeclarePairedDelimiter\bra{\langle}{\rvert}
\DeclarePairedDelimiter\ket{\lvert}{\rangle}
\DeclarePairedDelimiterX\braketzw[2]{\langle}{\rangle}%
{#1\,\delimsize\vert\,\mathopen{}#2}
\DeclarePairedDelimiterX\braketdr[3]{\langle}{\rangle}%
{#1\,\delimsize\vert\,\mathopen{}#2\,\delimsize\vert\,\mathopen{}#3}
\begin{document}
\begin{tblr}{%
colspec = {@{}Q[t]Q[t]@{}},%
column{2} = {mode=dmath}
}
General ansatz: & \ket{\Psi(t)} = \sum_n c_n(t) \ket{n} \\ \\
Amplitude $c_k(t)$ & \begin{aligned} %
c_k(t) = \braketzw{k}{\Psi(t)} & = \braketdr{k}{\Utevolv(t,t_0)}{\Psi(t_0)} \\
& = \braketdr{k}{\Utevolv_0(t,t_0)\, \Utevolv_\tn{I}(t,t_0)}{\Psi(t_0)} \\
& = \exp \left[ - \frac{\imag E_k t}{\hbar} \right] \braketdr{k}{\Utevolv_\tn{I}(t,t_0)}{\Psi(t_0)}
\end{aligned} \\
\end{tblr}
\end{document}
我希望得到一个顶部对齐的列,但aligned
环境和t
fortabularray
似乎不兼容。任何帮助都将不胜感激。
答案1
感谢@UlrikeFischer 和@leandriis。
我没有意识到环境aligned
提供了可选参数用于环境本身的对齐。
修复了:
... \begin{aligned}[t] ...
完整工作示例:
\documentclass{article}
\usepackage{tabularray}
\usepackage{mathtools}
\newcommand*{\tn}[1]{\textnormal{#1}}
\newcommand*{\Utevolv}{\ensuremath{\hat{\mathcal{U}}}}
\newcommand*{\imag}{\mathrm{i}}
% ------------ braket --------------
% mathtools als Voraussetzung.
\DeclarePairedDelimiter\bra{\langle}{\rvert}
\DeclarePairedDelimiter\ket{\lvert}{\rangle}
\DeclarePairedDelimiterX\braketzw[2]{\langle}{\rangle}%
{#1\,\delimsize\vert\,\mathopen{}#2}
\DeclarePairedDelimiterX\braketdr[3]{\langle}{\rangle}%
{#1\,\delimsize\vert\,\mathopen{}#2\,\delimsize\vert\,\mathopen{}#3}
\begin{document}
\begin{tblr}{%
colspec = {@{}Q[t]Q[t]@{}},%
column{2} = {mode=dmath}
}
General ansatz: & \ket{\Psi(t)} = \sum_n c_n(t) \ket{n} \\ \\
Amplitude $c_k(t)$ & \begin{aligned}[t] %
c_k(t) = \braketzw{k}{\Psi(t)} & = \braketdr{k}{\Utevolv(t,t_0)}{\Psi(t_0)} \\
& = \braketdr{k}{\Utevolv_0(t,t_0)\, \Utevolv_\tn{I}(t,t_0)}{\Psi(t_0)} \\
& = \exp \left[ - \frac{\imag E_k t}{\hbar} \right] \braketdr{k}{\Utevolv_\tn{I}(t,t_0)}{\Psi(t_0)}
\end{aligned} \\
\end{tblr}
\end{document}