DOCUMENT
PREPARATION USING
LATEX
(DAY 1)
Presented By
Dr. Sarika S
Asso.Professor
Department of Computer
Science
NIMIT Pongam
“COMING TOGETHER IS A
BEGINNING;KEEPING
TOGETHER IS
PROGRESS;WORKING
TOGETHER IS SUCCESS”
• - Edward Everett Hale
Contents
●Introduction
●Platforms
●Basic formatting commands
●Sectioning
●Columns and Line Spacing
●Bullets and Numbering
●Equations and Numbering
What is LaTeX?
●LaTeX is a free software package created in
1985 by the American computer scientist
Leslie Lamport as an addition to the TeX
typesetting system.
• LaTeX is pronounced “lay-tech” or “lah-tech,”
not “la-teks.”
• LaTeX is a document preparation system for
high-quality typesetting.
• LaTeX is most often used to produce technical
4
Why use LaTeX?
• Designed for academics and easily
accommodates academic use.
• Professionally crafted predefined layouts
make a document really look as if “printed.”
• Mathematical symbols and equations are
easily integrated.
• Even complex structures such as footnotes,
references, table of contents, and
bibliographies can be generated easily.
• Creates more beautiful documents.
• Portable, compatible, flexible, versatile, and
5
cheap (or free)!
Advantages
• Small files
• Cross platform compatibility
• Easy to make templates
• Free
6
7
www.overleaf.com
8
9
10
11
12
13
Basic Document Structure
● The format of a document is pretty simple.
○ Preamble
■Documentclass(article,book,report)
■Packages
■Title/author
○ Body
■Contents
14
Basic Layout of a LATEX document
● Preamble part
\documentclass{article}
\title{My first document}
\date{14-07-2022}
\author{John Abraham}
• Document part
\begin{document}
\maketitle
Hello World!
\end{document}
15
Sections and Paragraphs
•LaTeX uses the commands \section, \subsection and
\subsubsection to define sections in your document
•The sections will have successive numbers and appear in the table of
contents
•Paragraphs are not numbered and thus don’t appear in the table of
contents
\section{} \begin{abstract}
\subsection{}
\subsubsection{} \end{abstract}
\par
\paragraph{}
16
Bold,Italic,Underline
● Italicized text
\textit{accident}
● Bold face
\textbf
● Underline
\underline{science}
● Emphasize text
\emph{science}
17
Bullet and Numbering
● \begin{enumerate}-----Ordered lists
\item {Mango}
\item {Apple}
\item {Orange}
\end{enumerate}
● \begin{itemize}-----Unordered lists
\item {Mango}
\item {Apple}
\item {Orange}
18
\end{itemize}
Paragraph-Alignment and Indentation
Centering
● \begin{center}
● \end{center}
Left Alignment
● \begin{flushleft}
● \end{flushleft}
Right Alignment
● \begin{flushright}
19 ● \end{flushright}
Paragraph-Alignment and Indentation
Paragraph Indentation
● \setlength{\parindent}{3cm}
Horizontal blank spaces
● \hspace{1cm} or \hfill
Vertical blank spaces
● \vspace{5mm} or \vfill
20
Columns and Linespacing
● Columns
\usepackage{multicol}
\begin{document}
\begin{multicols}{2}
\end{multicols}
\end{document} \documentclass[11pt,twocolumn]
{article}
● Linespacing
\usepackage{setspace}
\singlespacing
\doublespacing
21
\onehalfspacing
Columns and Linespacing
● Linespacing
\usepackage{setspace}
\setstretch{2.5}\\custom line space
\begin{spacing}{2.5}\\ defining spacing environment
\blindtext[20]
\end{spacing}
22
Changing font size(Globally and locally)
\Huge
\huge
\LARGE
\Large
\large
\normalsize
\small
\footnotesize
\scriptsize
\tiny
\begin{Huge}
Good Morning
\end {Huge}
23
Changing font types
24
Changing font types
25
Changing font types
\documentclass{article}
\usepackage[T1]fontenc
\usepackage{tgbonum}
\begin{document}
\fontfamily {qcr}\selectfont This text uses a different font typeface
\end{document}
26
Math and Equations
•LaTeX is a powerful tool to typeset math
•Displaymath and equation environment is used to
typeset one formula
2 modes: Inline Math mode and Display Math mode
1)Formulas that are part of a paragraph…..for eg: it is defined
as $E=MC^2$
2)Not a part of paragraph
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{displaymath}
x^2 +2x+ 6 = 0
\end{displaymath}
27
Math and Equations
•LaTeX is a powerful tool to typeset math
•Displaymath and equation environment is used to
typeset one formula
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
x^2 +2x+ 6 = 0
\end{equation}
\end{document}
28
Math and Equations
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
f(x) &= x^2\\
g(x) &= \frac{1}{x}\\
F(x) &= \int^a_b \frac{1}{3}x^3
\end{align*}
\end{document}
29
ACC ESS TO FI L ES
1. https://www.overleaf.com/learn/Kb/Creating_a_document_in_Overleaf
2. https://www.overleaf.com/learn/Paragraphs_and_new_lines
3. https://www.overleaf.com/learn/Bold,_italics_and_underlining
4. https://www.overleaf.com/learn/latex/Sections_and_chapters#Numbe
red_and_unnumbered_sections
5. https://www.overleaf.com/learn/Multiple_columns
6. https://www.overleaf.com/learn/Page_size_and_margins
7. https://www.overleaf.com/learn/Multiple_columns
8. https://www.overleaf.com/learn/Font_sizes,_families,_and_styles
9. https://www.overleaf.com/learn/Text_alignment
10.https://www.overleaf.com/learn/Headers_and_footers
11.https://www.overleaf.com/learn/Page_numbering
12.https://www.overleaf.com/learn/Paragraph_formatting
13.https://www.overleaf.com/learn/Sections_and_chapters
14.https://www.overleaf.com/learn/Using_colours_in_LaTeX
30 15.https://www.overleaf.com/learn/latex/Beamer#The_title_page
ACC ESS TO FI L ES
●https://www.overleaf.com/learn/latex/mathematical_expressions
●https://www.overleaf.com/learn/latex/tables
●https://www.overleaf.com/learn/latex/bibliography_management_in_lat
ex
●https://www.overleaf.com/learn/latex/code_listing
31
32