TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In answering this question, I recommended some changes to the OP and provided the following code:

\documentclass[12pt]{article}
\pagestyle{plain}
\usepackage[margin=1.8cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\[
  \begin{aligned}
    |f_{n}&(x)g_{n}(x) - f_{n}(x)g(x) + f_{n}(x)g(x) - f(x)g(x)| \\
    &\leq |f_{n}(x)g_{n}(x) - f_{n}(x)g(x)| + |f_{n}(x)g(x) -
    f(x)g(x)| \\
    &= |f_{n}(x)||g_{n}(x) - g(x)| + |g(x)||f_{n}(x) - f(x)| \\
    &\leq M_{1}\epsilon + M_{2}\epsilon \\
    &= \epsilon(M_1+M_2) \longrightarrow 0 \text{ as } n \to \infty
  \end{aligned}      
\]

\end{document}

Which produces

enter image description here

What I really wanted to do, though, is follow the advice of 3.3.5c of Mathematics Into Type, which recommends breaking at conjunctions and aligning with two-em quad from the left.

That I think is possibly open to interpretation, but what I would like is to have:

|f_{n}&(x)g_{n}(x) - f_{n}(x)g(x) + f_{n}(x)g(x) - f(x)g(x)|

On one line, a line break and all subsequent lines indented by a two-em quad and aligned. In other words, I want what I have, but with a precisely two-em quad indentation:

enter image description here

Unfortunately, the above is the closest I've been able to come. I tried:

\begin{align*}
  |f_{n}(x)g_{n}(x) - f_{n}(x)g(x) + f_{n}(x)g(x) - f(x)g(x)| \\
  \qquad &\leq |f_{n}(x)g_{n}(x) - f_{n}(x)g(x)| + |f_{n}(x)g(x) -
  f(x)g(x)| \\
  &= |f_{n}(x)||g_{n}(x) - g(x)| + |g(x)||f_{n}(x) - f(x)| \\
  &\leq M_{1}\epsilon + M_{2}\epsilon \\
  &= \epsilon(M_1+M_2) \longrightarrow 0 \text{ as } n \to \infty
\end{align*}

But that doesn't work at all:

enter image description here

share|improve this question
    
Do you want the (in)equality signs below (x)? – Sigur Feb 18 at 1:14
    
@Sigur Ah, sorry if I haven't explained myself properly. What I want is the (in)equality signs aligned with each other and indented exactly two-em quad from the start of the equation. Any equation, in fact. My hack - the best I could do - puts the signs more or less below (x) but what I'm aiming for is precisely two-em quad from the leftmost end of the equation. This was just an example. It looks alright this time, but in the next inequality, I may not be able to find a good spot to align and it may not be in the same place. I'm after a way to make the indentation two-em quad every time. – Au101 Feb 18 at 1:19
    
1  
He he, that exact picture (with the two lines) was exactly why \MoveEqLeft was added to mathtools as described below. I got a version of the image from Mathematics into type published by the AMS. – daleif Feb 18 at 12:02
up vote 9 down vote accepted

The mathtools provides the \MoveEqLeft function which achieves exactly what you want. By default, it indents subsequent lines by 2em and it can be further customized with \MoveEqLeft[<number>] which will indent subsequent line by <number> ems:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}

\begin{document}
\begin{align}
  \MoveEqLeft |f_{n}(x)g_{n}(x) - f_{n}(x)g(x) + f_{n}(x)g(x) - f(x)g(x)| \\
  &\leq |f_{n}(x)g_{n}(x) - f_{n}(x)g(x)| + |f_{n}(x)g(x) - f(x)g(x)| \\
  &= |f_{n}(x)||g_{n}(x) - g(x)| + |g(x)||f_{n}(x) - f(x)| \\
  &\leq M_{1}\epsilon + M_{2}\epsilon \\
  &= \epsilon(M_1+M_2) \longrightarrow 0 \text{ as } n \to \infty
\end{align}      
\begin{align}
  \MoveEqLeft[4] |f_{n}(x)g_{n}(x) - f_{n}(x)g(x) + f_{n}(x)g(x) - f(x)g(x)| \\
  &\leq |f_{n}(x)g_{n}(x) - f_{n}(x)g(x)| + |f_{n}(x)g(x) - f(x)g(x)| \\
  &= |f_{n}(x)||g_{n}(x) - g(x)| + |g(x)||f_{n}(x) - f(x)| \\
  &\leq M_{1}\epsilon + M_{2}\epsilon \\
  &= \epsilon(M_1+M_2) \longrightarrow 0 \text{ as } n \to \infty
\end{align}      
\end{document}

output

share|improve this answer
    
The mathtools package loads amsmath automatically -- thus, no need to load amsmath explicitly. – Mico Feb 18 at 10:43
    
@Mico I'm aware that mathtools loads amsmath, but I still prefer to load amsmath because a lot of IDEs read the usepackage declarations in order to load the appropriate commands and environments. – JP-Ellis Feb 19 at 0:28

Is this what you want?

\begin{align*}
  &|f_{n}(x)g_{n}(x) - f_{n}(x)g(x) + f_{n}(x)g(x) - f(x)g(x)| \\
  &\qquad \leq |f_{n}(x)g_{n}(x) - f_{n}(x)g(x)| + |f_{n}(x)g(x) - f(x)g(x)| \\
  &\qquad = |f_{n}(x)||g_{n}(x) - g(x)| + |g(x)||f_{n}(x) - f(x)| \\
  &\qquad \leq M_{1}\epsilon + M_{2}\epsilon \\
  &\qquad = \epsilon(M_1+M_2) \longrightarrow 0 \text{ as } n \to \infty
\end{align*}

enter image description here

share|improve this answer
    
Yes! That's exactly the right output, thank you :) Obviously this approach has the downside of an inelegant input, but that's certainly what I wanted to produce :) – Au101 Feb 18 at 1:24
    
@Au101, see the elegant answer by JP-Ellis. – Sigur Feb 18 at 1:25
1  
Yes indeed, he will most likely get the tick, but I wanted to thank you for bearing with me and let you know you'd definitely understood my question :) – Au101 Feb 18 at 1:26

If you use mathenv of the mdwtools collection, you can use the enhanced {eqnarray} environment. It takes optional column specifiers:

  • r, c, l for right-justified, centered, and left-justified math;
  • L for left-justified math that is considered to have width 2em;
  • and more (read the documentation) so you can completely emulate the functionality of amsmath environments like {align} and others.

Here, you'd use

\documentclass{article}
\usepackage{amstext}
\usepackage{mathenv}

\begin{document}
\begin{eqnarray*}[Ll]
|f_{n}(x)g_{n}(x) - f_{n}(x)g(x) + f_{n}(x)g(x) - f(x)g(x)| \\
&\leq |f_{n}(x)g_{n}(x) - f_{n}(x)g(x)| + |f_{n}(x)g(x) -
f(x)g(x)| \\
&= |f_{n}(x)||g_{n}(x) - g(x)| + |g(x)||f_{n}(x) - f(x)| \\
&\leq M_{1}\epsilon + M_{2}\epsilon \\
&= \epsilon(M_1+M_2) \longrightarrow 0 \text{ as } n \to \infty
\end{eqnarray*}
\end{document}

mathenv eqnarray L demo

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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