LaTeX 101:- Things you need to know about this innovative  document preparation system

LaTeX 101:- Things you need to know about this innovative document preparation system

LaTeX (pronounced lay-tek) is a document preparation system that allows you to create professional-looking documents without using a word processor. It excels at typesetting equations and is well-suited to writing long, structured documents. It is freely accessible for most OS systems.

image.png

If you're used to creating documents in Microsoft Word, you'll notice that LaTeX has a totally distinct working style. Microsoft Word is a ‘What You See Is What You Get' (WYSIWYG) program, which means you can see how the finished document will look like you type. When operating in this manner, you will most often make adjustments to the layout of the document (such as line spacing, headings, and page breaks) as you type. When you use LaTeX, you don't see how the final document will read as you type it, which allows you to focus on the content rather than the aesthetic.

image.png

Source:- Javatpoint

LaTeX could be seen as an independent document preparation system or as an intermediate version. It is sometimes used in the latter function as a component of a pipeline for converting DocBook and other XML-based forms to PDF. LaTeX, like TeX, began as a writing tool for mathematicians and computer scientists, but it was quickly adopted by scholars who needed to produce texts with difficult math expressions or non-Latin scripts such as Arabic, Devanagari, and Chinese.

Why do I need to learn LaTeX?

why.gif

LaTeX is widely used for scientific publications, publications, and a variety of other forms of publishing. It not only produces attractively typeset documents, but it also enables users to swiftly tackle the more technical aspects of typesetting, such as entering mathematics, constructing tables of contents, referencing and constructing bibliographies, and maintaining a consistent layout across all sections. The prospects with LaTeX are limitless due to the vast amount of open-source packages offered.

One of several main reasons people utilize LaTeX is that it isolates the document's content from its aesthetic. This means that once you've typed the content of your paper, we can easily change its design.

The most common difficulty individuals encounter is determining how to spell LaTeX! Yes, it appears to be too simple, yet there is some logic behind it. Let me clear it for you.

How do you write and pronounce LaTeX?

giphy (21).gif

The letters 'T,' 'E,' and 'X' in the name originate from the Greek capital letters tau, epsilon, and chi, as TeX's name stems from the Ancient Greek: v ('skill,' 'art,' 'technique'); as a result, TeX's creator Donald Knuth supports its pronunciation as /tx/ (tekh) (that is, with a voiceless velar fricative as in Modern Greek, similar to the ch in loch). "TeX is typically called tech," says Lamport, "so lah-teck, lah-teck, and lay-teck are the logical possibilities; but language isn't always rational, so lay-tecks is also feasible."

Alright, so you should have a good concept of what LaTeX is and how to pronounce and write LaTeX by now. Now I'll show you several commands that will allow you to start writing professional documents on your own. I'll try to cover only the most obvious ones. I'll demonstrate the commands using the Overleaf LaTeX editor. In the latter portion of the article, I'll also include additional editors. I will be inserting screenshots of whatever step I'll be performing.

Let's get started with LaTeX

AnimatedLimpBrant-max-1mb.gif

How to create a new project?

image.png

  • If you don't already have an account, enter your e-mail address and password in the spaces below. Get started right away by clicking Register. You will be forwarded to the project management page, where you will be taken through the process of creating a new project.

image.png

  • If you already have an account, click Login in the upper right corner, then enter your email and password and click the Login button.

image.png

  • Once logged in, you should see the Overleaf Project Management page.

image.png

  • To begin a new project from scratch, click the New Project button on the main page, then select Blank Project from the next drop-down option.

image.png

  • A box will appear where you may enter the name of your new project before clicking Create.

image.png

  • You will then be routed to the editor.

image.png

  • A new document is produced there with some basic information already filled in. You can now begin changing your.tex file; to see the changes, click Recompile.

  • Quick guide to creating a new blank project: On the Project Management page, click New project => Blank Project, enter a name for your project then click Create.

How to upload a project?

  • Upload your files if you have a LATEX project on your PC and wish to edit it in Overleaf.

image.png

  • To upload a project, you must have all of your assets (images, classes, styles, bibliography, fonts, and.tex sources) in a compressed.zip file. Choose New Project on the Project Management page, and then click Upload Project from the drop-down menu.

image.png

  • There will be a box where you can drag and drop your.zip file or click Select a.zip file to open a file browser and locate it.

  • When you drop or choose a file in your file browser, you will be taken to the editor, where a new project with the same name as the.zip file will be generated.

