[Tex/LaTex] Extra }, or forgotten $ \end{frame} & Missing $ inserted \end{frame}

errors

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}
\usetheme{Madrid}
\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}
\institute{Universidad de Oviedo}
\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?

Best Answer

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.

Related Question