DEV Community

latexteada
latexteada

Posted on

1 1

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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay