A way to define an operator would be that of writing double align
, namely
\begin{align*}
f \colon A & \longrightarrow B, \\
a & \longrightarrow f(a),
\end{align*}
as first, and then specify
\begin{align*}
f(a) \colon C & \longrightarrow D, \\
c & \longmapsto a \cdot c.
\end{align*}
What I would like to do is merging the two alignments in f(a)
keeping the arrows aligned with each other.
I went with alignat
as follows
\begin{alignat*}{2}
f \colon A &\longrightarrow B & \\
a & \longmapsto f(a)\colon C & \longrightarrow D \\
& c & \longmapsto a\cdot c.
\end{alignat*}
which outputs
I tried to move around all of the &
, but any of the adjustments seemed to fix the alignments, nor spacings.
Any help would be appreciated.