1

I have done plenty of research, and I haven't found a solution that suits what I'm looking for (this closed question by needs for clarity is what I'm looking for). I want to center-align multiple steps of a math solving equation aligned by their first character. Something like:

\begin{frame}{Convergence [Lecture 2.5]}

    Law of Large Numbers (LLN)

\[ & \text{If } X_1, X_2, .., X_n \text{ are } \iid \text{ and } E[X_i]=\mu \text{ then:}     \\
 & \overline{X}_n=\frac{1}{n}\sum_{i=1}^{n}X_i \\
 & \overline{X}_n \xrightarrow{d} \mu \text{ (strong LLN)}
 & \overline{X}_n \xrightarrow{P} \mu \text{ (weak LLN)}\]

\end{frame}

Where this equation as a whole is centered but aligned to &. I was using $$ but I found that wasn't a good practice as it was deprecated. Also, I found that [\\..\\] was a good practice to write equations so I'm using that form, and I'm trying to find a way to use it with & to align (example), but it seems to only work with \begin{align} where I prefer to use [\\..\\] because is more compact. Another way I tried is using [\\..\\] for each line of the equation, but it seems illogic the alineation would work as they are separated "displays of equations".

Any suggestions?

PS: I'm aiming to write latex following efficient good practices, if you find something in my equation that should be better or more efficient, please feel free to post with the answer to the problem.

3
  • While \[ ...\] is "more compact", as you put it, than \begin{align*}...\end{align*}, it does not allow you to use & symbols to perform an alignment of the type you appear to envisage.
    – Mico
    Jun 19 at 7:27
  • you can't "prefer \[ "as that is for single lined equations. You can have a mult-lined construct within it such as a matrix or \begin{aligned} but \\ at the top level in \[ is simply user error. Jun 19 at 8:32
  • 2
    also since you ask about good practice never leave a blank line in the source before a displayed equation, it generates a spurious white paragraph above it. Jun 19 at 8:34
2

Something like this?

enter image description here

Observe that I wouldn't make the definition of the sample mean part of the result of the theorem itself. Using alignat* instead of align* makes it easier to fine-tune the distance between the math statements on the left and the explanatory material on the left, while providing a second alignment point within each row.

\documentclass{beamer}
\DeclareMathOperator{\E}{E} % expectations operator
\begin{document}

\begin{frame}[t]{Convergence [Lecture 2.5]}
\begin{theorem}[Laws of Large Numbers, LLNs]

Assume that  $X_1, X_2, \dots, X_n$ are iid and that $\E[X]=\mu$. 

Put $\overline{X}_n=\frac{1}{n}\sum_{i=1}^{n}X_i$. Then
\begin{alignat*}{2}
   &\overline{X}_n \xrightarrow{d} \mu &\qquad&\textup{strong LLN}\\
   &\overline{X}_n \xrightarrow{P} \mu &&      \textup{weak LLN}
\end{alignat*}
\end{theorem}
\end{frame}

\end{document}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.