image.png

How do I copy a project?

  • Locate the project you wish to copy on the Project Management page (see the introduction), click the little box just behind it, a checkmark should display, then click the button More, and in the drop-down menu, select Make a copy.

image.png

image.png

  • A text box will appear; input the name of the new project in this box, then click Copy.

image.png

  • A new project with a copy of the files from the cloned project will open in the editor.

Let's get started with the document writing. I'll demonstrate the commands used for each individual topic.

A small example

The input file is simply a normal text file with the extension.tex. It will contain code that the computer will comprehend in order to generate a PDF file.

An example is shown here:-

 \documentclass{article}

 \begin{document}
 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{document}

Output:-

kvaCwWmnw.png

The preamble

The section of your.tex file preceding this point is known as the preamble. You identify the type of document you're composing and the language in the preamble, as well as load any supplementary packages you'll need and configure numerous settings. A typical document preface would look something like this:

\documentclass[12pt, letterpaper, twoside]{article}
\usepackage[utf8]{inputenc}

\title{Test document}
\author{Sherlock Holmes}
\date{June 2021}

Output:-

image.png

Meaning of the commands:-

  • \documentclass[12pt, letterpaper]{article}

As previously stated, this identifies the type of document. Additional parameters, included in brackets and separated by commas, can be supplied to the command. The extra parameters in this example provide the font size (12pt) and paper size (letterpaper).

  • \usepackage[utf8]{inputenc}

This is the document's encoding, which allows characters other than ASCII (e.g., á, ü,...) to be used in the text. It can be left out or altered to another encoding, though utf-8 is preferred.

The next three lines are self-descriptive.

Displaying your document's title

To display your document's title, declare its components in the preamble and then use the following code:

\documentclass[12pt, letterpaper, twoside]{article}
\usepackage[utf8]{inputenc}

\title{Test document}
\author{Sherlock Holmes}
\date{June 2021}

\begin{document}

\begin{titlepage}
\maketitle
\end{titlepage}

In this document some extra packages and parameters were added. 
There is an encoding package
and pagesize and fontsize parameters.

\end{document}

Output:-

image.png

14.PNG

Meaning of commands:-

  • \title{Test document}

This is the title.

  • \author{Sherlock Holmes}

Here you put the name(s) of the author(s) and, as an optional parameter, you can add the next command.

  • \date{June 2021}

You can individually specify the date or use the command today to have the date changed automatically when you create your document.

  • \begin{titlepage} \end{titlepage}

This declares an environment, which is a block of code that has different behavior based on its type. Anything you include in this titlepage environment will display on the first page of your document.

  • \maketitle

This command will print the title, author, and date as seen in the example. If it is not wrapped in a titlepage context, it will be displayed above the first line at the beginning of the document.

Abstract, paragraphs and newlines

It is usual practice in scientific writings to offer a quick overview of the major subject of the study. The abstract environment in LATEX is used for this purpose. The abstract environment will place the text at the top of your document in a particular manner.

If you need to start a new paragraph while composing the contents of your document, you must press the "Enter" key twice (to insert a double blank line). There is a white space before the first line of each paragraph.

Append a break line point to start a new line without opening a new paragraph. This can be done using (a double backslash like in the example) or the newline command.

Code is,

\documentclass[12pt, letterpaper, twoside]{article}
\usepackage[utf8]{inputenc}

\begin{document}

\begin{abstract}
This is a simple paragraph at the beginning of the document. A brief introduction to the main 
subject.
\end{abstract}

In this document some extra packages and parameters
were added. There is an encoding package,
and pagesize and fontsize parameters.

This line will start a second paragraph. And I can
 break\\ the lines \\ and continue on a new line.

\end{document}

Output:-

image.png

Comments

For readability, it is sometimes important to add comments to your LATEX code. This is simple: place a percent sign before the comment, and LATEX will ignore it.

Code is,

\documentclass{article}
\usepackage[utf8]{inputenc} %codification of the document

\usepackage{comment}

%Here begins the body of the document
\begin{document}
This document contains a lot of comments, none of them
will appear here, only this text.

This document contains a lot of comments, none of them
will appear here, only this text.

\begin{comment}
This text won't show up in the compiled pdf
this is just a multi-line comment. Useful
to, for instance, comment out slow-rendering parts
while working on a draft.
\end{comment}

\end{document}

Output:-

image.png

How to write Paragraphs and newlines?

Complete code is,

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{color}
\usepackage{ragged2e}

\title{Paragraphs and New Lines}
\author{A test example}

\begin{document}

\maketitle
%-------------------------------------------------------------------------------

\vspace{2em} % adds some space

%-------------------------------------------------------------------------------
%Example of the New Paragraphs section. The second
%Paragraph has no indentation
\setlength{\parindent}{10ex}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore 
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut 
aliquip ex ea commodo consequat. \par
\noindent %The next paragraph is not indented
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est 
laborum.
%-------------------------------------------------------------------------------

\vspace{2em} % adds some space

%-------------------------------------------------------------------------------
%Example of a left justified alignement

\begin{flushleft}
``Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut 
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris 
nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse 
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa 
qui officia deserunt mollit anim id est laborum".
\end{flushleft}

\vspace{2em} % adds some space

%-------------------------------------------------------------------------------
%Example of a right-justified text
\begin{flushright}
``Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut 
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris 
nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse 
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa 
qui officia deserunt mollit anim id est laborum".
\end{flushright}
%-------------------------------------------------------------------------------

\vspace{2em} % adds some space

%-------------------------------------------------------------------------------
%Using \raggedright to left-justify the text and then \justifying to "fix it"
\raggedright
Example 4: Following is an example of switching back to justified text after ragged text has been 
switched on.

\vspace{1em} % adds some space


\justifying
``Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut 
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris 
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ".
%-------------------------------------------------------------------------------

\vspace{2em}

%-------------------------------------------------------------------------------
%Line breaks and blank spaces
\newpage
LaTeX is a document preparation system and document markup language. \\  LaTeX uses the TeX 
typesetting \hspace{2cm} program for formatting its output, and is itself written in the TeX macro 
language. LaTeX \vspace{1cm} is not the name of a particular editing program, but refers to the 
encoding or tagging conventions that are used in LaTeX documents
%-------------------------------------------------------------------------------

\end{document}

New Paragraph

As previously stated, you must leave a blank line between paragraphs in LATEX. Look at the following code snippet for another way to begin a new paragraph. By convention, paragraphs are spaced by 1.5 times the current font's point size. There is really no extra blank space between the paragraphs.

Code is,

This is the text in first paragraph. This is the text in first 
paragraph. This is the text in first paragraph. \par
This is the text in second paragraph. This is the text in second 
paragraph. This is the text in second paragraph.

Output:-

image.png

Text Justification

LaTeX paragraphs are fully justified, that is, they are flush with both the left and right margins. LATEX has three settings for changing the justification of a paragraph: centre, flushleft, and flushright.

Code is,

\begin{flushleft}
``Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut 
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris 
nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor in reprehenderit in voluptate velit esse 
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa 
qui officia deserunt mollit anim id est laborumLorem ipsum dolor sit amet, consectetur adipiscing 
elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure 
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint 
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum".
\end{flushleft}

Output:-

1.PNG

Paragraph Indentation

LATEX does not indent the opening paragraph of a section by convention. The parameter determines the size of the successive paragraph indents.

Code is,

\setlength{\parindent}{10ex}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore 
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut 
aliquip ex ea commodo consequat. \par
\noindent %The next paragraph is not indented
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est 
laborum.

Output:-

image.png

How to bold, italic, and underline the text?

Complete code is,

\documentclass[12pt, letterpaper, twoside]{article}
\usepackage[utf8]{inputenc}

\title{Test document}
\author{Sherlock Holmes}
\date{June 2021}

\begin{document}

\maketitle

Some of the greatest \emph{discoveries} in science were made by accident.

\textit{Some of the greatest \emph{discoveries} in science were made by accident.}

\textbf{Some of the greatest \emph{discoveries} in science were made by accident.}

\end{document}

Output:-

image.png

The \emph{...} command is a highly helpful command. What the \emph command actually accomplishes with its input depends on the context; in normal text, the emphasized text is italicized, but in italicized text, the behavior is reversed. This command is used in our example.

A normal way to bold, italicize, and underline the text is shown below.

  • Bold: Bold text in LaTeX is written with the \textbf{...} command.
  • Italics: Italicised text in LaTeX is written with the \textit{...} command.
  • Underline: Underlined text in LaTeX is written with the \underline{...} command.

