Take the 2-minute tour ×
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.

I have an align like this:

\begin{align*}
\sigma &= \sqrt{\sum_x \left[ (x-\mu_x)^2\mathbf{f}(x) \right] } = \sqrt{\frac{1}{10}\sum_x (x-\mu_x)^2 } \\
 &= \sqrt{\frac{1}{10}(
    (0-.45)^2 + (1-.45)^2 + (2-.45)^2 + (3-.45)^2 + (4-.45)^2 +
     (5-.45)^2 + (6-.45)^2 + (7-.45)^2 + (8-.45)^2 + (9-.45)^2 } \\
 &= \sqrt{24.6525}
\end{align*}

However, this goes off the edge of the page. I wanted to create a multiline inside the middle square root symbol, so I tried this:

\begin{align*}
\sigma &= \sqrt{\sum_x \left[ (x-\mu_x)^2\mathbf{f}(x) \right] } = \sqrt{\frac{1}{10}\sum_x (x-\mu_x)^2 } \\
 &= \sqrt{\frac{1}{10}(
    \begin{split} (0-.45)^2 + (1-.45)^2 + (2-.45)^2 + (3-.45)^2 + (4-.45)^2 + \\
     (5-.45)^2 + (6-.45)^2 + (7-.45)^2 + (8-.45)^2 + (9-.45)^2 } \end{split} \\
 &= \sqrt{24.6525}
\end{align*}

but this gives me errors about mismatched curly braces.

Ideally, I would have something exactly like \frac, except which did not draw the horizontal line between it's operands.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can use something like:

\sqrt{\frac{1}{10}
\begin{aligned}
  ( & (0-.45)^2 + (1-.45)^2 + (2-.45)^2 + (3-.45)^2 + (4-.45)^2 +\\
   & (5-.45)^2 + (6-.45)^2 + (7-.45)^2 + (8-.45)^2 + (9-.45)^2 ) 
\end{aligned}
}

This works just like align but is only usable inside math mode.

There's also gathered which works like gather.

share|improve this answer
    
Exactly what I was looking for. Thank you very much :) –  Billy ONeal Sep 21 '10 at 0:00

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.