## LaTeX forum ⇒ Presentations and Posters ⇒ Problem with mathematicals environment and Beamer Topic is solved

Beamer, Powerdot and KOMA-Script presentations, Conference posters (a0poster, baposter, tikzposter)
Mojert
Posts: 2
Joined: Mon Dec 05, 2016 7:27 pm

### Problem with mathematicals environment and Beamer

Hello everyone !

I'm doing a presentation for my school and have an issue. Here is my code:
\documentclass[10pt]{beamer}\usetheme{Warsaw} \usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\usepackage[french]{babel}\usepackage{graphicx}\usepackage{lmodern}\usepackage{siunitx}\usepackage{amsmath}\usepackage{amssymb}\usepackage{mathrsfs} \begin{document}\begin{frame}	\frametitle{Centre of mass}	\begin{columns}[c]		\begin{column}{.5\textwidth}			\includegraphics[width=\textwidth]{Images/05-12.jpg}		\end{column}		\begin{column}{.5\textwidth}			\begin{align*}				\vec{r}_{CM} &= \frac{m_1 \vec{r}_1 + m_2 \vec{r}_2 + \dots + m_n \vec{r}_n}{m_1 + m_2 + \dots + m_n} \\ 				CM_x &= \frac{m_1 x_1 + m_2 x_2 + \dots + m_n x_n}{m_1 + m_2 + \dots + m_n}			\end{align*}		\end{column}	\end{columns}\end{frame}\end{document}

Pdflatex returns me those error messages:
! Paragraph ended before \align* was complete.
\par
l.167 \end{frame}

I suspect you've forgotten a }', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

! Missing $inserted. <inserted text>$
l.167 \end{frame}

I've inserted a begin-math/end-math symbol since I think
you left one out. Proceed, with fingers crossed.

! Missing \endgroup inserted.
<inserted text>
\endgroup
l.167 \end{frame}

I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing 2' now; then
my insertion and my current dilemma will both disappear.

! Display math should end with $$. <to be read again> \par l.167 \end{frame} The ' that I just saw supposedly matches a previous $$'.
So I shall assume that you typed ' both times. ! Missing  inserted. <inserted text>  l.167 \end{frame} I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed. ! Misplaced alignment tab character &. \beamer@doifinframe ...\dots + m_n} \\ \par CM_x & = \frac {m_1 x_1 + m_2 x_2... l.167 \end{frame} I can't figure out why you would want to use a tab mark here. If you just want an ampersand, the remedy is simple: Just type I\&' now. But if some right brace up above has ended a previous alignment prematurely, you're probably due for more error messages, and you might try typing S' now just to see what is salvageable. ! Misplaced \cr. \math@cr@@@ ->\cr l.167 \end{frame} I can't figure out why you would want to use a tab mark or \cr or \span just now. If something like a right brace up above has ended a previous alignment prematurely, you're probably due for more error messages, and you might try typing S' now just to see what is salvageable. ! Misplaced \noalign. \math@cr@@ ... \iffalse }\fi \math@cr@@@ \noalign {\vskip #1\relax } l.167 \end{frame} I expect to see \noalign only after the \cr of an alignment. Proceed, and I'll ignore this case. ! Missing  inserted. <inserted text>  l.167 \end{frame} I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed. ! Missing } inserted. <inserted text> } l.167 \end{frame} I've inserted something that you may have forgotten. (See the <inserted text> above.) With luck, this will get me unwedged. But if you really didn't forget anything, try typing 2' now; then my insertion and my current dilemma will both disappear. ! Extra }, or forgotten \endgroup. \math@cr@@ ...th@cr@@@ \noalign {\vskip #1\relax } l.167 \end{frame} I've deleted a group-closing symbol because it seems to be spurious, as in x}'. But perhaps the } is legitimate and you forgot something else, as in \hbox{x}'. In such cases the way to recover is to insert both the forgotten and the deleted material, e.g., by typing I}'. ! Misplaced \noalign. \black@ #1->\noalign {\ifdim #1>\displaywidth \dimen@ \prevdepth \nointerlin... l.167 \end{frame} I expect to see \noalign only after the \cr of an alignment. Proceed, and I'll ignore this case. ! Extra }, or forgotten \endgroup. \endalign ->\math@cr \black@ \totwidth@ \egroup \ifingather@ \restorealignst... l.167 \end{frame} I've deleted a group-closing symbol because it seems to be spurious, as in x}'. But perhaps the } is legitimate and you forgot something else, as in \hbox{x}'. In such cases the way to recover is to insert both the forgotten and the deleted material, e.g., by typing I}'. ! Missing  inserted. <inserted text>  l.167 \end{frame} I've inserted something that you may have forgotten. (See the <inserted text> above.) With luck, this will get me unwedged. But if you really didn't forget anything, try typing 2' now; then my insertion and my current dilemma will both disappear. ! Display math should end with.
\endgroup
l.167 \end{frame}

The \$' that I just saw supposedly matches a previous $$'. So I shall assume that you typed $$' both times.

Thank you very much for your help!
If you need anything else, don't hesitate to ask.
P.S.: I'm not a native so please forgive my mistakes.

Johannes_B
Site Moderator
Posts: 4158
Joined: Thu Nov 01, 2012 4:08 pm
Empty lines are not allowed in an align` environment. Put a percent sign at the beggining of those lines.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Mojert
Posts: 2
Joined: Mon Dec 05, 2016 7:27 pm
Thank you very much for your help, I highly appreciate it !