DEV Community

latexteada
latexteada

Posted on

LaTeX & Macros: The Idea

Hello, how are you? :)

In this post I tell you about Macros. You will discover if these are useful for you and if you need these. Let's start!!!

Remember that these Macros are for LaTeX there are other softwares that use macros, but we are talking about LaTeX

What are the Macros?

A macro is a set of instructions, which will be executed when we write a command.
We need to create these instructions and give them the steps which will be performed when we call this instruction

In LaTeX we can create macros to write equations, words, environments, multi-argument equations, environments, etc.

How do I know if I need macros?

This is a natural question, well, to answer it, let me tell you, check the definition again.

  • You could use a macro if your document has many repetitive structures
  • To save time writing different structures, or equations
  • In the math context, you need to put the same equation in many places
  • To insert figures in a fast way

But if you just need to do it once in your document, just do it in the normal way, it could be more efficient instead of declaring your macros.

There are different kinds of macros, without arguments, a single argument, multiple arguments, optional arguments, we will check them here.
Declaring macros is easy, you do not need to be worried about this, but this is topic for the next post.

This is all!!!

Do not forget to follow me on Twitter @latexteada

Greetings :)

Top comments (0)