Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I...

110
Typesetting with L A T E X: The Basics 1 Paul Bergeron Department of Physics and Astronomy, University of Utah, Salt Lake City January 26, 2016 1 These slides will be available at http://www.physics.utah.edu/ ~ bergeron/

Transcript of Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I...

Page 1: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Typesetting with LATEX: The Basics1

Paul Bergeron

Department of Physics and Astronomy,University of Utah, Salt Lake City

January 26, 2016

1These slides will be available athttp://www.physics.utah.edu/~bergeron/

Page 2: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Further Reading

Some documentation I keep on hand:

I (general and simple): A Simplified Introduction to LATEX

I (general and technical): A Not So Short Introduction to LATEX

I (math cheat sheet): A Short Math Guide to LATEX

I A Beamer Quick Start manual

I TikZ & PGF manual

I CircuitTikZ manual

Page 3: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Why LATEX

I Designed in the 1980s by mathematicians tired of theirequations being messed up

I Word processor that gives you near complete control

I Smart, e.g no sections at the bottom of a page

I Good for papers, homework, notes, posters, talks (like thisone!), and more

I Open source – a swiss army knife who anyone can add to

I Available for any platform – Apple, Windows, or Linux

I Easy to learn with intuitive commands

I Excels at equations, figures, reference, structure, and more...

Page 4: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Why LATEX

I Designed in the 1980s by mathematicians tired of theirequations being messed up

I Word processor that gives you near complete control

I Smart, e.g no sections at the bottom of a page

I Good for papers, homework, notes, posters, talks (like thisone!), and more

I Open source – a swiss army knife who anyone can add to

I Available for any platform – Apple, Windows, or Linux

I Easy to learn with intuitive commands

I Excels at equations, figures, reference, structure, and more...

Page 5: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Why LATEX

I Designed in the 1980s by mathematicians tired of theirequations being messed up

I Word processor that gives you near complete control

I Smart, e.g no sections at the bottom of a page

I Good for papers, homework, notes, posters, talks (like thisone!), and more

I Open source – a swiss army knife who anyone can add to

I Available for any platform – Apple, Windows, or Linux

I Easy to learn with intuitive commands

I Excels at equations, figures, reference, structure, and more...

Page 6: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Why LATEX

I Designed in the 1980s by mathematicians tired of theirequations being messed up

I Word processor that gives you near complete control

I Smart, e.g no sections at the bottom of a page

I Good for papers, homework, notes, posters, talks (like thisone!), and more

I Open source – a swiss army knife who anyone can add to

I Available for any platform – Apple, Windows, or Linux

I Easy to learn with intuitive commands

I Excels at equations, figures, reference, structure, and more...

Page 7: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Why LATEX

I Designed in the 1980s by mathematicians tired of theirequations being messed up

I Word processor that gives you near complete control

I Smart, e.g no sections at the bottom of a page

I Good for papers, homework, notes, posters, talks (like thisone!), and more

I Open source – a swiss army knife who anyone can add to

I Available for any platform – Apple, Windows, or Linux

I Easy to learn with intuitive commands

I Excels at equations, figures, reference, structure, and more...

Page 8: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Why LATEX

I Designed in the 1980s by mathematicians tired of theirequations being messed up

I Word processor that gives you near complete control

I Smart, e.g no sections at the bottom of a page

I Good for papers, homework, notes, posters, talks (like thisone!), and more

I Open source – a swiss army knife who anyone can add to

I Available for any platform – Apple, Windows, or Linux

I Easy to learn with intuitive commands

I Excels at equations, figures, reference, structure, and more...

Page 9: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Why LATEX

I Designed in the 1980s by mathematicians tired of theirequations being messed up

I Word processor that gives you near complete control

I Smart, e.g no sections at the bottom of a page

I Good for papers, homework, notes, posters, talks (like thisone!), and more

I Open source – a swiss army knife who anyone can add to

I Available for any platform – Apple, Windows, or Linux

I Easy to learn with intuitive commands

I Excels at equations, figures, reference, structure, and more...

Page 10: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Why LATEX

I Designed in the 1980s by mathematicians tired of theirequations being messed up

I Word processor that gives you near complete control

I Smart, e.g no sections at the bottom of a page

I Good for papers, homework, notes, posters, talks (like thisone!), and more

I Open source – a swiss army knife who anyone can add to

I Available for any platform – Apple, Windows, or Linux

I Easy to learn with intuitive commands

I Excels at equations, figures, reference, structure, and more...

Page 11: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Why LATEX

I Designed in the 1980s by mathematicians tired of theirequations being messed up

I Word processor that gives you near complete control

I Smart, e.g no sections at the bottom of a page

I Good for papers, homework, notes, posters, talks (like thisone!), and more

I Open source – a swiss army knife who anyone can add to

I Available for any platform – Apple, Windows, or Linux

I Easy to learn with intuitive commands

I Excels at equations, figures, reference, structure, and more...

Page 12: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Why LATEX, continued

What else is it good at; some examples:

HO

OH

OH

OH

OH

O

H

L R

C

i(t)

v1(t) v2(t)

Page 13: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

How to Get LATEX

Command line always a bare-bones option.

Many GUI’s available (some cross platform).See https://latex-project.org for details

Popular ones are:

I Apple: TeXShop

I Windows: Miktex

I Linux: TeX Live

Many other distributions out there!

Page 14: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

How to Get LATEX

Command line always a bare-bones option.Many GUI’s available (some cross platform).

See https://latex-project.org for details

Popular ones are:

I Apple: TeXShop

I Windows: Miktex

I Linux: TeX Live

Many other distributions out there!

Page 15: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

How to Get LATEX

Command line always a bare-bones option.Many GUI’s available (some cross platform).

See https://latex-project.org for details

Popular ones are:

I Apple: TeXShop

I Windows: Miktex

I Linux: TeX Live

Many other distributions out there!

Page 16: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

How to Get LATEX

Command line always a bare-bones option.Many GUI’s available (some cross platform).

See https://latex-project.org for details

Popular ones are:

I Apple: TeXShop

I Windows: Miktex

I Linux: TeX Live

Many other distributions out there!

Page 17: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to includeCover page information

References to cite

Page 18: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to includeCover page information

References to cite

Page 19: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to includeCover page information

References to cite

Page 20: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to includeCover page information

References to cite

Page 21: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to includeCover page information

References to cite

Page 22: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to include

Cover page information

References to cite

Page 23: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to include

Cover page information

References to cite

Page 24: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to includeCover page information

References to cite

Page 25: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to include

Cover page information

References to cite

Page 26: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to includeCover page information

References to cite

Page 27: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to includeCover page information

References to cite

Page 28: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Like Programming, but Easier

\documentclass[options]{class}

%Comment a line by using a ‘%’

\usepackage{url}%the document can now embed web links!

\title{A Lovely Title}

\author{Your Name}

\begin{abstract}An abstract here! \end{abstract}

\begin{document}

\maketitle %This makes a cover page

We can now write up our awesome results for publication.

