# Extra }, or forgotten $\end{frame} & Missing$ inserted \end{frame}

I am trying after long hours to compile this, until now. And this errors appear:

Missing $inserted \end{frame} Extra }, or forgotten$ \end{frame}
Missing $inserted \end{frame} Missing$ inserted \end{frame}


Its a large code, so I will include the parts I have been working with:

\documentclass[trans,9pt]{beamer}
\usepackage[spanish]{babel}
\usepackage[latin1]{inputenc}
\usepackage{lmodern}
\usepackage{bookmark}
\usepackage{graphicx}
\usecolortheme{wolverine}
\hypersetup{urlcolor=blue}
\tiny

\title{Comparaci\'on entre fotones y leptones sin carga}
\subtitle{Los neutrinos y fotones para ver el universo}
\author{Pablo \'Alvarez Rodr\'iguez}
\subject{F\'isica Moderna}

\begin{document}

\begin{frame}
\titlepage
\begin{center}
\includegraphics{UNIOVIlogo.jpg}
\end{center}
\end{frame}

\begin{frame}
\frametitle{\'Indice}
\tableofcontents

\end{frame}

\begin{frame}
\section{Introducci\'on}
\frametitle{Introducci\'on}
\begin{itemize}
\item Realizar\'e una comparativa entre neutrinos y fotones  con respecto a   su eficiencia en la astrof\'isica de part\'iculas. \pause
\item Expliar\'e los fen\'omenos necesarios para la producci\'on de neutrinos y fotones. \pause
\item Hablar\'e de algunos experimentos en los que se estudia esta disciplina. \pause
\end{itemize}
\end{frame}

\section{Breve repaso a part\'iculas elementales}
\begin{frame}
\frametitle{Breve repaso a part\'iculas elementales}
\begin{center}
\includegraphics[height=7.5cm, width=7.5cm, keepaspectratio]{particulaselementales.png}
\end{center}
\end{frame}
\subsection{Leptones}

\begin{frame}
\frametitle{Leptones}
Aqu\'i se encuentran:
\begin{itemize}
\item Los electrones, con masa $0.511 MeV$ y carga el\'ectrica $-1$ \pause
\item Los muones, con masa $105,66 MeV$ y carga el\'ectrica $-1$ \pause
\item Los tauones, con masa $1777 MeV$ y,carga el\'ectrica $-1$ \pause
\item Y los neutrinos, que son tres, y tienen la particularidad de no tener carga: \pause
\begin{itemize}
\item neutrino electr\'onico $\nu_e$. Su masa es menor que $2 eV$\pause
\item neutrino mu\'onico $\nu_\mu$. Su masa es menor que $0.19 MeV$\pause
\item neutrino tau\'onico $\nu_\tau$.Su masa es menor que $18.2 MeV$\pause
\end{itemize}
\item Todas tienen spin $1/2$; por lo que obedecen a la estad\'istica de Fermi-Dirac \pause
\end{itemize}
\end{frame}

% And therefore, for the bibliography, after non-used-right-now-text:

\begin{frame}
\frametitle{Bibliograf\'ia}
\begin{thebibliography}{10}
\setbeamertemplate{bibliography item}[book]
\bibitem{Author}
\newblock{\emph{F\'isica para la ciencia y la tecnolog\'ia} Volumen 3: F\'isica Moderna}
\newblock Paul A. Tipler y Gene Mosca
\newblock 6\textsuperscript{a} edici\'on 2012
\setbeamertemplate{bibliography item}[book]
\bibitem{Author}
\newblock{\emph{F\'isica Te\'orica} Volumen 3: Mec\'anica Cu\'antica}
\newblock B. G. Levich
\newblock 1\textsuperscript{a} edici\'on 1974
\setbeamertemplate{bibliography item}[online]
\newblock Wikipedia: Leptones
\newblock \url{http://es.wikipedia.org/wiki/Lept\%C3\%B3n}
\setbeamertemplate{bibliography item}[online]
\newblock Información sobre Tauones
\newblock \url{http://astrojem.com/teorias/tauones.html}
\end{thebibliography}

\end{frame}

\end{document}


I have been working for hours and it worked until now, when the pdf is not made but this errors:

Missing $inserted \end{frame} Extra }, or forgotten$ \end{frame}
Missing $inserted \end{frame} Missing$ inserted \end{frame}


I don't know where the problem is, and I have revised it a lot. Some help?

• Sorry, but I can't reproduce the problem from your example. – egreg Apr 25 '15 at 21:35
• @egreg I can. Did you put the two chunks of code together? That's all I did. – cfr Apr 25 '15 at 21:44
• @cfr I've deleted my comment, I hadn't noticed the code blocks could be concatenated. thanks for edit – David Carlisle Apr 25 '15 at 22:49
• @cfr Of course I saved the file in Latin-1. – egreg Apr 25 '15 at 23:07
• @egreg Hmmm.... That might explain it. I'm sure I didn't think of that. But how do you expect to reproduce the errors of us mere mortals if you go and do everything right? – cfr Apr 25 '15 at 23:33

To find the problem, just comment out chunks of code: if the error remains, the commented code isn't responsible (at least for that error); otherwise, the problem must lie in the commented code. Using this method, the problem can be isolated to the final item in the bibliography.

The issue here is that you have input an accented character directly using what seems to be a unicode encoding, but have told TeX that your input encoding is latin1. Many editors now default to UTF8 encoding so, if you've not set an encoding explicitly, this may very well be the case. If you need your file to be in that encoding, you either need to make sure that the file really is encoded as latin1 or you have to use markup for the accent (in which case you don't need inputenc at all):

\documentclass[trans,9pt]{beamer}
\usepackage[spanish]{babel}
%\usepackage[latin1]{inputenc}% if the file is really encoded this way

\begin{document}

\begin{frame}
\frametitle{Bibliograf\'ia}
\begin{thebibliography}{10}
\setbeamertemplate{bibliography item}[online]
\newblock Informaci\'on sobre Tauones
\newblock \url{http://astrojem.com/teorias/tauones.html}
\end{thebibliography}

\end{frame}

\end{document}


Alternatively, if you can use a unicode encoding for the file, you can input the character directly and change the option to inputenc:

\documentclass[trans,9pt]{beamer}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}

\begin{document}

\begin{frame}
\frametitle{Bibliograf\'ia}
\begin{thebibliography}{10}
\setbeamertemplate{bibliography item}[online]
\newblock Información sobre Tauones
\newblock \url{http://astrojem.com/teorias/tauones.html}
\end{thebibliography}

\end{frame}

\end{document}


EDITED in light of David's comment so hopefully it is now at least less incorrect.

• @DavidCarlisle Well, I didn't want to go through all the rest of the code in case something else needed it, so I left that as the OP had it originally. Is it better to remove it? I wanted the difference between that and the utf8 case to be obvious i.e. the difference isn't loading inputenc: it matters which option you give it. – cfr Apr 25 '15 at 23:00
• @DavidCarlisle Yes. I'm just confused. Thanks. – cfr Apr 25 '15 at 23:42
• The main point is to change latin1 to utf8... or to delete inputenc??? – Pablo AR Apr 26 '15 at 6:38
• @LyonBuster The main thing is to make sure that the encoding of the file matches the option you pass inputenc. utf8 is recommended. But the matching is the really important thing i.e. no point in saying utf8 if your file isn't actually using that encoding. – cfr Apr 26 '15 at 12:29
• Gotcha, so next time i have to be careful with coding (always utf8 in my case) – Pablo AR Apr 26 '15 at 13:02