Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to...

45
Introduction to L A T E X Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting Making it Look Nice Structure Math Mode Figures and Tables Macros Beamer Conclusion Introduction to L A T E X IAP 2014 Megan Belzner [email protected] Student Information Processing Board Massachusetts Institute of Technology

Transcript of Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to...

Page 1: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Introduction to LATEXIAP 2014

Megan [email protected]

Student Information Processing Board

Massachusetts Institute of Technology

Page 2: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Table of Contents

Introduction

A Basic DocumentWriting LaTeX CodeBasic Formatting

Making it Look NiceStructureMath ModeFigures and TablesMacros

Beamer

Conclusion

Page 3: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

LATEX is. . .

. . . a sophisticated document preparation sytem.

LATEX has. . .

I Stylistic uniformity

I Bibliography support

I Sophisticated structuring abilities

I Reference tracking

I Highly extendible capabilities

Page 4: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

LATEX is not. . .

. . . a word processor.

LATEX does not. . .

I Spell-check your documents

I Give you complete control over formatting

I Provide a graphical interface for editing

“You take care of writing, and we’ll take care ofpresentation.”

Page 5: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

A Brief History

It all started with Donald Knuth and The Art of ComputerProgramming. . .

I TEX - a computer language used for typesetting mathand other technical material.

I Created in the late 1970s by Donald Knuth

I LATEX - a higher-level method of accessing the power ofTEX

I Created in the early 1980s by Leslie Lamport

LATEX is pronounced lah-tech or lay-tech.

Page 6: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Why LATEX?

Presentation shouldn’t get in the way of content.

For example. . .

I With a word processor, you spend valuable time agonizingover what font size to make the section headings.

I With LATEX, you just tell it to start a new section.

I With a word processor, changing the formatting means youhave to change each instance individually.

I With LATEX, you just redefine the relevant commands.

I With a word processor, you have to carefully match anyprovided templates.

I With LATEX, you can be sure you’ve fit the template, andswitch templates easily.

Page 7: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Table of Contents

Introduction

A Basic DocumentWriting LaTeX CodeBasic Formatting

Making it Look NiceStructureMath ModeFigures and TablesMacros

Beamer

Conclusion

Page 8: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

”Hello LATEX!”

Creating a LATEX Document

I Write a .tex file using any text editor

% this is hello.tex

\documentclass{article}\begin{document}

Hello, \LaTeX!\end{document}

I Compile using latex or pdflatex$ cd path/to/folder/containing/file

$ pdflatex hello.tex

I Preview the results

$ evince hello.pdf &

Page 9: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

documentclass

LATEX has several templates, selected using \documentclass

Classes:

I book

I report

I article

I letter

I beamer

Etc.

Page 10: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Declarations and Environments

Declarations. . .

I Are stated once

I Take effect until further notice

I Can optionally be constrained

Ex. \documentclass, \small

Environments. . .

I Have matching begin and end declarations

I Must be constrained

Ex. \begin{document} ...\end{document}

Page 11: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Arguments

Required arguments. . .

I Are contained in curly braces

I Must be included

Ex. \documentclass{article}

Optional arguments. . .

I Are contained in square brackets

I Can be left out

I Give you more control over the commands

Ex. \documentclass[12pt]{article}

Page 12: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Special Characters

I Another type of command

I Don’t define any formatting or structure

I Print non-standard characters or characters whichusually mean something else

Ex. \LaTeX, \textbackslash, \&

Page 13: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Packages

Packages allow you to further customize LATEX.

The command:\usepackage{name}

Some packages:

graphicx, epsfig, geometry, fancyhdr, setspace, amsmath,listings, xcolor, url. . .

Page 14: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Font Types

Font face:\emph{Text}, \textbf{Text}, \texttt{Text},\textrm{Text}, \textsf{Text}, \textsc{Text}

Font size:{\tiny Text}, {\scriptsize Text}, {\footnotesize Text},{\small Text}, {\normalsize Text}, {\large Text},{\Large Text}, {\LARGE Text}, {\hugeText},{\HugeText}Alignment:

\begin{center/flushright/flushleft}...

\end{center/flushright/flushleft}

Page 15: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Spacing

MarginsThe default: between 1.5 inches and 1.875 inches

Setting margins: \usepackage[margin=0.5in]{geometry}

Paragraphs and other breaksParagraphs are separated by a blank line.You can force a new line using \\To force a new page, use \newpage or \clearpage

Other spacingForce a space using ∼Add space using \hspace{1in} or \vspace{1in}Fill space using \hfill or \vfill

Page 16: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Lists

There are two main types. . .

Bulleted lists:\begin{itemize}\item Text\item Text

\end{itemize}

I Text

I Text

Numbered lists:\begin{enumerate}\item Text\item Text

\end{enumerate}

1. Text

2. Text

Page 17: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Table of Contents

Introduction

A Basic DocumentWriting LaTeX CodeBasic Formatting

Making it Look NiceStructureMath ModeFigures and TablesMacros

Beamer

Conclusion

Page 18: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Getting Started

Downloadhttp://web.mit.edu/belzner/Public/latex/scigen.zip

and open scigen.tex in your favorite text editor

% this is scigen.tex

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

...

\end{document}

Page 19: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Title

I Declare the title, author, and date

\documentclass[12pt]{article}\title{The Effect of Wearable Technology}\author{John Doe and Jane Doe}\date{}

I Add the title page\begin{document}\maketitle

Page 20: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Sections

LATEX is built off of the idea of structure over formatting

\section{Introduction}

Layers of sectioning

part (books only)chapter (books and reports only)

sectionsubsection

subsubsection

paragraph

subparagraph

Page 21: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Abstract and ToC

Abstracts\begin{abstract}

The implications of secure methodologies...

\end{abstract}

Table of Contents\end{abstract}

\tableofcontents

Page 22: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

References and Appendices

Footnotes...telephony\footnote{Phony telephones}

Bibliographies

\bibliography{scigen}\bibliographystyle{acm}

Appendices

\appendix\section{Appendix}

Page 23: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Bibliographies

BibTEX@Article{cite:0,

Author = {John Backus},Title = {Symmetric Encryption},Journal = {Journal of Modalities},Month = jul,

Year = 1993,

Volume = 46,

Pages = {44--57}}

CitationsRedundancy \cite{cite:0}

For multiple citations:

...methodology \cite{cite:1, cite:2}

Page 24: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Typesetting Math

LATEX allows you to typeset any sort of equations.

LATEX math support∫ b

a

1 + θ2= tan−1 b − tan−1 a

Using math mode

Inline math mode: $...$∫∞1 e−xdx

∑∞n=0 n!

Display math mode: $$...$$

Numbered equations: \begin{equation}...\end{equation}A useful package: \usepackage{amsmath}

Page 25: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Some Commands

974 974

4 + 2 4+23√

5 \sqrt[3]{5}xy \frac{x}{y}

Axy A^{x} {y}∑n

k=1 k \sum {k=1}^n k

2 6= 4 2 \ne 4

φ ∈ Ψ \phi \in \Psiı̂× ̂ = k̂ \hat{\i} \times \hat{\j} = \hat{k}

f ′′(ξ) f’’(\xi)CH3COOH CH$ 3$COOH

180◦C 180$^{\circ}$C

...runs in $\Theta(\log n)$ time...

Page 26: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Figures and Tables

Both are environments:

Figures

\begin{figure}...

\end{figure}

Tables\begin{table}

...

\end{table}

Positioning can be defined as an optional argument:\begin{figure}[htbp]

Page 27: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

includegraphics

Required Packages\documentclass[12pt]{article}

\usepackage{graphicx}

The Commands\subsection{Hardware Configuration}

\begin{figure}[ht]\centering\includegraphics[width=3in]{figure0.jpg}

\end{figure}

Page 28: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Formatting Tables

The table environment defines the figure style. Thetabular environment defines the table itself.

The Commands\section{Related Work}

\begin{table}[ht]\centering\begin{tabular}{|r||c|c|} \hline\textbf{Trial} & $n$ & $t$ \\ \hline\textbf{1} & 23 & 2 \\ \hline\textbf{2} & 15 & 10 \\ \hline\textbf{3} & 100 & 20 \\ \hline

\end{tabular}\end{table}

Page 29: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Captions and Labels

Captioning

\end{tabular}\caption{The data.}

Labeling

\caption{The data.}\label{tab:label0}

Referencing

...in Table \ref{tab:label0}

Page 30: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

What are Macros?

I LATEX allows you to define or redefine commands as youplease

I In fact, LATEX itself is a set of macros on top of TEX

\newcommand{name}[num]{definition}

Page 31: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Resetting Commands

Changing lengths

\setlength{command}{length}

Ex.\setlength{\parindent}{1cm}\setlength{\parskip}{1cm plus4mm minus3mm}

Changing titles

Ex.\renewcommand{\abstractname}{Summary}

Page 32: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Adding Commands

AbbreviationsCode:

\newcommand{\MIT}{the Massachusetts Institute of Technology}The mission of \MIT∼is to advance knowledge...

Output:The mission of the Massachusetts Institute of Technology is to

advance knowledge. . .

Getting more complex

Ex.\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

Page 33: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Table of Contents

Introduction

A Basic DocumentWriting LaTeX CodeBasic Formatting

Making it Look NiceStructureMath ModeFigures and TablesMacros

Beamer

Conclusion

Page 34: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Slides

Beamer allows all the same commands as a normalLATEX document, plus some.

Getting started\documentclass{beamer}\begin{document}

\begin{frame}{Title}...

\end{frame}

Special slides

Title slide:\titlepage

Table of contents:\tableofcontents[currentsection]

Page 35: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Formatting

Some special environments can be useful for presentations

Blocks\begin{block}

...

\end{block}

Columns\begin{columns}\column{0.5\textwidth}

Column 1

\column{0.5\textwidth}Column 2

\end{columns}

Page 36: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Animation

You can also do some basic animation in beamer.

I \pause puts a pause before revealing the rest of theslide

I command<num-num> makes the command apply onlyfor some number of the “frames”

I The previous bullet is defined by \item<3-4>I The bullet disappears after the fourth “frame”

Page 37: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Animation

You can also do some basic animation in beamer.

I \pause puts a pause before revealing the rest of theslide

I command<num-num> makes the command apply onlyfor some number of the “frames”

I The previous bullet is defined by \item<3-4>I The bullet disappears after the fourth “frame”

Page 38: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Animation

You can also do some basic animation in beamer.

I \pause puts a pause before revealing the rest of theslide

I command<num-num> makes the command apply onlyfor some number of the “frames”

I The previous bullet is defined by \item<3-4>I The bullet disappears after the fourth “frame”

Page 39: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Animation

You can also do some basic animation in beamer.

I \pause puts a pause before revealing the rest of theslide

I command<num-num> makes the command apply onlyfor some number of the “frames”

I The previous bullet is defined by \item<3-4>

I The bullet disappears after the fourth “frame”

Page 40: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Animation

You can also do some basic animation in beamer.

I \pause puts a pause before revealing the rest of theslide

I command<num-num> makes the command apply onlyfor some number of the “frames”

I The previous bullet is defined by \item<3-4>I The bullet disappears after the fourth “frame”

Page 41: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Themes

You can also choose different themes for beamer.

Design

\usetheme{theme}Antibes, Berkeley, Berlin, Goettingen, Malmoe, Szeged,Warsaw. . .

Color\usecolortheme{theme}

beaver, crane, lily, rose, seahorse, whale. . .

Page 42: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Table of Contents

Introduction

A Basic DocumentWriting LaTeX CodeBasic Formatting

Making it Look NiceStructureMath ModeFigures and TablesMacros

Beamer

Conclusion

Page 43: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

So, why LATEX?

I LATEX allows you to worry about the content and thestructure, rather than the presentation.

I LATEX has one of the most advanced math typesettingsystems around.

I LATEX is incredibly extendible.

I LATEX keeps track of references so you don’t have to.

I LATEX allows you to make more consistent, and moreeasily changeable, documents.

Page 44: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

LATEX on your own

Get LATEX on your own computer:

WindowsMiKTEX

miktex.org/

Mac OS XMacTEX

tug.org/mactex/

LinuxTEX Live

tug.org/texlive/

Page 45: Introduction Introduction to LTEXweb.mit.edu/belzner/Public/latex/sipb-latex.pdf · Introduction to LATEX Megan Belzner Introduction A Basic Document Writing LaTeX Code Basic Formatting

Introduction toLATEX

Megan Belzner

Introduction

A Basic Document

Writing LaTeX Code

Basic Formatting

Making it LookNice

Structure

Math Mode

Figures and Tables

Macros

Beamer

Conclusion

Resources

I The Not So Short Introduction to LATEX 2ε:www.ctan.org/tex-archive/info/lshort/english/

lshort.pdf

I LATEX Wikibooks:en.wikibooks.org/wiki/LaTeX

I A Short Math Guide for LATEX:ftp://ftp.ams.org/pub/tex/doc/amsmath/

short-math-guide.pdf