## 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:
1. \documentclass[10pt]{beamer}
2. \usetheme{Warsaw}
3.
4. \usepackage[utf8]{inputenc}
5. \usepackage[T1]{fontenc}
6. \usepackage[french]{babel}
7. \usepackage{graphicx}
8. \usepackage{lmodern}
9. \usepackage{siunitx}
10. \usepackage{amsmath}
11. \usepackage{amssymb}
12. \usepackage{mathrsfs}
13.
14. \begin{document}
15. \begin{frame}
16. \frametitle{Centre of mass}
17. \begin{columns}[c]
18. \begin{column}{.5\textwidth}
19. \includegraphics[width=\textwidth]{Images/05-12.jpg}
20. \end{column}
21. \begin{column}{.5\textwidth}
22. \begin{align*}
23. \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} \\
24.
25. CM_x &= \frac{m_1 x_1 + m_2 x_2 + \dots + m_n x_n}{m_1 + m_2 + \dots + m_n}
26. \end{align*}
27. \end{column}
28. \end{columns}
29. \end{frame}
30. \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: 4160
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 !