DEV Community

latexteada
latexteada

Posted on

2 2

LaTeX & Maths: Equations and Environments

Hello :) How are you today?

We are going to talk about an important environment in LaTeX, the equation environment and one alternative to this.

But before, a suggestion

In this article I talk about two important packages. It is a good idea to import these packages, in the preamble, to avoid mistakes of symbols and environments, because, remember that these packages give us the most of them.

Do you remember, in this post I talked about the inline and displayed formulas, well today we are going to talk about other environment, the equation environment

What is an equation

Well, in the LaTeX world, an equation is a numbered displayed formula.

Yes, a numbered formula, and for that we need an special environment

The equation Environment

This environment assigns a number to the displayed formula. Its structure is


\begin{equation}
    My Equation
\end{equation}

Enter fullscreen mode Exit fullscreen mode

code

Produces

Screenshot from 2021-06-28 09-42-28

WARNING You must NOT left blank lines within this environment

Screenshot from 2021-06-28 09-52-37

But, what if I do not want to enumerate my equations?

Do you remember that once I wrote about non-numbered environments? Well, to avoid numbering the environments just add a *

code

Produces

Screenshot from 2021-06-28 09-54-31

But, wait, that is what we checked last post, do you remember? The displayed formulas, let's compare

code

Produces

Screenshot from 2021-06-28 09-57-24

Then, what is the difference between them?

That is something for the next post.

Thanks. 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