0

I would like to insert an equation without a number. I use the environment equation* (described in How do I turn off equation auto numbering):

\documentclass{article}
\begin{document}
\begin{equation*}
  a=b
\end{equation*}
\end{document}

When compiling I receive an error:

! LaTeX Error: Environment equation* undefined.

The same problem is encountered when using the environment align* in place of equation*.

What is wrong?

Viesturs
  • 7,895
  • 4
    Hi, but where is the \usepackage{amsmath}? – Sebastiano Jul 13 '21 at 20:10
  • Why don't you simply use the standatd \[ … \]? – Bernard Jul 13 '21 at 20:28
  • @Bernard, because I am not accustomed to the use of \[ .. \]. Maybe you could supply your answer for users like me. – Viesturs Jul 13 '21 at 20:30
  • 1
    @Viesturs \[ is the standard form, any place that you have seen suggesting equation* must also have said to use amsmath to define it. – David Carlisle Jul 13 '21 at 20:34
  • I don't think it's necessary.It's really one of the basics of LaTeX. The situations when one has tto resort toequation* are much less frequent (an example would be with empheq). – Bernard Jul 13 '21 at 20:35
  • @Bernard To the contrary, amsmath provides equation* so it's easy to switch from numbered to unnumbered equation and conversely. – egreg Jul 13 '21 at 22:24
  • @egreg: I very rarely use it, and anyway, a good editor also makes it easy to switch between equation and [ … ] . – Bernard Jul 13 '21 at 22:40

1 Answers1

3

You need amsmath:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
  a=b
\end{equation*}
\begin{align*}
 x&=y\\
  &=z
\end{align*}
\end{document}
\end{document}

enter image description here

citsahcots
  • 7,992