0

I have following two equations which I want to align following two equations (equality signs have to match), without losing their enumeration:

\documentclass[a4paper,12pt]{report}
\usepackage{algorithm}
\usepackage{caption}
\usepackage{amsmath}

\begin{equation}
\hat{C}_{i,n-i+2} & = C_{i,n-i+1}\hat{f}_{n-i+2} \hspace{6mm} 2 \leq i \leq n 
\end{equation}

\begin{equation}
\hat{C}_{i,k} & = \hat{C}_{i,k-1}\hat{f}_k
\end{equation}

\end{document}

I tried align* and split* but his does not seem to do the job. Any ideas?

1
  • There is a missing \begin{document} statement ;-)
    – user31729
    Apr 7, 2015 at 7:49

2 Answers 2

1

align* is not 'enumerated' (i.e. numbered), but align uses equation numbers.

The horizontal alignment can be achieved using additional & characters.

\documentclass[a4paper,12pt]{report}
\usepackage{algorithm}
\usepackage{caption}
\usepackage{amsmath}

\begin{document}
\begin{align}
\hat{C}_{i,n-i+2} & = C_{i,n-i+1}\hat{f}_{n-i+2} & 2 \leq i \leq n  \\
\hat{C}_{i,k} & = \hat{C}_{i,k-1}\hat{f}_k
\end{align}

\end{document}

enter image description here

1

For n groups of equations, you need 2n –1 ampersands: one for each alignment point, and one for introducing the next group, except the first:

\documentclass[a4paper,12pt]{report}
\usepackage{algorithm}
\usepackage{caption}
\usepackage{amsmath}

\begin{document}

\begin{align*}
\hat{C}_{i,n-i+2} & = C_{i,n-i+1}\hat{f}_{n-i+2} \hspace{6mm} 2 \leq i \leq n &
\hat{C}_{i,k} & = \hat{C}_{i,k-1}\hat{f}_k\\
\hat{C}_{i,n-i+2} & = C_{i,n-i+1}\hat{f}_{n-i+2} \hspace{6mm} 2 \leq i \leq n & \hat{C}_{i,k} & = \hat{C}_{i,k-1}\hat{f}_k
\end{align*}

\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .