0

I am a new user of latex, and I have the follow question. How can enumerate the equations that I write in a document ad during the text write the number to a specific equation

Currently I can write equations by using $$ In this way I don't have a reference at any equations

  • 2
    Could you elaborate your question? It is not very clear to me. – Bernard Dec 20 '15 at 12:55
  • 1
    equations are numbered by default: \begin{equation}1=2\end{equation} will produce something like 1=2 (1) – David Carlisle Dec 20 '15 at 12:57
  • Very useful information about math typing you can find in Herbert Voss: Math mode - v 2.47 pdf document. It can be found on https://www.ctan.org/tex-archive/info/math/voss/mathmode/?lang=en. Basic of use of LaTeX, where is also section about typesetting Mathematical Formulae is described in "The Not So SHort Introduction to LaTeX 2e", which is part os any LaTeX distribution. – Zarko Dec 20 '15 at 13:13
  • Please, read documents which I mentioned in my previous comment! \[, $$, \begin{equation*}, etc are not numbered math environments. For numbering you had to use \begin{equation.... \end{equation} (see answer below) or \begin{gather} ...\end{gather} etc (provided by amsmath package) . – Zarko Dec 20 '15 at 13:44
  • 1
    $$, \[, \begin{equation*}, etc starts equations, which are not numbered . For numbered equations you had to use \begin{equation}.... \end{equation} or \begin{gather} ...\end{gather} and other math environments provided by amsmath package. – Zarko Dec 22 '15 at 20:33

1 Answers1

4

As it was told you in the comments, equations are automatically numbered. If you want to refer to a certain label, you can add the following inside the equation:

\label{<label>}

Then, it will be referenced in the text using \eqref{<label>} (equation reference). Regardless of whether you move the equation, Latex will always adjust the reference appropriately.

example image

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{equation} \label{eq1}
\begin{split}
A & = \frac{\pi r^2}{2} \\
 & = \frac{1}{2} \pi r^2
\end{split}
\end{equation}

This is a reference to the equation in \eqref{eq1}
\end{document}
Alenanno
  • 37,338