at the moment I get a pretty simple tex error, but I don't know how to handle it: the following code (an excerpt of a larger thing but with the same error) gives me those three errors:
6: LaTeX Error: There's no line here to end. [\end{frame}]
6: Missing $ inserted. [\end{frame}]
6: Missing $ inserted. [\end{frame}]
Here is the code, I really don't know what is wrong:
\documentclass{beamer}
\begin{document}
\begin{frame}
$\langle\alpha v_1,\beta v_2\rangle=\alpha\beta-\alpha\beta=0\\
\langle\alpha v_1,\beta v_4\rangle=\alpha\beta-\alpha\beta=0$
\end{frame}
\end{document}
Edit: it works if I replace \\
with \newline
- but shouldn't \\
also work?
Thanks in advance!
\\
in inline math. Usealign
instead.frame
)gather
environment from theamsmath
package and not relay on beamer specific:\documentclass{beamer} \usepackage{amsmath} \begin{document} \begin{frame} \begin{gather} \langle\alpha v_1,\beta v_2\rangle=\alpha\beta-\alpha\beta=0 \\ \langle\alpha v_1,\beta v_4\rangle=\alpha\beta-\alpha\beta=0 \end{gather} \end{frame} \end{document}