1

this is my code for a frame with an equation:

\documentclass[pdf]{beamer}
\usetheme{CambridgeUS}
\mode<presentation>{}
\usepackage{braket}

\title{title title}

\author{Proton}
\begin{document}

\begin{frame}
\titlepage
\end{frame}
\begin{frame}{title}
\begin{itemize}
    \item From Classical Gibbs Stochastic:
    \begin{equation}
        $$e^3$$
    \end{equation}
\end{itemize}
\end{frame}

\end{document}

When I try to compile this code I get the following errors:

Missing $ inserted. \end{frame}
You can't use `\eqno' in math mode. \end{frame}
Missing $ inserted. \end{frame}
Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted
Size substitutions with differences(Font) up to 1.0pt have occurred.

Without the dollar signs I get this error:

miktex-makemf.log You may want to visit the MiKTeX proj

ect page, if you need help.

Sorry, but miktex-makepk did not succeed for the following reason: PK font mathkerncmssi10 could not be created. The log file hopefully contains the information to get MiKTeX going again: C:/Users/ofir arzi/AppData/Local/MiKTeX/2.9/miktex/log/miktex-makepk.log You may want to visit the MiKTeX project page, if you need help.

Process exited with error(s)
proton
  • 167
  • 3
    Tested on my computer with XeLaTeX and without $$ everything works fine without any error message...Maybe try to remove previous log files from previous compilation and try to compile another time? – Damien Dtx Nov 30 '17 at 13:21
  • 4
    Did you try with \begin{equation} e^3 \end{equation}? – CarLaTeX Nov 30 '17 at 13:24

1 Answers1

2

Using both \begin{equation} ... \end{equation} and $$ ...$$ as wrappers around the actual math material is an error. Use one or the other wrapper, but not both. The former should be used if you want a numbered displayed equation, the latter for an unnumbered displayed equation.

Moreover, using $$ in a LaTeX document to initiate and terminate TeX's display-math mode is deprecated -- and has been deprecated for more than 20 years by now. Use \[ ... \] instead. For more information on this subject, please see the following two postings:

Mico
  • 506,678
  • Actually that's true and was a big mistake, but as stated in his original question, proton gets an error even without the $$. – Damien Dtx Nov 30 '17 at 14:05
  • @DamienDtx - I get no errors when running the OP's code after the pair of $$ symbols is deleted. Whatever is plaguing the OP's setup needs to be explained in more detail in order for someone to be able to come up with a diagnosis, let alone a cure. – Mico Nov 30 '17 at 15:26
  • 1
    I had the same behavior as yours when trying his code (see comment on the main topic). – Damien Dtx Nov 30 '17 at 15:30