DEV Community


Posted on

Document structure: Fonts, Verbatim and Comments

Hello friends how are you today?
We have learned the basics of the documents in LaTeX like how to install it, the preamble, and the body, how to set the language and the margins, type of documents, and paragraphs.

Today we are going to learn the different fonts that you can find in LaTeX, but before we are going to learn how to comment in our source code and a special type of structure called Verbatim


We can comment with %, everything we put in front of it, in the same line, is ignored by the interpreter


Screenshot from 2021-02-02 21-37-55


Verbatim allows us to write the text as we write it, this is, like if it were plain text. We can use verbatim in-text or in several lines

In-Line Text

We need to use \verband to set its scope we can use " ", ! !, ’ ’, @ @ these are to set its scope, any of them have the same function, we just need to choose the best option

Screenshot from 2021-02-02 21-47-53

Multiple Lines

If we want to write multiple lines in this way, we need to use the verbatim environment

Screenshot from 2021-02-02 21-51-21

Font Mode

We can write with different types of fonts during the document, we must type {\type myText} where type is the font mode that you want and myText is the text that will be printed in the desired type, here is a table with its commands and the letter it produces

Screenshot from 2021-02-02 22-02-39

Font Size

As in the font mode, we need to write {\size myText} where size is the desired size and myText is the text to apply the size, here is a table with its commands and the text size

Screenshot from 2021-02-02 22-06-40

That is all for today, thanks, do not forget to follow me on Twitter @latexteada

Top comments (0)