\begin{thebibliography}[#]

\bibitem{citation ident}

a citation to reference

\end{thebibliography}

\end{document}

Document specifications and type

Preamble (meta editing)

Where the document is written

Specify what functions to includeCover page information

References to cite

Page 29: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

documentclass

\documentclass[options]{class}

I class specifies document style – article, beamer (presentation),book, etc.

I options detail document wide formatting, e.g.I paper/font size (e.g. a4paper/11pt)I number of columns (e.g. twocolumn)I formula alignment/formula label position (fleqn/leqno)

Page 30: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

documentclass

\documentclass[options]{class}

I class specifies document style – article, beamer (presentation),book, etc.

I options detail document wide formatting, e.g.

I paper/font size (e.g. a4paper/11pt)I number of columns (e.g. twocolumn)I formula alignment/formula label position (fleqn/leqno)

Page 31: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

documentclass

\documentclass[options]{class}

I class specifies document style – article, beamer (presentation),book, etc.

I options detail document wide formatting, e.g.I paper/font size (e.g. a4paper/11pt)I number of columns (e.g. twocolumn)I formula alignment/formula label position (fleqn/leqno)

Page 32: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

documentclass, continued

Class can be used for journal formats, some possibly relevantexamples:

APS & AIP revtex4-1 options:(1) aps/api(2) journal

AAS aastex

Monthly Notices of theRoyal Astronomical Society

mnrs

American Chemical Society achemso journal options

Institute of Electircal andElectronics Engineers

ieee

*usepackage not documentclass: JCAP – jcappub

Page 33: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

usepackages

I LATEXhas many abilities, many you wont use

I To keep things manageable (for the computer), load what youwant⇒ \usepackage{}in the preamble

I Some useful ones:I xcolor – colorI graphicx – for loading pictures (esp. figures)I tikz/circuitikz – drawing diagrams (very powerful)I feynmp & chemfig – Feynman & chemical diagramsI url – embedding urlsI amsmath & amssymb – always load if doing mathI geometry – paper geometry (e.g. A4 paper)I hyperref – adds clickable links to the cross refferencesI index, nag, siunitx, multicol, todo

And many, many more!

Page 34: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

usepackages

I LATEXhas many abilities, many you wont use

I To keep things manageable (for the computer), load what youwant⇒ \usepackage{}in the preamble

I Some useful ones:I xcolor – colorI graphicx – for loading pictures (esp. figures)I tikz/circuitikz – drawing diagrams (very powerful)I feynmp & chemfig – Feynman & chemical diagramsI url – embedding urlsI amsmath & amssymb – always load if doing mathI geometry – paper geometry (e.g. A4 paper)I hyperref – adds clickable links to the cross refferencesI index, nag, siunitx, multicol, todo

And many, many more!

Page 35: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Special Characters

Used for commands, they need to be escaped

Command Character

\textbackslash \\textasciicircum ˆ\textasciitilde ˜\&\$\%\{\#\ & $ % { #\LaTeX LATEX

Page 36: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Notes on Document Structure

I comments start at ‘%’ (anywhere in a line)

I One or more whitespace = single space

I One carriage return = ignored

I Two carriage returns = new paragraph

Environments

\begin{environment name} {\environment name \environment name{...

......

\end{environment name} } }

Page 37: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Notes on Document Structure

I comments start at ‘%’ (anywhere in a line)

I One or more whitespace = single space

I One carriage return = ignored

I Two carriage returns = new paragraph

Environments

\begin{environment name} {\environment name \environment name{...

......

\end{environment name} } }

Page 38: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Notes on Document Structure

I comments start at ‘%’ (anywhere in a line)

I One or more whitespace = single space

I One carriage return = ignored

I Two carriage returns = new paragraph

Environments

\begin{environment name} {\environment name \environment name{...

......

\end{environment name} } }

Page 39: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Notes on Document Structure

I comments start at ‘%’ (anywhere in a line)

I One or more whitespace = single space

I One carriage return = ignored

I Two carriage returns = new paragraph

Environments

\begin{environment name} {\environment name \environment name{...

......

\end{environment name} } }

Page 40: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Notes on Document Structure

I comments start at ‘%’ (anywhere in a line)

I One or more whitespace = single space

I One carriage return = ignored

I Two carriage returns = new paragraph

Environments

\begin{environment name} {\environment name \environment name{...

......

\end{environment name} } }

Page 41: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Adding Structure

I \vspace{-1mm}, \hspace{10pt}– vertical/horizontal spacing

I \bigskip, \medskip, \smallskip– vertical spacing

I \section{title}, \section*{title}– Numbered and unnumbered

I similarly \subsection{title}, \subsection*{title}I table of contents, indexes, and appendices also available

I margins are customizable

I individual page styles

Page 42: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Adding Structure

I \vspace{-1mm}, \hspace{10pt}– vertical/horizontal spacing

I \bigskip, \medskip, \smallskip– vertical spacing

I \section{title}, \section*{title}– Numbered and unnumbered

I similarly \subsection{title}, \subsection*{title}I table of contents, indexes, and appendices also available

I margins are customizable

I individual page styles

Page 43: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Adding Structure

I \vspace{-1mm}, \hspace{10pt}– vertical/horizontal spacing

I \bigskip, \medskip, \smallskip– vertical spacing

I \section{title}, \section*{title}– Numbered and unnumbered

I similarly \subsection{title}, \subsection*{title}I table of contents, indexes, and appendices also available

I margins are customizable

I individual page styles

Page 44: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Adding Structure

I \vspace{-1mm}, \hspace{10pt}– vertical/horizontal spacing

I \bigskip, \medskip, \smallskip– vertical spacing

I \section{title}, \section*{title}– Numbered and unnumbered

I similarly \subsection{title}, \subsection*{title}

I table of contents, indexes, and appendices also available

I margins are customizable

I individual page styles

Page 45: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Adding Structure

I \vspace{-1mm}, \hspace{10pt}– vertical/horizontal spacing

I \bigskip, \medskip, \smallskip– vertical spacing

I \section{title}, \section*{title}– Numbered and unnumbered

I similarly \subsection{title}, \subsection*{title}I table of contents, indexes, and appendices also available

I margins are customizable

I individual page styles

Page 46: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Adding Structure

I \vspace{-1mm}, \hspace{10pt}– vertical/horizontal spacing

I \bigskip, \medskip, \smallskip– vertical spacing

I \section{title}, \section*{title}– Numbered and unnumbered

I similarly \subsection{title}, \subsection*{title}I table of contents, indexes, and appendices also available

I margins are customizable

I individual page styles

Page 47: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Lists

\begin{itemize}\item A bulleted item

\begin{itemize}

and

\begin{enumerate}\item A bulleted item

\begin{enumerate}

Each can be nested and the styles changed (more preamblecommands)

Page 48: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Figures

\begin{figure}[options]\centering

\includegraphics[scale=#]{path to image}\caption{Below the caption or above, but always before the

label}\label{fig:name}\end{figure}

Options: h,t,b,p,!subfigures and side captions possible (needs usepackage)

Page 49: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Figures

\begin{figure}[options]\centering

\includegraphics[scale=#]{path to image}\caption{Below the caption or above, but always before the

label}\label{fig:name}\end{figure}

Options: h,t,b,p,!

subfigures and side captions possible (needs usepackage)

Page 50: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Figures

\begin{figure}[options]\centering

\includegraphics[scale=#]{path to image}\caption{Below the caption or above, but always before the

label}\label{fig:name}\end{figure}

Options: h,t,b,p,!subfigures and side captions possible (needs usepackage)

Page 51: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Figures

Figure 1 : here’s a caption above the figure!

Page 52: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Tables and Tabular

Tabular creates the table itself,Table wraps it like the Figure environment

\begin{table}\centering

\begin{tabular}{` | c r ||}\hline\hline

left & center & right \\ \hline

second & row & \\ \hline

line before & the row & below

\end{tabular}\end{table}

Page 53: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Tables and Tabular

Tabular creates the table itself,Table wraps it like the Figure environment

\begin{table}\centering

\begin{tabular}{` | c r ||}\hline\hline

left & center & right \\ \hline

second & row & \\ \hline

line before & the row & below

\end{tabular}\end{table}

Page 54: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Tables and Tabular

left center right

second row

line before the row below

Tabular environments can be nested for more detail

Page 55: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Tables and Tabular

left center right

second row

line before the row below

Tabular environments can be nested for more detail

Page 56: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Math Mode

Time for equations, like E = γmc2, which display inline; try:

blah blah blah $math$ blah blah blah

But some equations should be displayed on their own, like:

E 2 = m2c4 + p2c2

which are displayed by using:

\[math\]

Page 57: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Math Mode

Time for equations, like E = γmc2, which display inline; try:

blah blah blah $math$ blah blah blah

But some equations should be displayed on their own, like:

E 2 = m2c4 + p2c2

which are displayed by using:

\[math\]

Page 58: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Environments – Math Mode

Time for equations, like E = γmc2, which display inline; try:

blah blah blah $math$ blah blah blah

But some equations should be displayed on their own, like:

E 2 = m2c4 + p2c2

which are displayed by using:

\[math\]

Page 59: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode Commands

Many commands and intrinsic functions, keeping intuitive names

I White spaces are ignored, pad with \,, \:, or \;

I return to text mode with \text{. . .}I Greek letters are simple: \gamma, γ; \Gamma

I xˆ{ab} {cd} ⇒ xabcdxˆab cd ⇒ xabcd

I \cdot: · \circ: ◦ \pm: ± \infty: ∞ \ell: `

Tip: math mode allows for extra flexibility of text modee.g. “ ‘Degrees Celsius’ is written as ◦C”

Page 60: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode Commands

Many commands and intrinsic functions, keeping intuitive names

I White spaces are ignored, pad with \,, \:, or \;I return to text mode with \text{. . .}

I Greek letters are simple: \gamma, γ; \Gamma

I xˆ{ab} {cd} ⇒ xabcdxˆab cd ⇒ xabcd

I \cdot: · \circ: ◦ \pm: ± \infty: ∞ \ell: `

Tip: math mode allows for extra flexibility of text modee.g. “ ‘Degrees Celsius’ is written as ◦C”

Page 61: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode Commands

Many commands and intrinsic functions, keeping intuitive names

I White spaces are ignored, pad with \,, \:, or \;I return to text mode with \text{. . .}I Greek letters are simple: \gamma, γ; \Gamma

I xˆ{ab} {cd} ⇒ xabcdxˆab cd ⇒ xabcd

I \cdot: · \circ: ◦ \pm: ± \infty: ∞ \ell: `

Tip: math mode allows for extra flexibility of text modee.g. “ ‘Degrees Celsius’ is written as ◦C”

Page 62: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode Commands

Many commands and intrinsic functions, keeping intuitive names

I White spaces are ignored, pad with \,, \:, or \;I return to text mode with \text{. . .}I Greek letters are simple: \gamma, γ; \Gamma

I xˆ{ab} {cd} ⇒ xabcdxˆab cd ⇒ xabcd

I \cdot: · \circ: ◦ \pm: ± \infty: ∞ \ell: `

Tip: math mode allows for extra flexibility of text modee.g. “ ‘Degrees Celsius’ is written as ◦C”

Page 63: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode Commands

Many commands and intrinsic functions, keeping intuitive names

I White spaces are ignored, pad with \,, \:, or \;I return to text mode with \text{. . .}I Greek letters are simple: \gamma, γ; \Gamma

I xˆ{ab} {cd} ⇒ xabcdxˆab cd ⇒ xabcd

I \cdot: · \circ: ◦ \pm: ± \infty: ∞ \ell: `

Tip: math mode allows for extra flexibility of text modee.g. “ ‘Degrees Celsius’ is written as ◦C”

Page 64: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode Commands

Many commands and intrinsic functions, keeping intuitive names

I White spaces are ignored, pad with \,, \:, or \;I return to text mode with \text{. . .}I Greek letters are simple: \gamma, γ; \Gamma

I xˆ{ab} {cd} ⇒ xabcdxˆab cd ⇒ xabcd

I \cdot: · \circ: ◦ \pm: ± \infty: ∞ \ell: `

Tip: math mode allows for extra flexibility of text modee.g. “ ‘Degrees Celsius’ is written as ◦C”

Page 65: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode Commands, continued

I \sqrt{. . .}: √...I \frac{numerator}{denominator}: numerator

denominator

I escape italicization: \cos\ln: cos ln

I \int\sum:∫ ∑

I force inline style: \textstyle{}, e.g.∫ ba

∑∞n

I force display style: \displaystyle{}, e.g.

∫ b

a

∞∑n

Much more not shown!

Page 66: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Equations

Works like \[ \], but numbers the equation

\begin{equation}equation here!\end{equation}

E.g.: Gauß-Bonnet:∫MKdA +

∫∂M

kgds = 2πχ(M) (1)

The numbering can be disabled, set the environment as:equaiton*

Page 67: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Equations

Works like \[ \], but numbers the equation

\begin{equation}equation here!\end{equation}

E.g.: Gauß-Bonnet:∫MKdA +

∫∂M

kgds = 2πχ(M) (1)

The numbering can be disabled, set the environment as:equaiton*

Page 68: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Equations

Works like \[ \], but numbers the equation

\begin{equation}equation here!\end{equation}

E.g.: Gauß-Bonnet:∫MKdA +

∫∂M

kgds = 2πχ(M) (1)

The numbering can be disabled, set the environment as:equaiton*

Page 69: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode: align

I Used for series or system of equations

I Like \equation{}, but with newlines \\I & marks where each line should be aligned

I Each line gets a number

~∇× ~E = − ∂~B

∂t(2)∮

∂S

~E · d ~=

∫S

∂~B

∂t· d~s (3)

Page 70: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode: align

I Used for series or system of equations

I Like \equation{}, but with newlines \\

I & marks where each line should be aligned

I Each line gets a number

~∇× ~E = − ∂~B

∂t(2)∮

∂S

~E · d ~=

∫S

∂~B

∂t· d~s (3)

Page 71: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode: align

I Used for series or system of equations

I Like \equation{}, but with newlines \\I & marks where each line should be aligned

I Each line gets a number

~∇× ~E = − ∂~B

∂t(2)∮

∂S

~E · d ~=

∫S

∂~B

∂t· d~s (3)

Page 72: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode: align

I Used for series or system of equations

I Like \equation{}, but with newlines \\I & marks where each line should be aligned

I Each line gets a number

~∇× ~E = − ∂~B

∂t(2)∮

∂S

~E · d ~=

∫S

∂~B

∂t· d~s (3)

Page 73: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Math Mode: align

I Used for series or system of equations

I Like \equation{}, but with newlines \\I & marks where each line should be aligned

I Each line gets a number

~∇× ~E = − ∂~B

∂t(2)∮

∂S

~E · d ~=

∫S

∂~B

∂t· d~s (3)

Page 74: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Possibilities

v r (p)v s(p) =[ηr†√p · σ −ηr†√p · σ

]γ0[ √

p · σηs−√p · σηs

]...

= − 2ηr†√

(p0)2 − (pi )2 ηs

F = −kBT ln

∑U

g(U)e−βU︸ ︷︷ ︸

Partition Function, Z

Ym`` (θ, φ) = (−1)m`

√(2`+ 1

4π· `−m`

`+ m`

)Pm`` (cos(θ)) e−im`φ

∀` ∈ N0, m` ∈ Z`

Page 75: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Possibilities

v r (p)v s(p) =[ηr†√p · σ −ηr†√p · σ

]γ0[ √

p · σηs−√p · σηs

]...

= − 2ηr†√

(p0)2 − (pi )2 ηs

F = −kBT ln

∑U

g(U)e−βU︸ ︷︷ ︸

Partition Function, Z

Ym`` (θ, φ) = (−1)m`

√(2`+ 1

4π· `−m`

`+ m`

)Pm`` (cos(θ)) e−im`φ

∀` ∈ N0, m` ∈ Z`

Page 76: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Possibilities

v r (p)v s(p) =[ηr†√p · σ −ηr†√p · σ

]γ0[ √

p · σηs−√p · σηs

]...

= − 2ηr†√

(p0)2 − (pi )2 ηs

F = −kBT ln

∑U

g(U)e−βU︸ ︷︷ ︸

Partition Function, Z

Ym`` (θ, φ) = (−1)m`

√(2`+ 1

4π· `−m`

`+ m`

)Pm`` (cos(θ)) e−im`φ

∀` ∈ N0, m` ∈ Z`

Page 77: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Cross Referencing

I LATEXallows for easy citation and referencing, e.g.:Figures label: \label{fig:name}, and reference as\ref{fig:name}

“My Bryce Canyon picture can be seen in Figure 1

I Note: compile at least twice for cross references

I equations (after the environment declaration) can be givenlabels, too.

I user defined “handles” to keep track, e.g. “name”

I counters for LATEXto keep track, e.g. “fig”

I Some handles are defined by default (fig,tab,eq)

I User can create their own labels

Page 78: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Cross Referencing

I LATEXallows for easy citation and referencing, e.g.:Figures label: \label{fig:name}, and reference as\ref{fig:name}“My Bryce Canyon picture can be seen in Figure 1

I Note: compile at least twice for cross references

