1

I am trying to get the following to work

MWE:

\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}

Output: enter image description here

Wanted output: enter image description here

I was hoping to get a top-aligned column, but the aligned environment and the t for tabularray seem to be not compatible. Any help would be appreciated.

3
  • Did you already try \begin{aligned}[t]?
    – leandriis
    Jun 3, 2023 at 14:01
  • \begin{aligned}[t] Jun 3, 2023 at 14:01
  • @UlrikeFischer and @leandriis Thank you very much! This fixed the problem… I did not know that aligned takes an optinal argument with [t]. Jun 3, 2023 at 14:04

1 Answer 1

0

Thanks to @UlrikeFischer and @leandriis.

I was not aware of the fact, that the aligned environment provides an optional argument for alignment of the env itself.

Fixed it with:

... \begin{aligned}[t] ... 

Fully working example:

\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .