Académique Documents
Professionnel Documents
Culture Documents
Table of contents
Global structure
Creating A LATEXDocument
Page Style
Global structure
Global structure
\documentclass{...}
\begin{document}
...
\end{document}
Global structure
Preamble
Document classes
Packages
Creating A LATEXDocument
Document classes
Every input file start with the command
\documentclass{...}
article
report
book
beamer
letter
IEEEtran
Example:
\documentclass{article}
Creating A LATEXDocument
Document classes
Document classes
Paper Format
\documentclass[options]{class}
Paper Format
letterpaper
a4paper
a5paper
b5paper
legalpaper
executivepaper
Example: \documentclass[a4paper,11pt]{article}
Page format
onecolumn or twocolumn
oneside or twoside
Example: \documentclass[11pt,twocolumn,twoside]{article}
Sample programs
\documentclass[12]{article}
\begin{document}
This is my first document prepared in LATEX.
\end{document}
\documentclass[a4paper,11pt]{article}
\begin{document}
This is my first document prepared in LATEX.
\end{document}
Packages
To include graphics, colored text or source code from a file into your
document, you need to enhance the capabilities of LATEX. Such
enhancements are called packages. Some packages come with the
LATEXbase distribution.
\usepackage[options]{package}
\usepackage{package1,package2,package3}
Example:
\documentclass[11pt,a4paper]{report}
\usepackage{color}
\usepackage[margin=2cm]{geometry}
\begin{document}
...
\end{document}
Packages
Title
Abstract
Sectioning commands
Title
At the beginning of most documents there will be information about
the document itself, such as the title and date, and also information
about the authors, such as name, address, email etc.
\title{Write title here}
\author{Authors Name}
\date{\today}
Example:
\documentclass[11pt,a4paper]{report}
\usepackage[margin=2cm]{geometry}
\begin{document}
\title{How to Structure a LaTeX Document}
\author{Andrew Roberts}
\date{December 2004}
\maketitle
\end{document}
\title{Title}
\author{Author 1\\
Address line 11\\
Address line 12\\
Address line 13
\and
Author 2\\
Address line 21\\
Address line 22\\
Address line 23}
\date{Month Date, Year}
Title
Author 1
Address line 11
Address line 12
Address line 13
Author 2
Address line 21
Address line 22
Address line 23
Creating Abstract
\begin{document}
...
\begin{abstract}
content...
\end{abstract}
\tableofcontents
...
\end{document}
Sectioning Commands
\chapter{title}
\section{title}
\subsection{title}
\subsubsection{title}
Example: \chapter{Sample Chapter}
Example: \section[Results]{Results of the proposed protocol}
Line Spacing
\linespread{1.6}
or
\usepackage{setspace}
\doublespacing
Margin
\usepackage[top=2in,bottom=1in,left=1in,right=1in]{geometry}
Page Style
Page Style
Page Heading
It should always go between the \documentclass{article} and
the \begin{document} commands.
\pagestyle{empty}
\pagestyle{plain}
Page Style
Page Style
pagestyle{headings}
Page Style
Page Numbering
arabic
roman
Roman
alph
Alph
Indo-Arabic numerals
lowercase Roman numerals
upper case Roman numerals
lowercase English letters
uppercase English letters
Example: \pagenumbering{Roman}
Text Style
\textit{...} italic
\emph{text}
emphasized
\textsl{...} slanted
\textsc{...} Small Caps
\textup{...} upright
\textbf{...} boldface
\bf{}
boldface
\textrm{...} roman
\texttt{...} typewriter
Text Style
C OMMAND
\textup{upright}
\textit{italic}
\textsl{slanted}
SMALL CAP \textsc{small cap}
medium
\textmd{medium}
boldface
\textbf{boldface}
roman
\textrm{roman}
sans serif
\textsf{sans serif}
typewriter \texttt{typewriter}
FAMILY SERIES
SHAPE
STYLE
upright
italic
slanted
D ECLARATION
{\upshape upright}
{\itshape italic}
{\slshape slanted}
{\scshape small cap}
{\mdseries medium}
{\bfseries boldface}
{\rmfamily roman}
{\sffamily sans serif}
{\ttfamily typewriter}
Text Size
{\tiny size}
size
{\large size}
size
{\scriptsize size}
size
{\Large size}
size
{\footnotesize size}
size
{\small size}
size
{\normalsize size}
size
size
size
size
{\LARGE size}
{\huge size}
{\Huge size}
Special Characters
an
h
T
u!
o
kY