SW Exp 11
SW Exp 11
1
What is LaTex?
LATEX is a tool used to create
professional-looking documents.
It is based on the WYSIWYM (what you
see is what you mean) idea.
Meaning you only have focus on the
contents of your document and the
computer will take care of the formatting.
2
Why learn LATEX?
Used all over the world for scientific
documents, books, as well as many other
forms of publishing.
Not only can it create beautifully typeset
documents, but it allows users to very
quickly tackle the more complicated parts
of typesetting, such as
inputting mathematics,
creating tables of contents,
referencing and creating bibliographies
consistent layout across all sections.
3
Why learn LATEX?
One of the most important reasons people
use LATEX is that it separates the
content of the document from the style.
Means that once you have written the
content of your document, you can change
its appearance with ease.
Similarly, you can create one style of
document.
Scientific journals to create templates for
submissions.
4
Why learn LATEX?
These templates have a pre-made layout
meaning that only the content needs to be
added.
There are hundreds of templates available
for everything from CVs to slideshows.
5
Content
Basic of LaTex
title, author and date
comments
Bold, italics and underlining
lists
Images
Tables
Math Equation
6
Basic of LaTex
\documentclass{article}
\begin{document}
First document. This is a simple example,
with no extra parameters or packages
included.
\end{document}
7
Basic of LaTex
\documentclass[12pt,letterpaper]{article}
\usepackage[utf8]{inputenc}
\begin{document}
First document. This is a simple example.
\end{document}
8
Title, author and date
\title{First document}
\author{Hubert Farnsworth}
\date{December 2021}
9
Title, author and date
\documentclass[12pt, letterpaper,
twoside]{article}
\usepackage[utf8]{inputenc}
\title{First document}
\author{Bhargav Dave}
\date{December 2021}
\begin{document}
\maketitle
We have now added a title, author and
date to our first document!
\end{document}
10
Comment
Comment will start with %
Comment content will not be printed in
the document.
11
Bold, italics and underlining
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.
12
Lists
Unordered lists
Item1
Item2
Item3
Ordered lists
1. Item1
2. Item2
3. Item3
13
Unordered lists
\begin{itemize}
\item Item1
\item Item2
\end{itemize}
14
Ordered lists
\begin{enumerate}
\item Item1
\item Item2
\end{enumerate}
15
Images
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[h]
\centering
\includegraphics[scale=0.25]{Image1}
\caption{Image1}
\label{fig:Image1}
\end{figure}
\end{document} 16
Parameter Position
h Place the float here,
i.e., approximately at the same point it
occurs in the source text (however,
not exactly at the spot)
t Position at the top of the page.
17
Tables
\begin{tabel}
\begin{tabular}{ c c c }
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9
\end{tabular}
\end{tabel}
18
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\caption{Table to test captions and labels}
\label{table:data}
\end{center} 19
Math
For inline mode equation use one of
these delimiters: \( ... \), $ ... $ or
\begin{equation} ... \end{equation}.
$E=mc^2$
\[ E=mc^2 \]
\begin{equation}
E=m
\end{equation} 20
Math
Subscripts
a_b
Superscripts
a^b
Integrals
\int
Fractions
\frac{a}{b}
21
Basic Formatting
Paragraphs
Press Enter Key two time.
New Line
\\ or the \newline command.
22
Basic Formatting
Chapters and Sections
\chapter{First Chapter}
\section{Introduction}
\subsection{subsection}
\subsubsection{subsubsection}
23
Table of Contents
\tableofcontents
24