I equations (after the environment declaration) can be givenlabels, too.

I user defined “handles” to keep track, e.g. “name”

I counters for LATEXto keep track, e.g. “fig”

I Some handles are defined by default (fig,tab,eq)

I User can create their own labels

Page 79: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Cross Referencing

I LATEXallows for easy citation and referencing, e.g.:Figures label: \label{fig:name}, and reference as\ref{fig:name}“My Bryce Canyon picture can be seen in Figure 1

I Note: compile at least twice for cross references

I equations (after the environment declaration) can be givenlabels, too.

I user defined “handles” to keep track, e.g. “name”

I counters for LATEXto keep track, e.g. “fig”

I Some handles are defined by default (fig,tab,eq)

I User can create their own labels

Page 80: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Cross Referencing

I LATEXallows for easy citation and referencing, e.g.:Figures label: \label{fig:name}, and reference as\ref{fig:name}“My Bryce Canyon picture can be seen in Figure 1

I Note: compile at least twice for cross references

I equations (after the environment declaration) can be givenlabels, too.

I user defined “handles” to keep track, e.g. “name”

I counters for LATEXto keep track, e.g. “fig”

I Some handles are defined by default (fig,tab,eq)

I User can create their own labels

Page 81: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Cross Referencing

I LATEXallows for easy citation and referencing, e.g.:Figures label: \label{fig:name}, and reference as\ref{fig:name}“My Bryce Canyon picture can be seen in Figure 1

