Learn LaTeX in under 3 minutes!
LaTeX is one of the best ways to express yourself in the world of computers with mathematical formulas. In this article you will learn the basics of LaTeX and create your own equations!
If you like this article, I would be very happy if you could give me some claps and follow me!
The basics of LaTeX
To get started, the first thing you need is a TeX document. You can either create one on your computer with the extension .tex
, or you can use overleaf.com. I recommend that you use overleaf, as I will not show you how to install TeX in this article. (As soon as I have written an article about it, it will be linked here).
Let's start writing a document now.
To do this, we write the following:
Today we focus only on the mathematics. Since this is my first article ever on LaTeX, I will link to another article here as soon as I have written something about "normal" documents.
But now we finally want to write something mathematical. To do this, we will write the following:
Between \begin{displaymath}
and \end{displaymath}
we now write an equation or something else. But to be able to do that, we first have to know how to write mathematical signs. Here is a list of basic arithmetic operations:
- Addition: + → Example: 1+1
- Subtraction: - → Example: 1-1
- Multiplication: \cdot → example: 1 \cdot 1
- Division: \div → example: 1 \div 1
Okay, now let's see what this looks like:
That's already great, but we can't create complex equations with it yet. So let's look at some more elements:
- Square root: \sqrt{radicand} → Example: \sqrt{16}
- Root: \sqrt[root exponent]{radicand} → Example: \sqrt[3]{21}
- Fraction sign: \frac{counter}{denominator} → Example: \frac{1}{4}
- Powers: ^{power} → Example: x^{4 + a} or, if you only have one number as a power: x^2
Conclusion
Great, now we have learned all the basics. More articles on LaTeX will follow, but that will be it for today. If you have a mathematical symbol in mind that I haven't covered here, I can recommend this Wikipedia website. There you will find an implementation in LaTeX for each symbol.
If you liked this article and want to see more articles about LaTeX or programming, I recommend you to follow me!
Thank you for reading, have a nice day!
Top comments (0)