[texhax] Math Formatting Question
Barbara Beeton
bnb at ams.org
Wed Aug 9 14:49:59 CEST 2006
On Tue, 8 Aug 2006, Aditya Mahajan wrote:
On Tue, 8 Aug 2006, Zachary Leung wrote:
> Hi guys,
>
> How do I format text like the following (see JPEG file)? The align
> environment doesn't get things right for me.
>
> http://deutsixfive.googlepages.com/latex-math-formatting-1.jpg
>
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather*}
\frac {a_0}{2} + \sum_{n=1}^{\infty} a_n \cos nx
+ \sum_{n=1}^{\infty} b_n \cos nx \\
\begin{aligned}
\text{where}\quad a_n &= \frac {1}{\pi} \int_{-\infty}^{\infty}
f(x) \cos nx dx \\
b_n &= \frac {1}{\pi} \int_{-\infty}^{\infty}
f(x) \sin nx dx
\end{aligned}
\end{gather*}
or
\begin{equation*}
\frac {a_0}{2} + \sum_{n=1}^{\infty} a_n \cos nx
+ \sum_{n=1}^{\infty} b_n \cos nx
\end{equation*}
\begin{align*}
\text{where}\quad a_n &= \frac {1}{\pi} \int_{-\infty}^{\infty}
f(x) \cos nx dx \\
b_n &= \frac {1}{\pi} \int_{-\infty}^{\infty}
f(x) \sin nx dx
\end{align*}
\end{document}
this is a bad idea -- everything should go into a
single multi-line math environment, because the
vertical spacing between two such environments
can't be controlled very well for page breaks or
amount of spacing. putting everything into
a {gather*} or {multline*} environment is much
more reliable.
Have a look at Herbert Voss mathmode.pdf
ftp://tug.ctan.org/pub/tex-archive/info/math/voss/mathmode/Mathmode.pdf
Aditya
More information about the texhax
mailing list