3

Let's say I have multiple lines of math symbols from which I want to create a kind of "waterfall aligning, i.e. At any given line, the proceeding line will start at the (horizontal) position of end of the current line.

I have attempted to do it with the align environment (using & and &&) but it does not work

\begin{align}
F: \mathcal{A} \to & \mathcal{B} \\
 & f: && C \to D\\
&& c \mapsto f(c):= \sum ...
\end{align}

Any ideas on how I can do this properly?

2
  • Like the main diagonal of a matrix? Then matrix environment, or more generally the array env, is an option. Apr 30 at 10:10
  • I don't think one can do that properly (in the sense that, I cannot see an example where this is a good solution). I might be wrong, though.
    – mickep
    Apr 30 at 12:11

1 Answer 1

6

You can use alignat:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{alignat}{2}
F\colon \mathcal{A} \to \mathcal{B} \\
& f\colon  C \to D \\
&& c \mapsto f(c) = \sum ...
\end{alignat}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.