Académique Documents
Professionnel Documents
Culture Documents
created by
Donald E Knuth
Donald E Knuth
(born January 10, 1938)
Professor Emeritus of the Art of Computer Programming
At Stanford University
Volume 1 - Fundamental Algorithms
Chapter 1 - Basic concepts
Chapter 2 - Information structures
Avoiding orphans and widows
An orphaned line, highlighted in yellow,
appearing at the bottom of a page.
A widowed line, highlighted in yellow,
appearing at the top of a page.
Writing guides, such as the Chicago
Manual of Style, suggest that a
manuscript should have no widows and
orphans even when avoiding them
results in additional space at the bottom
of a page or column.
Type‐setting : some issues
Inter‐letter spacing
Inter‐word spacing
Inter‐line spacing
Spacing in mathematics
Type‐setting : some issues
Hyphenation : For e.g. , consider the‐
rapist for therapist.
Leslie Lamport, the creator of LaTeX
• LaTeX pronounced as Lah‐tek, or Lay‐tek
• A typesetting program, not a word‐
processor
• Current version : LaTeX2ε
• Designed for producing beautiful books,
theses, papers, articles...
• De facto standard for writing academic
papers
• Based on TeX
LaTeX is a document preparation system
for high‐quality typesetting.
It is most often used for medium‐to‐large
technical or scientific documents.
It can be used for almost any form of
publishing.
LaTeX is not a word processor!
LaTeX encourages authors
not to worry about the appearance
of their documents
but to worry about content.
A test document to learn LaTeX
V N Krishnachandran
19 February 2010
Hello world!
To create a document like the one above …
\documentclass{article}
\title{A test document to learn LaTeX}
\author{V N Krishnachandran}
\date{19 February 2010}
\begin{document}
\maketitle
Hello world!
\end{document}
Create a text file like the one above and compile…
This document is an article.
Its title is A test document to learn LaTeX.
Its author is V N Krishnachandran.
It was written in 19 February 2010.
The document consists of a title followed by the
text Hello world!
What the text file means …
How To Run LaTeX
• Create a text file with extension .tex, say
myfile.tex
• Compile myfile : latex myfile.tex
This makes a file with extension .dvi
• View the dvi file : xdvi myfile.dvi
: yap myfile
• Dvi ‐‐> PostScript : dvips myfile.dvi
This creates a file with extension .ps
• View PostScript : gv myfile (UNIX)
: Use gsview
pdfLaTeX
An extension of TeX which can be configured
to directly generate PDF documents instead
of DVI. All current TeX distributions including
TeX live, MacTeX and MiKTeX include pdfTeX
(Plain TeX) and pdfLaTeX (LaTeX).
Features
Typesetting journal articles, technical reports,
books, and slide presentations.
Control over large documents containing
sectioning, cross‐references, tables and figures.
Typesetting of complex mathematical formulas.
Features
Automatic generation of bibliographies and
indexes.
Multi‐lingual typesetting.
Inclusion of artwork, and process or spot
colour.
Sample commands
Document Class
\documentclass[options]{class}
options = a4paper,
11pt, 12pt, 10pt,
twocolumn, landscape,...
class = article, report, book,...
Sample commands
Start with \begin{document}
End with \end{document}
Typesetting Text
\\ or \newline and \newpage
Bold \textbf{……………} or \bf
Italics \emph{…………} or \textit{………} or \it
Underline \underline{…………} or \ul
Sample commands
Sections
\section{…} = 1. Latex is Great
\subsection{…} = 1.1 Why Great
\subsubsection{…} = 1.1.1 Reason One
\chapter{…} ‐ To be used with book and report
Titles, authors and footnotes
\title{…}
\author{…}
\footnote{…}
\maketitle Display Title and Author
\tableofcontents Generates TOC
Sample commands
Numbered listing
\begin{enumerate}
\item Apple
\item Orange
\end{enumerate}
Sample commands
Font sizes
\tiny \scriptsize \footnotesize
Mathematical expressions ….
Sample commands
\begin{center}
$$
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}
$$ \\
\end{center}
Text in input file…
Happy TeXing …