4

I am using beamer for making slides. In one of my slides, equations appear in bullets. I would like the equations to be aligned. Since these appear in different bullets, I can't use the align option.

Here is my MWE

\documentclass{beamer}

\begin{document}
\begin{frame}
\frametitle{\color{blue}{Observations}}
\begin{itemize} 
    \item 1. This bullet has 3 sub-bullets
        \begin{itemize}
            \item Only Text
            \item Text and Equation1 
               \begin{equation}
               f^{r}(\cdot): \{0,1\}\rightarrow\mathbb{Q^r}
               \end{equation}
            \item Text and Equation2 
               \begin{equation}
                f^{c}(\cdot): \mathbb{Q^r}\rightarrow\mathbb{Q^c}
               \end{equation}
        \end{itemize} 
     \end{itemize}    
\end{frame}
\end{document}
  • 1
    You know that you can change the frametitle colour with \setbeamercolor{frametitle}{fg=blue,bg=white}? – user36296 Mar 30 '16 at 16:18
  • Thanks for suggesting this. One step towards making less cluttered code – NAASI Mar 30 '16 at 16:48
5

It's not a general fix because it allows only one align point (I chose to align around the : character, was that the desired point?), and the horizontal centering will be impacted, but if you\mathllap and \mathrlap the two portions around the align point, then you might get something satisfactory. (I also added \medskip to restore some of the lost vertical spacing)

If needed, leftward shift of such equations can be achieved by adding a fixed space after the \mathrlap{}.

\documentclass{beamer}
\usepackage{mathtools}
\begin{document}
\begin{frame}
\frametitle{\color{blue}{Observations}}
\begin{itemize} 
    \item 1. This bullet has 3 sub-bullets
        \begin{itemize}
            \item Only Text
            \item Text and Equation1 \medskip
               \begin{equation}
               \mathllap{f^{r}(\cdot):{}}\mathrlap{ \{0,1\}\rightarrow\mathbb{Q^r}}
               \end{equation}
            \item Text and Equation2 \medskip
               \begin{equation}
                \mathllap{f^{c}(\cdot):{}}\mathrlap{ \mathbb{Q^r}\rightarrow\mathbb{Q^c}}
               \end{equation}
        \end{itemize} 
     \end{itemize}    
\end{frame}
\end{document}

enter image description here

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.