Each of these is demonstrated in action below:

Some of the \textbf{greatest}
discoveries in \underline{science} 
were made by \textbf{\textit{accident}}.

Output:-

image.png

How to depict Chapters and sessions?

Complete code is,

\documentclass{report}
\usepackage[utf8]{inputenc}

\begin{document}

\chapter{First Chapter}

\section{Introduction}

This is the first section.

Lorem  ipsum  dolor  sit  amet,  consectetuer  adipiscing  
elit.   Etiam  lobortisfacilisis sem.  Nullam nec mi et 
neque pharetra sollicitudin.  Praesent imperdietmi nec ante. 
Donec ullamcorper, felis non sodales...

\section{Second Section}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  
Etiam lobortis facilisissem.  Nullam nec mi et neque pharetra 
sollicitudin.  Praesent imperdiet mi necante...

\subsection{First Subsection}
Praesent imperdietmi nec ante. Donec ullamcorper, felis non sodales...

\section*{Unnumbered Section}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  
Etiam lobortis facilisissem

\end{document}

Output:-

image.png

The command section denotes the start of a new section, and the title is placed inside the brackets. Section numbering is the default, however, it can be turned off by inserting a in the section command as section . We can also have subsections and subsubsubsections. The following are the fundamental levels of depth:

  • -1 \part{part}
  • 0 \chapter{chapter}
  • 1 \section{section}
  • 2 \subsection{subsection}
  • 3 \subsubsection{subsubsection}
  • 4 \paragraph{paragraph}
  • 5 \subparagraph{subparagraph}

How to add a table of contents?

Complete code is,

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{Sections and Chapters}
\author{Sherlock Holmes}
\date{ }

\begin{document}

\maketitle

\tableofcontents

\section{Introduction}

This is the first section.

Lorem  ipsum  dolor  sit  amet,  consectetuer  adipiscing  
elit.   Etiam  lobortisfacilisis sem.  Nullam nec mi et 
neque pharetra sollicitudin.  Praesent imperdietmi nec ante. 
Donec ullamcorper, felis non sodales...

\section*{Unnumbered Section}
\addcontentsline{toc}{section}{Unnumbered Section}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  
Etiam lobortis facilisissem.  Nullam nec mi et neque pharetra 
sollicitudin.  Praesent imperdiet mi necante...

\section{Second Section}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  
Etiam lobortis facilisissem.  Nullam nec mi et neque pharetra 
sollicitudin.  Praesent imperdiet mi necante...

\end{document}

Output:-

image.png

It is simple to build a table of contents; the command \tableofcontents handles all of the tasks for you. Tables of contents are automatically generated for sections, subsections, and chapters. Use the command \addcontentsline to manually add entries, such as when you desire an unnumbered section.

How to add math in LaTeX?

Complete code,

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

%--------------------------------------------------------------------------------
\section{First example}

The well known Pythagorean theorem \(x^2 + y^2 = z^2\) was 
proved to be invalid for other exponents. 
Meaning the next equation has no integer solutions:

\[ x^n + y^n = z^n \]


%--------------------------------------------------------------------------------

\section{Second example}

In physics, the mass-energy equivalence is stated by the equation $E=mc^2$, discovered in 1905 by 
Albert Einstein.

The mass-energy equivalence is described by the famous equation
\[ E=mc^2 \]
discovered in 1905 by Albert Einstein. 
In natural units ($c$ = 1), the formula expresses the identity
\begin{equation}
E=m
\end{equation}

\section{Third example}

This is a simple math expression \(\sqrt{x^2+1}\) inside text. 
And this is also the same: 
\begin{math}
\sqrt{x^2+1}
\end{math}
but by using another command.

This is a simple math expression without numbering
\[\sqrt{x^2+1}\] 
separated from text.

This is also the same:
\begin{displaymath}
\sqrt{x^2+1}
\end{displaymath}

\ldots and this:
\begin{equation*}
\sqrt{x^2+1}
\end{equation*}

\end{document}

Output:-

image.png

The simplicity with which mathematical formulas can be written is one of LATEX's key features. For mathematical expressions, LATEX has two writing modes: inline and display. The first is used to create formulas that will be included in a text. The second is used to write expressions that do not belong in a text or paragraph and are thus placed on separate lines. Let's consider the example of inline mode:

