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

latexteada
latexteada

Posted on

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

Top comments (0)

Another day as a dev

Stop by this week's meme thread!