SofiaV
SofiaV

Reputation: 15

I am trying to write an equation in LaTeX and i have an error

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation*} $ f(x) = x^2$

\end{equation*}

\end{document}

#And this is the error:

! Display math should end with $$.

l.11 $

?

Upvotes: 0

Views: 888

Answers (2)

sjwarner
sjwarner

Reputation: 462

Remove the $ signs from the line with your equation in it.

It should read

\begin{equation*} f(x) = x^2

I think.

Upvotes: 0

renefritze
renefritze

Reputation: 2243

The equation environment automatically sets math mode. No need to place additonal dollar signs.

Upvotes: 0

Related Questions