In physics, the mass-energy equivalence is stated 
by the equation, $E=mc^2$, discovered in 1905 by Albert Einstein.

Output:-

image.png

To put your equations in inline mode use one of these delimiters: ( ... ), $ ... $ or \begin{math} ... \end{math}. They all work and the choice is a matter of taste.

There are two versions of the displayed mode: numbered and unnumbered.

The mass-energy equivalence is described by the famous equation
\[ E=mc^2 \]
discovered in 1905 by Albert Einstein. 
In natural units ($c = 1$), the formula expresses the identity
\begin{equation}
E=m
\end{equation}

Output:-

image.png

How to add images?

We will now look at how to add images to a LATEX document. On Overleaf, you will first have to upload the images.

image.png

Complete code is,

\documentclass{article}
\usepackage{graphicx}
\graphicspath{ {images/} }

\begin{document}
The universe is immense and it seems to be homogeneous, on a large scale, everywhere we look at.

\includegraphics{universe}

There's a picture of a galaxy above
\end{document}

Output:-

image.png

Because LATEX cannot manage images on its own, you will need to employ a package. Packages can be used to change the default appearance of your LATEX document or to provide new functionality. In this scenario, you must add an image in our document, so the graphicx package should be used.

How to add captions, labels, and references?

While inserting images into a LATEX document, we should always use a figure environment or something similar so that LATEX can position the image such that it blends in with the rest of your text.

Complete code is,

\documentclass{article}
\usepackage{graphicx}
\graphicspath{ {images/} }

\begin{document}

\begin{figure}[h]
\centering
\includegraphics[width=0.25\textwidth]{mesh}
\caption{a nice plot}
\label{fig:mesh1}
\end{figure}

As you can see in the figure \ref{fig:mesh1}, the 
function grows near 0. Also, in the page \pageref{fig:mesh1} 
is the same example.

\end{document}

Output:-

image.png

How to create tables?

  • Creating a simple table in LATEX

Complete code is,

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{array}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage{tabu}

\begin{document}


\vspace{1cm}

%---------------------------------------------------------------------
%Simplest working example
\begin{center}
\begin{tabular}{ c c c }
cell1 & cell2 & cell3 \\ 
cell4 & cell5 & cell6 \\  
cell7 & cell8 & cell9    
\end{tabular}
\end{center}
%---------------------------------------------------------------------

\vspace{1cm}

%---------------------------------------------------------------------
%Vertical lines as column separators
\begin{center}
\begin{tabular}{ | c | c | c | } 
\hline
cell1 & cell2 & cell3 \\ 
cell4 & cell5 & cell6 \\ 
cell7 & cell8 & cell9 \\ 
\hline
\end{tabular}
\end{center}
%---------------------------------------------------------------------

\vspace{1cm}

%---------------------------------------------------------------------
%Horizontal lines as row separators
\begin{center}
\begin{tabular}{||c c c c||} 
\hline
 Col1 & Col2 & Col2 & Col3 \\ [0.5ex] 
 \hline\hline
 1 & 6 & 87837 & 787 \\ 
 \hline
 2 & 7 & 78 & 5415 \\
 \hline
 3 & 545 & 778 & 7507 \\
 \hline
 4 & 545 & 18744 & 7560 \\
 \hline
 5 & 88 & 788 & 6344 \\ [1ex] 
 \hline
 \end{tabular}
\end{center}
%---------------------------------------------------------------------

\vspace{1cm}




%---------------------------------------------------------------------
%Referencing and captioning tables
The table \ref{table:1} is an example of referenced \LaTeX{} elements.

\begin{table}[h!]
\centering
 \begin{tabular}{||c c c c||} 
 \hline
 Col1 & Col2 & Col2 & Col3 \\ [0.5ex] 
 \hline\hline
 1 & 6 & 87837 & 787 \\ 
 2 & 7 & 78 & 5415 \\
 3 & 545 & 778 & 7507 \\
 4 & 545 & 18744 & 7560 \\
 5 & 88 & 788 & 6344 \\ [1ex] 
 \hline
 \end{tabular}
 \caption{Table to test captions and labels}
 \label{table:1}
\end{table}
%---------------------------------------------------------------------




\end{document}

Below you can see the simplest working example of a table:

\begin{center}
\begin{tabular}{ c c c }
 cell1 & cell2 & cell3 \\ 
 cell4 & cell5 & cell6 \\  
 cell7 & cell8 & cell9    
