Scientific Document Preparation using
Faculty Name :Mr. Bhavesh B. Digey
Introduction to LATEX
TeX is essentially a Markup Language (like HTML, XML
and RTF)
TeX written by Donald Knuth in 70s
A revolution in typesetting
Latex is an extension of TeX
Macro packages to make TeX easier to use
2
LATEX vs. Word Processors
Professional typesetting
It is the standard for scientific documents
Easy to include math formulae & symbols.
Minimizes the drudgery of formatting, numbering, and
referencing
Good for large documents
Where to get LaTeX & Editor??
One version good for starters is MikTeX. Get it here:
[Link]
WinEdT: [Link]
PDF-viewer
Adobe reader (free, slow, heavy):
[Link]
Foxit reader (free, fast, light):
[Link]
hp
LATEX Process
TeX is a typesetter
You write and TeX will place it on the page
TeX
LaTeX
2
The Process
Write the .tex file in the editor
The program LaTeX creates a .dvi file
You can view this .dvi file Or can create a .ps or .pdf file
.tex --> .dvi --> .ps or .pdf
Parts of a LaTeX Document: \documentclass
{article}
\documentclass {report} Basic Classes
{book}
{letter}
First line of all LaTeX documents
Specifies the type of the document
Parts of a LaTeX Document: Environment
Start with \begin{. . .}
End with \end{. . .}
\begin{document}
\begin{equation}
\end{equation}
\end{document}
Sections
\chapter{Introduction}
\section{Section Title}
\subsection{Title}
\subsubsection{Title}
Sum Equation Example
\begin{document}
\begin{equation}
\label{E:sum}
s = \sum_{i=1}^{n}x_{i}
\end{equation}
\end{document}
Math Formulae
x = \frac{-b \pm \sqrt{b^2-4ac} } {2a}
Sum of Squares Equation Example
\begin{document}
\begin{equation}
\label{E:sum_squares}
s2 = \sum_{i=1}^{n}x_{i}^{2}
\end{equation}
\end{document}
Mean Equation Example
\begin{document}
\begin{equation} \label{E:mean}
\bar{x} = \frac{\sum_{i=1}^{n}x_{i}} {n}
\end{equation}
\end{document}
Variance Equation Example
\documentclass{article}
\begin{document}
\begin{equation} \label{E:variance}
\sigma^{2} = \frac{\sum\limits_{i=1}^{n}
\left(x_{i} - \bar{x}\right)^{2}}
{n-1}
\end{equation}
\end{document}
Some Math Formulae
\begin{center}
{\large
$$ y=\frac{a^3+2c_{x}}{1+\sqrt{b_{x}}} $$ \\
\vspace{0.2in}
$$
Q=\sum_{i=1}^{j}\int_{\mu}^{\infty}f(x_{j}
)dx $$ \\
\vspace{0.2in}
$$ \Psi = \oint_{-
\infty}^{\infty}f_{xy}({\frac{\partial
Qx}{\partial Qy}})^{\Im_{\pi}^ \prime} $$ \\ }
Output Formats
.dvi Device Independent
.ps Post Script
.pdf PDF
.rtf Rich Text Format
.html HTML
.xml XML
1
Including image graphics
Use epsfig package
\usepackage{epsfig}
Including images in main body
\epsfig{file=[Link], width=10cm,
height=9cm, angle=90}
Creating EPS - Use xv and/or xfig.
MS Power Point, save as GIF and convert to EPS.
Including image graphics into LaTeX document
Need to convert your image graphics into EPS
(encapsulated postscript).
For images, use pnmtops, e.g.
% pnmtops [Link] > [Link]
Need to include an extension package to LaTeX called
graphics using command
\usepackage{graphics}
Image Graphics Example
\usepackage{graphics}
\begin{document}
\begin{figure}
\includegraphics{[Link]}
\caption{This is My Cat}
\label{F:MyCat}
\end{figure}
\end{document}
Including Table in Latex
\begin {table}[ht]
\caption {Calculation Table}
\label{tab:title}
\begin{center}
\begin{tabular}{|l|r|c|} \hline
Date & Price & Size \\ \hline
Yesterday & 5 & big \\ \hline
Today & 3 & small \\ \hline
\end{tabular}
\end{center}
\end{table}
21
Final Words: Try LATEX
You have already taken your first step by attending this
session.
Latex is optimal for thesis
Mathematical formulae are easy.
Enjoy writing with LaTeX.
Spread the joy of using LaTeX.
Thank You
24
25