1

Everything I find only deals with = signs and not with \le and <.

$|f(x)-f(y)| = |f(x)-f_n(x)+f_n(x)-f_n(y)+f_n(y)-f(y)| 
             \le |f(x)-f_n(x)|+|f_n(x)-f_n(y)|+|f_n(y)-f(y)| 
             < \epsilon/3+\epsilon/3+\epsilon/3 
             = \epsilon$
  • Welcome to TeX.SX! What should be aligned to what? Please don't show only a code snippet. Always add a minimal but working example (MWE) from \documentclass down to \end{document} that illustrates your problem. And also describe your problem. Without it's hard to reproduce and understand the problem. Inline math ($$) is usually unaligned. Do you want displayed math with multiple lines? – Schweinebacke May 15 '17 at 16:20
  • 2
    note that texworks is unrelated to the problem, that is the editor you are using to write the tex, but it would be the same if you used any other editor. – David Carlisle May 15 '17 at 16:22
6

Everything you found explaining how to align equality signs works the same way for every other symbol, letter or number. Just put an & before the symbols that you want to align on. For your example:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
    \lvert f(x)-f(y)\rvert &= \lvert f(x)-f_n(x)+f_n(x)-f_n(y)+f_n(y)-f(y)\rvert \\
    &\le \lvert f(x)-f_n(x)\rvert+\lvert f_n(x)-f_n(y)\rvert+\lvert f_n(y)-f(y)\rvert \\
    &< \epsilon/3+\epsilon/3+\epsilon/3 \\
    &= \epsilon
\end{align*}

\end{document}

enter image description here

As a side note: Since you are using the vertical bar as a delimiter here, you might want to use \lvert and \rvert instead of |. See e.g. this question for a discussion.

  • 1
    In a case like this, I’d rather go for a split environment. Also, I’d use \lvert ... \rvert, or, perhaps, \bigl| ... \bigr|. – GuM May 15 '17 at 20:42

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.