\end{tabular}
\end{center}

Output:-

image.png

  • Adding border

The tabular environment is more adaptable since divider lines can be placed between each column.

Output:-

image.png

A second example is shown below.

\begin{center}
\begin{tabular}{||c c c c||} 
\hline
 Col1 & Col2 & Col2 & Col3 \\ [0.5ex] 
 \hline\hline
 1 & 6 & 87837 & 787 \\ 
 \hline
 2 & 7 & 78 & 5415 \\
 \hline
 3 & 545 & 778 & 7507 \\
 \hline
 4 & 545 & 18744 & 7560 \\
 \hline
 5 & 88 & 788 & 6344 \\ [1ex] 
 \hline
 \end{tabular}
\end{center}

Output:-

image.png

How to create lists in LaTeX?

LATEX makes it very easy to generate lists. Lists can be created in a variety of list settings. Environments are parts of our content that you wish to exhibit differently from the rest of it.

They start with a \begin{...} command and end with an \end{...} command.

Complete code is,

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}

\begin{document}

List are really easy to create

\begin{itemize}
\item One entry in the list
\item Another entry in the list
\end{itemize}

\section{Unordered lists}

\begin{itemize}
\item The individual entries are indicated with a black dot, a so-called bullet.
\item The text in the entries may be of any length.
\end{itemize}

\section{Ordered lists}

\begin{enumerate}
\item The labels consists of sequential numbers.
\item The numbers starts at 1 with every call to the enumerate environment.
\end{enumerate}

\section{Nested Lists}

\begin{enumerate}
 \item The labels consists of sequential numbers.
 \begin{itemize}
 \item The individual entries are indicated with a black dot, a so-called bullet.
 \item The text in the entries may be of any length.
 \end{itemize}
 \item The numbers starts at 1 with every call to the enumerate environment.
\end{enumerate}

\section{Lists styles}

\subsection{Ordered lists}

\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}

 \renewcommand{\labelenumii}{\Roman{enumii}}
 \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}

 \begin{enumerate}
 \item First level item
 \item First level item
 \begin{enumerate}
 \setcounter{enumii}{4}
 \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}

 \subsection{Unordered lists}

 \begin{itemize}
 \item  First Level
 \begin{itemize}
 \item  Second Level
 \begin{itemize}
 \item  Third Level
 \begin{itemize}
 \item  Fourth Level
 \end{itemize}
 \end{itemize}
 \end{itemize}
 \end{itemize}

 \renewcommand{\labelitemi}{$\blacksquare$}
 \renewcommand\labelitemii{$\square$}
 \begin{itemize}
 \item  First Level
 \begin{itemize}
 \item  Second Level
 \begin{itemize}
 \item  Third Level
 \begin{itemize}
 \item  Fourth Level
 \end{itemize}
 \end{itemize}
 \end{itemize}
 \end{itemize}

\begin{itemize}
 \item  Default item label for entry one
 \item  Default item label for entry two
 \item[$\square$]  Custom item label for entry three
\end{itemize}

\end{document}

- Unordered lists

Unordered lists are produced by the itemize environment.

\begin{itemize}
\item The individual entries are indicated with a black dot, a so-called bullet.
\item The text in the entries may be of any length.
\end{itemize}

Output:-

image.png

- Ordered lists

The ordered list has the same syntax inside a different environment.

\begin{enumerate}
  \item This is the first entry in our list
  \item The list numbers increase with each entry we add
\end{enumerate}

Output:-

image.png

Downloading your finished document

Users can download your completed PDF from the left-hand menu, as seen above, by selecting PDF. The Download PDF button on your PDF viewer, as illustrated below, is also a faster option.

Output:-

image.png

Different LATEX editors

  • Open source: AUCTEX, GNU TeXmacs, Gummi, Kile, LaTeXila, MeWa, TeXShop, TeXnicCenter, Texmaker, TeXstudio, TeXworks, Overleaf.

  • Freeware: LEd, WinShell.

  • Proprietary/Shareware: Inlage, Scientific WorkPlace, WinEdt.

Thank you so much for putting up with me for so long. Cheers! I'm sure you've learned a lot about LaTeX software!

monophy.gif

Did you find this article valuable?

Support Technophile Holmes Articles by becoming a sponsor. Any amount is appreciated!