I Note: compile at least twice for cross references

I equations (after the environment declaration) can be givenlabels, too.

I user defined “handles” to keep track, e.g. “name”

I counters for LATEXto keep track, e.g. “fig”

I Some handles are defined by default (fig,tab,eq)

I User can create their own labels

Page 82: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Cross Referencing

I LATEXallows for easy citation and referencing, e.g.:Figures label: \label{fig:name}, and reference as\ref{fig:name}“My Bryce Canyon picture can be seen in Figure 1

I Note: compile at least twice for cross references

I equations (after the environment declaration) can be givenlabels, too.

I user defined “handles” to keep track, e.g. “name”

I counters for LATEXto keep track, e.g. “fig”

I Some handles are defined by default (fig,tab,eq)

I User can create their own labels

Page 83: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Cross Referencing

I LATEXallows for easy citation and referencing, e.g.:Figures label: \label{fig:name}, and reference as\ref{fig:name}“My Bryce Canyon picture can be seen in Figure 1

I Note: compile at least twice for cross references

I equations (after the environment declaration) can be givenlabels, too.

I user defined “handles” to keep track, e.g. “name”

I counters for LATEXto keep track, e.g. “fig”

I Some handles are defined by default (fig,tab,eq)

I User can create their own labels

Page 84: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

thebibliography

... which follows from Reference˜\cite{CitationHandle}.\begin{thebibiography}[6] %LaTeX expects 6 refs. max\bibitem{CitationHandle}

P. Bergeron,“A Paper I Wrote”arXiv:##### [made up subfield]

\end{thebibliography}

I We can cite the reference with \cite{CitationHandle}I ˜: conjoining space

“Reference” and the citation number(great for numbers and units, too)

Page 85: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

thebibliography

... which follows from Reference˜\cite{CitationHandle}.\begin{thebibiography}[6] %LaTeX expects 6 refs. max\bibitem{CitationHandle}

P. Bergeron,“A Paper I Wrote”arXiv:##### [made up subfield]

\end{thebibliography}

I We can cite the reference with \cite{CitationHandle}

I ˜: conjoining space“Reference” and the citation number(great for numbers and units, too)

Page 86: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

thebibliography

... which follows from Reference˜\cite{CitationHandle}.\begin{thebibiography}[6] %LaTeX expects 6 refs. max\bibitem{CitationHandle}

P. Bergeron,“A Paper I Wrote”arXiv:##### [made up subfield]

\end{thebibliography}

I We can cite the reference with \cite{CitationHandle}I ˜: conjoining space

“Reference” and the citation number(great for numbers and units, too)

Page 87: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Beamer – Presenting with LATEX

Notes

Splits document into “frames”

by using \pause frames are split into slides

Each slide is a page

Themes

Many default themes exist

All can be edited

this one is the Copenhagen Theme

Functionality

Can hide elements

Can include presenter notes

Used to make posters

Even embed videos!

Page 88: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Beamer – Presenting with LATEX

Notes

Splits document into “frames”

by using \pause frames are split into slides

Each slide is a page

Themes

Many default themes exist

All can be edited

this one is the Copenhagen Theme

Functionality

Can hide elements

Can include presenter notes

Used to make posters

Even embed videos!

Page 89: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Beamer – Presenting with LATEX

