[Tex/LaTex] Aligning multiple inequality symbols

alignalignatamsmath

I have a question about how to align multiple symbols for a set of inequalities to make it look clean. This is what I have at the moment:

\begin{align*}
|f(x)-f(a)| &< f(a) \\
-f(a) < f(x) - f(a) &< f(a) \\
-f(a) + f(a) < f(x) &< f(a) + f(a) \\
0 < f(x) &< 2f(a) \\
\implies f(x) &> 0.
\end{align*}

Which only aligns the right inequality signs with each other: enter image description here

What I would like to accomplish is similar to the result one might get when using the alignat environment. Ideally, I would like to essentially create 3 columns with the inequality signs acting as separators – but I would like the middle column to be center justified.

Also note that the top row only has one inequality sign – I would like that to be aligned with all the signs on the right. How might I go about accomplishing this?

Best Answer

Like this?

enter image description here

With use ow array it is simple:

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\[\setlength\arraycolsep{1pt}
    \begin{array}{rcccl}
                & ~ & f(x)-f(a)|  & < & f(a) \\
-f(a)           & < & f(x) - f(a) & < & f(a) \\
-f(a) + f(a)    & < & f(x)        & < & f(a) + f(a) \\
0               & < & f(x)        & < & 2f(a) \\
                & ~ &\implies f(x)& > & 0
    \end{array}
\]
\end{document}
Related Question