0% found this document useful (0 votes)
37 views

My Latex

This document provides an overview of LaTeX, a document preparation system for high-quality typesetting. It discusses that LaTeX is a document markup language that uses tags and commands to control formatting rather than a WYSIWYG interface. The document then demonstrates how to write a basic LaTeX document, including adding sections, figures, tables, equations, and citations. It also discusses including multiple chapters from separate files in the main LaTeX file.

Uploaded by

Kiran Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

My Latex

This document provides an overview of LaTeX, a document preparation system for high-quality typesetting. It discusses that LaTeX is a document markup language that uses tags and commands to control formatting rather than a WYSIWYG interface. The document then demonstrates how to write a basic LaTeX document, including adding sections, figures, tables, equations, and citations. It also discusses including multiple chapters from separate files in the main LaTeX file.

Uploaded by

Kiran Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 40

Research Tools:

LaTex
A high quality document preparation system

by

Kiran
Assistant professor
Dept. of ECE
GMIT, Mandya
I am not an expert
 I am still a beginner
I am not an expert
 I am still a beginner
 Many people know much more about this
than me!
I am not an expert
 I am still a beginner
 Many people know much more about this
than me!
 Everyone has their way of doing this
What is LaTeX?

 TEX is a document programming language, created to


typeset documents attractively and consistently

 Today widely used for publications


 You can't see the final result straight away.
 Everything is controlled with written commands.
The document is written in a self-chosen text editor
and saved in a .tex-file.

LATEX converts .tex-file into a .pdf-file.


Advantages:
 The layout, fonts, tables etc. are consistent
throughout.
 Mathematical formulae can be easily typeset.
 Indexes, footnotes and references are generated
easily.
Why use LaTeX?
 It looks pretty (compare with MS Word)
 If you want to write articles you "need"
to use LaTeX
 If you want to write a thesis you "need"
to use LaTeX anyway
Why use LaTeX?
 It looks pretty (compare with MS Word)
 If you want to write articles you "need"
to use LaTeX
 If you want to write a thesis you "need"
to use LaTeX anyway
 It is free (compare with M$)
You need
 A computer with Windows (or Linux or
another operating system)
 LaTeX iteself
- there are many versions
 Editor (where you type the "code")
 A program to view pdf-files (and maybe
ps-files)
Writing a document in Latex
Comments or notes
Example.tex

Predefined classes like article,


% Comments report, letter or book

\documentclass [options] {style}


Options within a class such as
\begin {document} Paper size, font size etc
.
. The document begins here
.
Body of the document
\end {document} The document ends here
Writing a document in Latex

Example.tex

% This is an example.tex

\documentclass {article}

\begin {document}

This is a test

\end {document}
Writing a document in Latex
Title, author
Example.tex

% This is an example.tex

\documentclass [12pt]{article}

\begin {document}

\title {This is an example}


\author {James Bond}
\maketitle

\end {document}
Writing a document in Latex
Font size \tiny to \Huge
Example.tex
% This is an example.tex

\documentclass [12pt]{article}

\begin {document}
This is a test \\
\small {This is a test}\\
\Large {This is a test}\\
\Huge {This is a test}\\

\end {document}
Writing a document in Latex
Section and Subsection
Example.tex

% This is an example.tex

\documentclass [12pt]{article}
\begin {document}
\title {This is an example}
\author {James Bond}
\maketitle

\section {Introduction}
\subsection {Experiment}

\end {document}
Mathematical Equations

x = \frac{-b \pm \sqrt{b^2-4ac} } {2a}


Writing a document in Latex
Example.tex Equations
\documentclass [12pt]{article}
\begin {document}
\title {This is an example} Math commands S_n - subscript
\author {James Bond} S^n - superscript
\maketitle
\section {Introduction}
\begin {equation}
g_{ \gamma_{n}}(t) =
\frac{1}{ \sqrt{s_{n}}}\;g(\frac{t-p_{n}}{s_{n}})\,\exp\left\{j(2\pi f_{n}t+\phi_{n})\right\},
\label {eq1}
\end {equation}
\end {document}
Writing a document in Latex
Figures
Example.tex
% This is an example.tex

\documentclass [12pt]{article}
\usepackage { graphicx}
\begin {document}

\begin {figure}

\includegraphics[width=3.5in]{bird.png}
\caption {Sample Figure.}
\label {fig1}
\end {figure}

\end {document}
Writing a document in Latex
Example.tex
Table
% This is an example.tex

\documentclass [12pt]{article}
\usepackage { graphicx}
\begin {documen}

\begin {table}
\centering
\begin {tabular}{|c|c|c|c|c|} \hline
Method &Groups & Normal & Abnormal & Total \\ \hline

LR & Normal & 40 & 11 & 51\\


& Abnormal & 17 & 22 & 39 \\\hline
\% & Normal & \bf{78.4} & 21.6 & 100 \\
& Abnormal & 43.6 & \bf {56.4} & 100 \\\hline
\end {tabular}
\caption {Sample Table}
\label {tab1}
\end {table}
\end {document}
Writing a document in Latex
References within a document
Example.tex
% This is an example.tex
\documentclass [12pt]{article}

\begin {document}
\section {Introduction}
\label {intro}

This is section on Introduction.

\subsection {experiment}
\label {exp}

This is an example subsection.


Please refer Section.\ref {intro} for
introduction. Refer Section \ref {exp}

\end {document}

Very easy to manage all the references in long documents


Writing a document in Latex
Citing other works
Example.tex
% This is an example.tex
\documentclass [12pt]{article}
\bibliographystyle {IEEEtran}
\begin {document}
\section {Introduction}
\label {intro}

This is section on Introduction.

\subsection {experiment}
\label {exp}

This is an example subsection. This


work is based on the
MP algorithm \cite {mallat2}

\bibliography {bibfile}
\end {document}
How to insert Header and Footer for the report
Report document style
(main.tex)
\documentclass{report}
\title{Assignment 2 for SIMG726}
\author{Rolando V. Raque\~no}
\begin{document}
\maketitle
\tableofcontents

\end{document}
Create the following chapters
chapter_sum.tex
chapter_mean.tex
chapter_sd.tex
chapter_mean.tex
\chapter{Mean} \label{C:Mean}
\begin{equation}
\label{E:mean}
\bar{x} =
\frac{\sum_{i=1}^{n}x_{i}}
{n}
\end{equation}
chapter_sum.tex
\chapter{Sum} \label{C:Sum}
\begin{equation}
\label{E:sum}
s = \sum_{i=1}^{n}x_{i}
\end{equation}
chapter_sd.tex
\chapter{Standard
Deviation} \label{C:SD}
\begin{equation}
\label{E:sd}
\sigma =
\sqrt{\frac{\sum\limits
_{i=1}^{n}
\left(x_{i} -
\bar{x}\right)^{2}}
{n-1}}
\end{equation}
Modify main.tex to include chapters

\documentclass{report}
\title{Assignment 2 for SIMG726}
\author{Rolando V. Raque\~no}
\begin{document}
\maketitle
\tableofcontents
\include{chapter_sum}
\include{chapter_mean}
\include{chapter_sd}
\end{document}
Writing a document in Latex
Let us put
everything together
- \title
-\author
-\section
-\subsection
- \section
- \subsection
- figure
-Table
- \ref
- \cite
- \documentclass
-\begin
- \end
- \maketitle
Class, Style files in Latex
\usepackage{conf.sty} & \documentclass{journ.cls}

Double column
and IEEE trans.
standard
Happy (Latex) ing !

Questions !

Thank you !

You might also like