Notes

Splits document into “frames”

by using \pause frames are split into slides

Each slide is a page

Themes

Many default themes exist

All can be edited

this one is the Copenhagen Theme

Functionality

Can hide elements

Can include presenter notes

Used to make posters

Even embed videos!

Page 90: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ – Drawing with LATEX

I Uses an coordinate system, manipulates objects

I Complicated... but extremely powerful

I Looping is possible, allows graphing

I circuitikz

I use \includegraphicsinside tikz: draw on images

I Seriously – extremely powerful

Page 91: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ – Drawing with LATEX

I Uses an coordinate system, manipulates objects

I Complicated... but extremely powerful

I Looping is possible, allows graphing

I circuitikz

I use \includegraphicsinside tikz: draw on images

I Seriously – extremely powerful

Page 92: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ – Drawing with LATEX

I Uses an coordinate system, manipulates objects

I Complicated... but extremely powerful

I Looping is possible, allows graphing

I circuitikz

I use \includegraphicsinside tikz: draw on images

I Seriously – extremely powerful

Page 93: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ – Drawing with LATEX

I Uses an coordinate system, manipulates objects

I Complicated... but extremely powerful

I Looping is possible, allows graphing

I circuitikz

I use \includegraphicsinside tikz: draw on images

I Seriously – extremely powerful

Page 94: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ – Drawing with LATEX

I Uses an coordinate system, manipulates objects

I Complicated... but extremely powerful

I Looping is possible, allows graphing

I circuitikz

I use \includegraphicsinside tikz: draw on images

I Seriously – extremely powerful

Page 95: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ – Drawing with LATEX

I Uses an coordinate system, manipulates objects

I Complicated... but extremely powerful

I Looping is possible, allows graphing

I circuitikz

I use \includegraphicsinside tikz: draw on images

I Seriously – extremely powerful

Page 96: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ example from the manual

ComputationalComplexity

Compu-tationalProblems

ProblemMeasures

ProblemAspects

ProblemDomains

KeyProblems

Compu-tationalModels

TuringMachines

Random-Access

MachinesCircuits

BinaryDecisionDiagrams

OracleMachines

Program-ming inLogic

MeasuringCom-

plexity

ComplexityMeasures

ClassifyingComplexity

ComparingComplexity

DescribingComplexity

SolvingProblems

ExactAlgorithms

Random-ization

Fixed-ParameterAlgorithms

ParallelCompu-tation

PartialSolutions

Approx-imation

April 20091

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

May 20091

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

June 20091

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

Lecture 1: ComputationalProblems

– Knowledge of several key problems– Knowledge of problem encodings– Being able to formalize problems

Computational Problems

Lecture 2: Computational Models

– Knowledge of Turing machines– Being able to compare the

computational power of differentmodels

Computational Models

83

Page 97: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ Example: Silicon PN-JunctionsTikZ and Beamer

– – – – + + +

+ + – –

– – – – + + +

+ + – –

+ + –

+ + –

I Start with a block of silicon

I Dope half with acceptor states, half with donor states

I Opposite charges can combine at the interface

I Region is no longer neutral ⇒ E-field (depletion region)

I Charges appearing here will get swept one way, holes the other

I A current forms that can be detected!

I The bigger the region the stronger the field ⇒ larger signal!

Page 98: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ Example: Silicon PN-JunctionsTikZ and Beamer

– – – – + + +

+ + – –

– – – – + + +

+ + – –

+ + –

+ + –

I Start with a block of silicon

I Dope half with acceptor states, half with donor states

I Opposite charges can combine at the interface

I Region is no longer neutral ⇒ E-field (depletion region)

I Charges appearing here will get swept one way, holes the other

I A current forms that can be detected!

I The bigger the region the stronger the field ⇒ larger signal!

Page 99: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ Example: Silicon PN-JunctionsTikZ and Beamer

– – – – + + +

+ + – –

– – – – + + +

+ + – –

+ + –

+ + –

I Start with a block of silicon

I Dope half with acceptor states, half with donor states

I Opposite charges can combine at the interface

I Region is no longer neutral ⇒ E-field (depletion region)

I Charges appearing here will get swept one way, holes the other

I A current forms that can be detected!

I The bigger the region the stronger the field ⇒ larger signal!

Page 100: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ Example: Silicon PN-JunctionsTikZ and Beamer

– – – – + + +

+ + – –

– – – – + + +

+ + – –

+ + –

+ + –

I Start with a block of silicon

I Dope half with acceptor states, half with donor states

I Opposite charges can combine at the interface

I Region is no longer neutral ⇒ E-field (depletion region)

I Charges appearing here will get swept one way, holes the other

I A current forms that can be detected!

I The bigger the region the stronger the field ⇒ larger signal!

Page 101: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ Example: Silicon PN-JunctionsTikZ and Beamer

– – – – + + +

+ + – –

– – – – + + +

+ + – –

