85

I can't seem to center equations without causing some weird formatting problem. The following results in the R being dropped:

\begin{center}
 E(R_{i,t})=E(\alpha_i)+E(\beta_{i,F_1 } F_{1,t})+E(\beta_{i,F_2 } F_{2,t})+\ldots+E(\beta_{i,F_m } F_{m,t})\linebreak
\bar{R}_{i,t}=a+\hat{\beta}_{i,F_1 } E(F_{1,t})+\hat{\beta}_{i,F_2 } E(F_{2,t})+\ldots+\hat{\beta}_{i,F_m } E(F_{m,t})\linebreak
\bar{R}_{i,t}=a+\gamma_1\hat{\beta}_{i,F_1 } +\gamma_2\hat{\beta}_{i,F_2 } F_{2,t}+\ldots+\gamma_m\hat{\beta}_{i,F_m }
\end{center}

Any ideas? Is {center} the wrong thing to use?

1
  • 6
    Equations in displayed math environments are centered by default, See, e.g., \[ 2+2=4 \]. Are you using the fleqn option to your document class? Please edit your question to show a complete minimal document. Besides document class options, it's isn't clear what math environment the above occurs in (if any!) But, yes \begin{center} ... \end{center} is definitely the wrong thing to use.
    – frabjous
    Jan 7, 2011 at 3:46

2 Answers 2

129

For a series of centered equations use the gather environment of amsmath:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather*}
 E(R_{i,t})=E(\alpha_i)+E(\beta_{i,F_1 } F_{1,t})+E(\beta_{i,F_2 } F_{2,t})+
    \ldots+E(\beta_{i,F_m } F_{m,t})\\
\bar{R}_{i,t}=a+\hat{\beta}_{i,F_1 } E(F_{1,t})+\hat{\beta}_{i,F_2 } E(F_{2,t})+
    \ldots+\hat{\beta}_{i,F_m } E(F_{m,t})\\
 \bar{R}_{i,t}=a+\gamma_1\hat{\beta}_{i,F_1 } +\gamma_2\hat{\beta}_{i,F_2 } F_{2,t}+
    \ldots+\gamma_m\hat{\beta}_{i,F_m }
\end{gather*} 
\end{document}

alt text

Instead of centering you may consider to align all equations at the equal sign and center the whole multiline environment. For this, use the align or align* environment, see the amsmath user's guide (or type texdoc amsldoc at the command prompt).

In any case, use amsmath. That package provides many kinds of multiline diplayed formula environments.

6
  • how do I have single equation number exactly in the middle? I don't want to use `\nonumber'
    – John Smith
    Jan 7, 2013 at 2:48
  • @JohnSmith Use an equation environment, within that use an aligned or split environment.
    – Stefan Kottwitz
    Jan 7, 2013 at 6:56
  • 1
    I tried that before but with aligned or split within equation environment the equations are aligned to the right. I want centering+single equation number. Any ideas?
    – John Smith
    Jan 7, 2013 at 8:29
  • 5
    @JohnSmith With aligned or split use & for marking an alignment position (relation symbol). For centering, use gathered within equation.
    – Stefan Kottwitz
    Jan 7, 2013 at 9:20
  • 1
    Gathered and upvoted ;) Mar 30, 2022 at 10:11
59

The center environment is for text, not math. What you want here is (this also lines up the equals signs):

\begin{align*}
  E(R_{i,t})    &= E(\alpha_i)+E(\beta_{i,F_1 } F_{1,t})+E(\beta_{i,F_2 } F_{2,t})+\ldots+E(\beta_{i,F_m } F_{m,t}) \\
  \bar{R}_{i,t} &= a+\hat{\beta}_{i,F_1 } E(F_{1,t})+\hat{\beta}_{i,F_2 } E(F_{2,t})+\ldots+\hat{\beta}_{i,F_m } E(F_{m,t}) \\
  \bar{R}_{i,t} &= a+\gamma_1\hat{\beta}_{i,F_1 } +\gamma_2\hat{\beta}_{i,F_2 } F_{2,t}+\ldots+\gamma_m\hat{\beta}_{i,F_m }
\end{align*}

You need the amsmath package for align*, so make sure you have the line \usepackage{amsmath} in your preamble (before \begin{document}).

1
  • Great Sophie! I didn't consider this point of view till I see this answer.
    – Mikasa
    Jun 11, 2021 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy