# Does align environment (or an alternative) have an option to choose left, center or right alignment?

I have quite a long set of equations, written in an array environment, but I can't seem to get it to split so that it is spread over multiple pages. I could use the align environment, but I can't seem to find a left, center or right option, while I would like to use it as in the array environment: \begin{array}{llrcl} ... \end{array}. This is the LaTeX code:

$\begin{array}{llrcl} g_1=\dfrac{f_1}{\norm{f_1}}\\ h_2=f_2-(f_2,g_1)g_1, & g_2=\dfrac{h_2}{\norm{h_2}}, & (g_1,g_2) & = & \dfrac{(g_1,f_2-(f_2,g_1)g_1)}{\norm{h_2}}\\ &&& = & \dfrac{(f_2,g_1)-(f_2,g_1)(g_1,g_1)}{\norm{h_2}}\\ &&& = & 0\\ h_3^1=f_3-(f_3,g_1)g_1, & g_3^1=\dfrac{h_3^1}{\norm{h_3^1}}, & (g_1,g_3^1) & = & \dfrac{(g_1,f_3-(f_3,g_1)g_1)}{\norm{h_3^1}}\\ &&& = & \dfrac{(f_3,g_1)-(f_3,g_1)(g_1,g_1)}{\norm{h_3^1}}\\ &&& = & 0\\ h_3^2=g_3^1-(g_3^1,g_2)g_2, & g_3=g_3^2=\dfrac{h_3^2}{\norm{h_3^2}}, & (g_1,g_3^2) & = & \dfrac{(g_1,g_3^1-(g_3^1,g_2)g_2)}{\norm{h_3^2}}\\ &&& = & \dfrac{(g_1,g_3^1)-(g_2,g_3^1)(g_1,g_2)}{\norm{h_3^2}}\\ &&& = & 0\\ && (g_2,g_3^2) & = & \dfrac{(g_2,g_3^1-(g_3^1,g_2)g_2)}{\norm{h_3^2}}\\ &&& = & \dfrac{(g_2,g_3^1)-(g_2,g_3^1)(g_2,g_2)}{\norm{h_3^2}}\\ &&& = & 0\\ \vdots & \vdots & \vdots & \vdots & \vdots\\ h_j^1=f_j-(f_j,g_1)g_1, & g_j^1=\dfrac{h_j^1}{\norm{h_j^1}}, & (g_1,g_j^1) & = & \dfrac{(g_1,f_j-(f_j,g_1)g_1)}{\norm{h_j^1}}\\ &&& = & \dfrac{(f_j,g_1)-(f_j,g_1)(g_1,g_1)}{\norm{h_j^1}}\\ &&& = & 0\\ h_j^2=g_j^1-(g_j^1,g_2)g_2, & g_j^2=\dfrac{h_j^2}{\norm{h_j^2}}, & (g_1,g_j^2) & = & \dfrac{(g_1,g_j^1-(g_j^1,g_2)g_2)}{\norm{h_j^2}}\\ &&& = & \dfrac{(g_1,g_j^1)-(g_j^1,g_2)(g_1,g_2)}{\norm{h_j^2}}\\ &&& = & 0\\ && (g_2,g_j^2) & = & \dfrac{(g_2,g_j^1-(g_j^1,g_2)g_2)}{\norm{h_j^2}}\\ &&& = & \dfrac{(g_2,g_j^1)-(g_j^1,g_2)(g_2,g_2)}{\norm{h_j^2}}\\ &&& = & 0\\ \vdots & \vdots & \vdots & \vdots & \vdots\\ h_j^{j-1}=g_j^{j-2}-(g_j^{j-2},g_{j-1})g_{j-1}, & g_j=g_j^{j-1}=\dfrac{h_j^{j-1}}{\norm{h_j^{j-1}}}, & (g_k,g_j) & = & \dfrac{(g_k,g_j^{j-2}-(g_j^{j-2},g_{j-1})g_{j-1})}{\norm{h_j^{j-1}}}\\ &&& = & \dfrac{\!\!\!\!\!\overbrace{(g_k,g_j^{j-2})}^{\delta_{k,j-1}(g_k,g_j^{j-2})}\!\!\!\!\!-(g_j^{j-2}\!\!\!\!\!,g_{j-1})\overbrace{(g_k,g_{j-1})}^{=\delta_{k,j-1}}}{\norm{h_j^{j-1}}}\\ &&& = & 0 \end{array}$


where \norm{...} stems from the custom command

\newcommand{\norm}[1]{\ensuremath{\left|\left|{#1}\right|\right|}} % General norm.

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  Corentin Mar 28 '13 at 9:43
Please complete your code snippet into a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  hpesoj626 Mar 28 '13 at 10:26

You can use align*, which allows breaks by adding \displaybreak before an ending \\. For the third column, though, it's better to use an inner aligned environment, so those parts won't be broken across pages.

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

% this is much better for defining \norm
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

\begin{document}
\begin{align*}
g_1&=\dfrac{f_1}{\norm{f_1}}
\\
h_2&=f_2-(f_2,g_1)g_1,
& g_2&=\dfrac{h_2}{\norm{h_2}},
&& \!\begin{aligned}[t]
(g_1,g_2)
&= \dfrac{(g_1,f_2-(f_2,g_1)g_1)}{\norm{h_2}} \\
&= \dfrac{(f_2,g_1)-(f_2,g_1)(g_1,g_1)}{\norm{h_2}}\\
&= 0
\end{aligned}
\\
h_3^1&=f_3-(f_3,g_1)g_1,
& g_3^1&=\dfrac{h_3^1}{\norm{h_3^1}},
&& \!\begin{aligned}[t]
(g_1,g_3^1)
&= \dfrac{(g_1,f_3-(f_3,g_1)g_1)}{\norm{h_3^1}}\\
&= \dfrac{(f_3,g_1)-(f_3,g_1)(g_1,g_1)}{\norm{h_3^1}}\\
&= 0
\end{aligned}
\\
h_3^2&=g_3^1-(g_3^1,g_2)g_2,
& g_3&=g_3^2=\dfrac{h_3^2}{\norm{h_3^2}},
&& \!\begin{aligned}[t]
(g_1,g_3^2)
&= \dfrac{(g_1,g_3^1-(g_3^1,g_2)g_2)}{\norm{h_3^2}}\\
&= \dfrac{(g_1,g_3^1)-(g_2,g_3^1)(g_1,g_2)}{\norm{h_3^2}}\\
&= 0
\end{aligned}
\end{align*}
\end{document}


-
Works great! Still have to figure out how the left/center/right things works with the align* environment, though. Thanks a lot! –  Adriaan Mar 31 '13 at 13:13