1

Using the alignat environment (for my first time), I managed to make the following example:

enter image description here

The following code was used:

\usepackage{amsmath,amssymb}
\begin{document}

\begin{alignat*}{5}
        & -\infty && \quad\longleftarrow &&\quad t \quad&& \longrightarrow \quad&& \infty \\
        & e^{\alpha t} && \quad\longleftarrow && \quad\psi_\lambda^-(t)\quad && \longrightarrow \quad&& B_-(\lambda) e^{\alpha t} + A_-(\lambda) e^{-\alpha t} \\
        & A_+(\lambda) e^{\alpha t} + B_+(\lambda) e^{-\alpha t} && \quad\longleftarrow && \quad\psi_\lambda^+(t)\quad && \longrightarrow \quad&& e^{-\alpha t} 
\end{alignat*}

\end{document}

What I want to do is (i) align $t$ at the center and (ii) align $-\infty$ and $e^{\alpha t}$ at the right. How can I achieve this?

1
  • You need to understand the number of &'s and where to place them. Her you have 4(?) alignment points so you'll need 7 & per line (4 for alignment and 3 for separating the alignment columns). Remember that each alignment column is a left-hand & right-hand where the left-hand is right-aligned and right-hand is left aligned. So your first problem is solved by moving the first &.
    – daleif
    Commented Dec 6, 2022 at 11:33

3 Answers 3

1

An alternative solution is to use an array like this:

        
\begin{equation*}
\begin{array} {rcccl}
 -\infty & \quad\longleftarrow &\quad t \quad& \longrightarrow \quad& \infty \\
         e^{\alpha t} & \quad\longleftarrow & \quad\psi_\lambda^-(t)\quad & \longrightarrow \quad& B_-(\lambda) e^{\alpha t} + A_-(\lambda) e^{-\alpha t} \\
     A_+(\lambda) e^{\alpha t} + B_+(\lambda) e^{-\alpha t} & \quad\longleftarrow & \quad\psi_\lambda^+(t)\quad & \longrightarrow \quad& e^{-\alpha t} 
\end{array}
\end{equation*}

Result:

enter image description here

1

Something like this

\documentclass[a4paper]{article}
\usepackage{amsmath,amssymb}
\begin{document}

\begin{alignat*}{6}
  -\infty                                                & \quad & \longleftarrow & \quad & t              &     & \quad & \longrightarrow & \quad & \infty
 \\
  e^{\alpha t}                                           &       & \longleftarrow &       & \psi_\lambda^- & (t) &       & \longrightarrow &       & B_-(\lambda) e^{\alpha t} + A_-(\lambda)  e^{-\alpha t}
 \\
  A_+(\lambda) e^{\alpha t} + B_+(\lambda) e^{-\alpha t} &       & \longleftarrow &       & \psi_\lambda^+ & (t) &       & \longrightarrow &       & 
  e^{-\alpha t}
\end{alignat*}

\end{document}
1

You can use IEEEtrantools:

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage{IEEEtrantools}

\begin{document}

\begin{IEEEeqnarray*}{r C c C l}
 -\infty     & \longleftarrow & t                 & \longrightarrow & \infty \\
%
e^{\alpha t} & \longleftarrow & \psi_\lambda^-(t) & \longrightarrow &
   B_-(\lambda) e^{\alpha t} + A_-(\lambda) e^{-\alpha t} \\
%
A_+(\lambda) e^{\alpha t} + B_+(\lambda) e^{-\alpha t}
             & \longleftarrow & \psi_\lambda^+(t) & \longrightarrow & e^{-\alpha t}
\end{IEEEeqnarray*}

\end{document}

enter image description here

You must log in to answer this question.

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