# How to use Inline align*

In beamer slides, I want to save space so I want to place the align* environment next to the text as in the following illustration:

You can use array. The [t] option indicates that the array should be top-aligned. The {} before the = ensure that the spacing around the = is correct.

\documentclass{beamer}

\begin{document}

\begin{frame}
\begin{itemize}
\item One has $\begin{array}[t]{@{}r@{}l@{}} A &{}= \displaystyle\sum_{i=1}^\infty a_i\,x^i\\ &{}= \displaystyle\sum_{i=1}^\infty a_i\,x^i \end{array}$
\end{itemize}
\end{frame}

\end{document}


P.S. Instead of adding @{}, another option is to define \setlength{\arraycolsep}{0pt}.

I would recommend the aligned environment instead of align* for this case, using [t] for the alignment as in the array example:

\documentclass{beamer}

\begin{document}
\begin{frame}
\begin{itemize}
\item One has
\begin{aligned}[t] A &= \displaystyle\sum_{i=1}^\infty a_i x^i\\ &= \displaystyle\sum_{i=1}^\infty a_i x^i \end{aligned}
\end{itemize}
\end{frame}
\end{document}


Using aligned has a more convenient input syntax that works just like align and friends, and has better spacing between lines than the array method, with no need for manual spacing tweaks.

• This is a better solution. – user94293 Sep 10 '16 at 20:42

Don't use this, https://tex.stackexchange.com/a/328968/36296 is a much cleaner solution.

If you want to keep the align* for some reason or another, you can fake being inline by adding a negative space. Depending on font size etc. you will have to adjust the value manually.

\documentclass{beamer}

\begin{document}
\begin{frame}
\begin{itemize}
\item One has
\vspace*{-1.05cm}
\begin{align*}
A &= \displaystyle\sum_{i=1}^\infty a_i x^i\\
&= \displaystyle\sum_{i=1}^\infty a_i x^i
\end{align*}
\end{itemize}
\end{frame}
\end{document}