Intro Latex PDF
Intro Latex PDF
Intro Latex PDF
Kalpant Pathak
What is LaTeX?
Kalpant Pathak
History
Kalpant Pathak
Downloads
Kalpant Pathak
Recommended programs
MAC PC
Kalpant Pathak
LaTeX Wikibook
Kalpant Pathak
General Structure of a
File
Every LaTeX file begins with \documentclass{...}
article, book, report etc. are example of different
document class.
This begins a section called the “preamble”, which
contains global instructions for the file.
\usepackage{...} commands and others are placed
here.
After the preamble, the body of the text begins
with \begin{document}.
At the end of the file is \end{document}.
Kalpant Pathak
[...] vs. {...}
[...] contains an optional argument.
{...} contains a required argument.
Eg:
\documentclass[a4paper,12pt,oneside]{article}
\usepackage[margin=1in]{geometry}
Kalpant Pathak
Caution !!
Kalpant Pathak
Preamble
After %, LaTeX ignores the rest of the
line (comments).
\documentclass{article} causes LaTeX
to format the text as an article with
set formatting rules.
\usepackage{...} specifies an
exception or addition to the set
formatting rules. Multiple packages
can be used.
Kalpant Pathak
Body: Top Matter
\begin{document}
\title{...}
\author{...}
\date{...} (Put % in front of it to suppress.)
\maketitle (Title and name appear here.)
\end{document}
Kalpant Pathak
Abstract
\documentclass{article}
\begin{document}
\begin{abstract}
...
\end{abstract}
\end{document}
Kalpant Pathak
Sectioning
\section{...}
\subsection{...}
\subsubsection{...}
Kalpant Pathak
Bibliography
Manual bibliography
Automated bibliography (BibTeX)
Kalpant Pathak
Manual Bibliography
\begin{thebibliography}{99}
\bibitem{proakis_book}
J. G. Proakis, \emph{Digital Communications.}
McGraw-Hill, 4th ed., 2001.
\end{thebibliography}
Kalpant Pathak
\begin{thebibliography}{99}
Place this command at the place where you
want the bibliography to begin.
Use “99” if you have more than 9 references
but fewer than 100.
Use “9” if you have fewer than 10
references.
Kalpant Pathak
\bibitem{proakis_book}
Kalpant Pathak
Type all your references, beginning each one
with the \bibitem code.
Kalpant Pathak
Footnotes
Numbering is automatic.
Kalpant Pathak
Bulleted Lists
Kalpant Pathak
Numbered Lists
Kalpant Pathak
Ellipsis
Kalpant Pathak
Page breaks
Kalpant Pathak
Graphics
Import a graphics file with:
\includegraphics[width=...cm]{filename}
Kalpant Pathak
Math example
Kalpant Pathak
Kalpant Pathak
Typesetting Equations
Different equation environments are
available:
equation
eqnarray
align
multline
These environments put the equations in a
separate line and centered.
eqnarray, align and multline are used for
multiple line equations.
Kalpant Pathak
Example: (1)
Kalpant Pathak
To split equations in multiple lines, newline
command ‘\\’ is used.
To align multiple lines is equation, ‘&’ is used
Eg:
\begin{align}
x(t)&= y(t) \nonumber \\
&=z^2(t)
\end{align}
(2)
Kalpant Pathak
Bibliography using .bib file
Bibliography can be added using .bib file.
@BOOK{proakis_book,
author= "J. G. Proakis",
title="Digital Communications",
publisher="McGraw-Hill",
edition="4th",
year="2001"}
@ARTICLE{brennan,
author="D. G. Brennan",
title="Linear diversity combining techniques",
journal="Proc. IRE",
volume="47",
pages="1075--1102",
month="June",
year="1959"}
To add references, keywords are used, i.e. to refer the
book ‘Proakis’ we have to write “\cite{proakis_book}”.
The references are ordered in the pdf file according to
their order of occurrence in .tex file instead of their
order in .bib file.
Non-cited references are not displayed in .pdf.
.bib file is called as follows:
\bibliographystyle{ieeetr}
\renewcommand{\bibname}{References}
\bibliography{references}
First line shows the bibliography display style.
Second line is used to rename the heading to ‘References’
(by default it is ‘Bibliography’)
Third line includes the .bib file, which is saved as
“references.bib”
Kalpant Pathak
The output turns out to be:
[1] J. G. Proakis, Digital Communications. McGraw-Hill,
4th ed., 2001.
[2] D. G. Brennan, “Linear diversity combining
techniques,” Proc. IRE, vol. 47, pp. 1075-1102, June
1959.
Kalpant Pathak
THANK YOU
Kalpant Pathak