How To Convert Files On Linux Command Line Using Pandoc?

How To Convert Files From LaTex To MS Word Using Pandoc?

How To Use LaTex In Windows 10? A Beginner’s Guide

LaTex Command Syntax And LaTex Documentation

In this article, we will provide a list of important LaTex commands basics to advanced LaTeX commands essential while writing documents on a LaTeX engine.

## Explore LaTeX in-depth

Abstract: Most of the scientific papers contain a brief overview of the main subject of the paper. In LaTeX, you can use the abstract keyword to specify the beginning and end of the abstract. The abstract keyword will put the text in a specific format at the top of the document.

### Syntax

\begin{abstract}
The abstract of the document goes here, explaining the brief to the main subject.
\end{abstract}

### Example

Note: If you want to break a line then you need to use ‘\\'(double slash) to make LaTeX engine understand.

Sometimes you need to add a comment to your LaTeX document for later references or better readability. You can add a comment only by adding ‘%’ before the comment.

### Syntax

\begin{document}
%This is a comment and won't be printed on the screen.
\end{document}

### Example

Note: The % symbol is a reserved character. What if you need to use % inside your comment, then you need to use the escape character / as follow,

## Lists

While working on a document, you might need to add a few items as an ordered or unordered list. Here you you need to follow the below syntax to do so,

%This is an unordered list
\begin{itemize}
\item Item-1 in the list
\item Item-2 in the list
\end{itemize}
%This is an ordered list
\begin{enumerate}
\item Item-1 in the list
\item Item-2 in the list
\end{enumerate}

## Nested Lists

LaTeX gives you the flexibility to add a list inside another list. You can nest one inside another, or mixed or just one type.

### Syntax

\begin{enumerate}
\item Outer List item 1
\begin{itemize}
\item Inner List item 1
\item Inner List item 1
\end{itemize}
\item Outer List item 2
\end{enumerate}

### List Styles

LaTeX is not behind when it comes the customization of lists. You can add customizations to the list by following the below syntax,

%Ordered List
\begin{enumerate}
\item First level item
\item First level item
\begin{enumerate}
\item Second level item
\item Second level item
\begin{enumerate}
\item Third level item
\item Third level item
\begin{enumerate}
\item Fourth level item
\item Fourth level item
\end{enumerate}
\end{enumerate}
\end{enumerate}
\end{enumerate}

### Example

Default numbering scheme for ordered list:

• Arabic number (1, 2, 3, …) for Level 1
• Lowercase letter (a, b, c, …) for Level 2
• Lowercase Roman numeral (i, ii, iii, …) for Level 3
• Uppercase letter (A, B, C, …) for Level 4.

## Create a simple table in LaTeX

Creating tables while working a paper or writing a document is a common thing. You can create a simple table in LaTeX by following the below syntax,

\begin{center} % To keep the table at the center of the screen
\begin{tabular}{ |l|c|r| } % Start drawing the stable
\hline % Horizontal line
cell1 & cell2 & cell3 \\ % Three row contents separated by '&'
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline % Horizontal line
\end{tabular} % End the table
\end{center}

## Decode the syntax

• { |*|*|*| }:
• It specifies three columns separated by vertical lines.
• The * can be replaced with l, c, r. It is typically used for allignment.
• ‘l’ is for aligning the content of the column to the left.
• ‘c’ is for keeping the content of the column to the center.
• ‘r’ is for aligning the content of the column to the right.
• \hline: Horizontal lines at the top and bottom of the table.
• cell1 & cell2 & cell3 \\: Each cell is separated by a ‘&’ symbol and \\(double backslash) defines end of the row.

## Conclusion

In this part of the LaTeX series, we have walked you through a few of the commonly used LaTeX syntaxes ordered basics to advanced. It might sound not very clear at first adapting the syntax and commands for writing the documents in LaTeX compared to MS Word. As you move ahead with being a LaTeX writer, in the end, it’d be a lot easier and simpler to publish your write up in more than fifty formats with endless customizations.