Basic Syntax Create your first LaTeX Title Section Paragraph and Comments Text Processing Fonts Formatting List
Document type in Latex↓
Document Class Document Classes Comparison Document Classes Options
Command Table of Contents Page Numbering Footnotes Language Support
Bibliography ↓
Bibliography Management With Biblatex Bibliography Management With Natbib
Basic paragraphs and comments

Creating paragraphs and new lines
In very important documents, such as scientific ones, you do not want to keep a simple, basic format. In Latex, for example, if you want to start a new paragraph, you have to click the "Enter" key twice, and if you write on a new line and not start a new paragraph, you can write a backslash two times (\\), after the line previous to the new line. For example:


CODE
\documentclass{article}

\title{My first Latex Document!}
\author{Bob Malcom}
\date{November 2, 2018}

\begin{document}

\maketitle

Hello World! This is a very simple, Latex document. \\

This is a new line \\

This is another line.

This is a new paragraph.


Comments
We saw from the code and the picture of the document, that a new line goes simply down a line, while a paragraph does the same, but gets indented.
On Latex, it is also possible to insert comments (colored in red), useful for remembering what you meant in one of your lines of code. Very simply, you type the symbol "%", and start writing the comment. When you are finished with the comment, you press the "Enter" key. Below, for example:


CODE
\documentclass{article}

\title{My first Latex Document!}
\author{Bob Malcom}
\date{November 2, 2018}

\begin{document}

\maketitle %Title inserted

Hello World! This is a very simple Latex document. \\ %This is a text, containing the command that lets the following text go down the next line.

This is a new line \\ %This is a text, containing the command that lets the following text go down the next line

This is another new line. %This is a text, containing the command that creates a new paragraph (double "Enter" key)

This is a new paragraph. %Final text (in new paragraph)

\end{document}


As you may imagine, comments will not appear on the actual Latex document, so the document for the code above will be the same as the first picture at the top of this page. This is a very useful tool, because it makes the coder remember what he/she meant with a particular code, or line of code. Are you not so sure about remembering in the future what you have written, or what your code really means? Put a % and write your comment!