+ + –

+ + –

I Start with a block of silicon

I Dope half with acceptor states, half with donor states

I Opposite charges can combine at the interface

I Region is no longer neutral ⇒ E-field (depletion region)

I Charges appearing here will get swept one way, holes the other

I A current forms that can be detected!

I The bigger the region the stronger the field ⇒ larger signal!

Page 102: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ Example: Silicon PN-JunctionsTikZ and Beamer

– – – – + + +

+ + – –

– – – – + + +

+ + – –

+ + –

+ + –

I Start with a block of silicon

I Dope half with acceptor states, half with donor states

I Opposite charges can combine at the interface

I Region is no longer neutral ⇒ E-field (depletion region)

I Charges appearing here will get swept one way, holes the other

I A current forms that can be detected!

I The bigger the region the stronger the field ⇒ larger signal!

Page 103: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

TikZ Example: Silicon PN-JunctionsTikZ and Beamer

– – – – + + +

+ + – –

– – – – + + +

+ + – –

+ + –

+ + –

I Start with a block of silicon

I Dope half with acceptor states, half with donor states

I Opposite charges can combine at the interface

I Region is no longer neutral ⇒ E-field (depletion region)

I Charges appearing here will get swept one way, holes the other

I A current forms that can be detected!

I The bigger the region the stronger the field ⇒ larger signal!

Page 104: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Miscellaneous

I backticks/apostrophes for beginning/ending quotations marks

I diacritic marks and other characters supported (ß, c, e, u,)

I create your own macros (commands): \newcommandthese can take argument(s)!

I \footnote{}2I \include{}/\input{}– great for long documents

I page number customizations: setting page counter,arabic/latin numerals, removing numbers

I Multiple compilations of long documents may throw errorsmemory issue; delete auxiliary files to fix

2

You can customize the footnote symbols

Page 105: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Miscellaneous

I backticks/apostrophes for beginning/ending quotations marks

I diacritic marks and other characters supported (ß, c, e, u,)

I create your own macros (commands): \newcommandthese can take argument(s)!

I \footnote{}2I \include{}/\input{}– great for long documents

I page number customizations: setting page counter,arabic/latin numerals, removing numbers

I Multiple compilations of long documents may throw errorsmemory issue; delete auxiliary files to fix

2

You can customize the footnote symbols

Page 106: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Miscellaneous

I backticks/apostrophes for beginning/ending quotations marks

I diacritic marks and other characters supported (ß, c, e, u,)

I create your own macros (commands): \newcommandthese can take argument(s)!

I \footnote{}2I \include{}/\input{}– great for long documents

I page number customizations: setting page counter,arabic/latin numerals, removing numbers

I Multiple compilations of long documents may throw errorsmemory issue; delete auxiliary files to fix

2

You can customize the footnote symbols

Page 107: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Miscellaneous

I backticks/apostrophes for beginning/ending quotations marks

I diacritic marks and other characters supported (ß, c, e, u,)

I create your own macros (commands): \newcommandthese can take argument(s)!

I \footnote{}2

I \include{}/\input{}– great for long documents

I page number customizations: setting page counter,arabic/latin numerals, removing numbers

I Multiple compilations of long documents may throw errorsmemory issue; delete auxiliary files to fix

2You can customize the footnote symbols

Page 108: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Miscellaneous

I backticks/apostrophes for beginning/ending quotations marks

I diacritic marks and other characters supported (ß, c, e, u,)

I create your own macros (commands): \newcommandthese can take argument(s)!

I \footnote{}2I \include{}/\input{}– great for long documents

I page number customizations: setting page counter,arabic/latin numerals, removing numbers

I Multiple compilations of long documents may throw errorsmemory issue; delete auxiliary files to fix

2You can customize the footnote symbols

Page 109: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Miscellaneous

I backticks/apostrophes for beginning/ending quotations marks

I diacritic marks and other characters supported (ß, c, e, u,)

I create your own macros (commands): \newcommandthese can take argument(s)!

I \footnote{}2I \include{}/\input{}– great for long documents

I page number customizations: setting page counter,arabic/latin numerals, removing numbers

I Multiple compilations of long documents may throw errorsmemory issue; delete auxiliary files to fix

2You can customize the footnote symbols

Page 110: Typesetting with LATEX: The Basics1bergeron/Introduction_Latex.pdf · 2016. 11. 2. · Why LATEX I Designed in the 1980s by mathematicians tired of their equations being messed up

Miscellaneous

I backticks/apostrophes for beginning/ending quotations marks

I diacritic marks and other characters supported (ß, c, e, u,)

I create your own macros (commands): \newcommandthese can take argument(s)!

I \footnote{}2I \include{}/\input{}– great for long documents

I page number customizations: setting page counter,arabic/latin numerals, removing numbers

I Multiple compilations of long documents may throw errorsmemory issue; delete auxiliary files to fix

2You can customize the footnote symbols