4

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:

Inline align* environment

| improve this question | | | | |
3

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}.

| improve this answer | | | | |
13

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.

enter image description here

| improve this answer | | | | |
  • This is a better solution. – user94293 Sep 10 '16 at 20:42
1

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}

enter image description here

| improve this answer | | | | |

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.