DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

latexteada
latexteada

Posted on

LaTeX & Maths: Equation Environment and Labeling Equations

Hello, how are you? :)

In this post we talk about Why the equation environment is important, how you can label your equations and how you can call these equations. Let's start!!!

In this post I gave you a brief introduction to the equation environment, at the end of that post we compare the equation environment with the displayed formulas, but what is the difference between these environments

Equation Environment

In the equation environment you can Label your equations and refer to these later. Do you remember that here I talked about the Cross-Referencing mode.

Labeling Equations

The convention to label an equation is

  • E: equation
\label{E: my Formula}
Enter fullscreen mode Exit fullscreen mode

So, if you want to label your equation, the label must be inside the equation environment

\begin{equation}
    \label{E: first}
    2x+3=y
\end{equation}
Enter fullscreen mode Exit fullscreen mode

Referencing equations

In this post I talked about how to reference elements which were labeled. Let's remember a little and introduce a new way to do this

Let's assume we labeled our element as \label{E: first} you can use \ref{} but for equations is more useful \eqref{}

code

Produces

Screenshot from 2021-07-05 12-05-44

Did you notice? \eqref adds a pair of parentheses

Ok ok, but what if we want to give to our equation a name instead of a number? Can I do that? The answer is YES but that is topic for the next post

Thank you :) Do not forget to follow me on Twitter @latexteada

Top comments (0)

Every Week

We have a Welcome Thread where we invite members to tell us a bit about themselves. Join the conversation with us!