LaTeX Introduction to Latex Jimmy Broomfield University of - - PowerPoint PPT Presentation

latex
SMART_READER_LITE
LIVE PREVIEW

LaTeX Introduction to Latex Jimmy Broomfield University of - - PowerPoint PPT Presentation

THIS IS AN INTRODUCTION TO LaTeX Introduction to Latex Jimmy Broomfield University of Minnesota , November 7, 2016 1 / 22 Jimmy Broomfield Introduction to LaTeX 1/22 Outline Introduction Installation Getting Started Basic


slide-1
SLIDE 1

THIS IS AN

INTRODUCTION TO

LaTeX

Introduction to Latex

Jimmy Broomfield

University of Minnesota, November 7, 2016

Jimmy Broomfield Introduction to LaTeX 1/22

1/22

slide-2
SLIDE 2

Outline

  • Introduction
  • Installation
  • Getting Started
  • Basic Commands
  • Mathematics
  • Graphics
  • Tables
  • User Defined Commands
  • Bibliographies

Jimmy Broomfield Introduction to LaTeX 2/22

2/22

slide-3
SLIDE 3

Introduction

Why L

A

T EX?

  • Typography is the art of text arrangement and design,

whereas typesetting is the “process” of applying typographic elements to text in an artful way.

  • Latex was created by scientist to give a way to typeset scientific
  • writing. This gives a way to beautifully typeset mathematics.
  • Latex can be used to create articles, books, presentations,

resumes/cvs, etc.

Jimmy Broomfield Introduction to LaTeX 3/22

3/22

slide-4
SLIDE 4

Introduction

Why L

A

T EX?

  • Typography is the art of text arrangement and design,

whereas typesetting is the “process” of applying typographic elements to text in an artful way.

  • Latex was created by scientist to give a way to typeset scientific
  • writing. This gives a way to beautifully typeset mathematics.
  • Latex can be used to create articles, books, presentations,

resumes/cvs, etc.

Jimmy Broomfield Introduction to LaTeX 3/22

3/22

slide-5
SLIDE 5

Introduction

Why L

A

T EX?

  • Typography is the art of text arrangement and design,

whereas typesetting is the “process” of applying typographic elements to text in an artful way.

  • Latex was created by scientist to give a way to typeset scientific
  • writing. This gives a way to beautifully typeset mathematics.
  • Latex can be used to create articles, books, presentations,

resumes/cvs, etc.

Jimmy Broomfield Introduction to LaTeX 3/22

3/22

slide-6
SLIDE 6

Introduction

Word vs L

A

T EX

Jimmy Broomfield Introduction to LaTeX 4/22

4/22

slide-7
SLIDE 7

Installation

Installing L

AT

EX

Windows

Miktex/TexWorks will have to be installed by the user.

Mac OS

MacTeX comes pre-installed.

Linux

Will come pre-installed with your distro.

Online

If you prefer to not install L

A

T EX, you can use overleaf.com or sharelatex.com.

Jimmy Broomfield Introduction to LaTeX 5/22

5/22

slide-8
SLIDE 8

Installation

Installing L

AT

EX

Windows

Miktex/TexWorks will have to be installed by the user.

Mac OS

MacTeX comes pre-installed.

Linux

Will come pre-installed with your distro.

Online

If you prefer to not install L

A

T EX, you can use overleaf.com or sharelatex.com.

Jimmy Broomfield Introduction to LaTeX 5/22

5/22

slide-9
SLIDE 9

Installation

Installing L

AT

EX

Windows

Miktex/TexWorks will have to be installed by the user.

Mac OS

MacTeX comes pre-installed.

Linux

Will come pre-installed with your distro.

Online

If you prefer to not install L

A

T EX, you can use overleaf.com or sharelatex.com.

Jimmy Broomfield Introduction to LaTeX 5/22

5/22

slide-10
SLIDE 10

Installation

Installing L

AT

EX

Windows

Miktex/TexWorks will have to be installed by the user.

Mac OS

MacTeX comes pre-installed.

Linux

Will come pre-installed with your distro.

Online

If you prefer to not install L

A

T EX, you can use overleaf.com or sharelatex.com.

Jimmy Broomfield Introduction to LaTeX 5/22

5/22

slide-11
SLIDE 11

Your First Document

The basics

\documentclass{article} \begin{document} Hello world! \end{document}

Jimmy Broomfield Introduction to LaTeX 6/22

6/22

slide-12
SLIDE 12

Your First Document

A little more

\documentclass{article} \begin{document} \section{Introduction} This is and introduction to the article! \section{Section} This is a section! \subsection{Subsection} This is a subsection! \subsubsection{Subsubsection} This is as far as it goes for sections \end{document}

Jimmy Broomfield Introduction to LaTeX 7/22

7/22

slide-13
SLIDE 13

Caution

Characters and Spaces

Special Characters

\# , \$ , \% , \ˆ , \& , \_ , \{ , \} , \˜ , \textbackslash , \LaTeX

Horizontal Space

\, \; \. \hspace{}, \phantom{1cm}, \indent, \noindent, \quad, \qquad, \hfill

Vertical Space

\\, \newline, \vpsace{1cm}, \ \\, \newpage, \vfill

Jimmy Broomfield Introduction to LaTeX 8/22

8/22

slide-14
SLIDE 14

Exercise

Using Special Characters and Spacing

Use L

A

T EXto produce the following text.

Jimmy Broomfield Introduction to LaTeX 9/22

9/22

slide-15
SLIDE 15

Basic Commands

Changes to Font

  • Bold Font is produced by using \textbf{ }
  • Italic Font is produced by using \emph{ }
  • Italic Font can also be produced by using \textit{ }
  • Underlined text is produced by using \underline{ }
  • Code like def f(x):

is produced by using \texttt{ }

Jimmy Broomfield Introduction to LaTeX 10/22

10/22

slide-16
SLIDE 16

Basic Commands

Changes to Font Size

  • \tiny{ }

Text

  • \scriptsize{ }

Text

  • \footnotesize{ }

Text

  • \small{ }

Text

  • \normalsize{ }

Text

  • \large{ }

Text

  • \Large{ }

Text

  • \LARGE{ }

Text

  • \huge{ }

Text

  • \Huge{ }

Text

Jimmy Broomfield Introduction to LaTeX 11/22

11/22

slide-17
SLIDE 17

Basic Commands

Alignment

Left Flush alignment is default Center alignment is produced by \begin{center} \end{center} Right alignment is produced by \begin{flushright} \end{flushright}

Jimmy Broomfield Introduction to LaTeX 12/22

12/22

slide-18
SLIDE 18

Basic Commands

Bulleted Lists

Bulleted lists are produced by: \begin{itemize} \item Text 1 \item Text 2 \end{itemize}

Numbered Lists

Numbered lists are produced by: \begin{enumerate} \item Text 1 \item Text 2 \end{enumerate}

Jimmy Broomfield Introduction to LaTeX 13/22

13/22

slide-19
SLIDE 19

Basic Commands

Preamble

\documentclass[12pt, letterpaper]{article} \usepackage{package 1, package 2} \title{First document} \author{Your Name} \date{November 2016} \begin{document} \begin{titlepage} \maketitle \end{titlepage} In this document some extra packages were added. There are two packages and fontsize parameters have changed. \end{document}

Jimmy Broomfield Introduction to LaTeX 14/22

14/22

slide-20
SLIDE 20

Exercise

More Advanced Document

Write a basic L

A

T EXdocument with the following requirements

  • Title your document “My First Proper L

A

T EXDocument.”

  • Add your name as the author.
  • Date the document with today’s date.
  • Add a title page with the title, your name, and the date.
  • Add the package amsmath.
  • Add and introduction with the text “This is an introduction.”
  • Add a section titled “section” with the text “This is a section.”

Jimmy Broomfield Introduction to LaTeX 15/22

15/22

slide-21
SLIDE 21

Debug Exercise 1

Don’t Be Scared

Debug the following

\documentclass{article} \begin{document} Hello world! This is \meph{italics} & it is great! \end{document}

Jimmy Broomfield Introduction to LaTeX 16/22

16/22

slide-22
SLIDE 22

Mathematics

L

AT

EXunleashed

Let’s dive in!

  • amsmath
  • Environments
  • Characters
  • Equations, numbering, and alignment
  • amssymb
  • Special symbols
  • amsthm
  • Theorems
  • Definitions
  • Proofs
  • And more!

Jimmy Broomfield Introduction to LaTeX 17/22

17/22

slide-23
SLIDE 23

Mathematics

L

AT

EXunleashed

Let’s dive in!

  • amsmath
  • Environments
  • Characters
  • Equations, numbering, and alignment
  • amssymb
  • Special symbols
  • amsthm
  • Theorems
  • Definitions
  • Proofs
  • And more!

Jimmy Broomfield Introduction to LaTeX 17/22

17/22

slide-24
SLIDE 24

Mathematics

L

AT

EXunleashed

Let’s dive in!

  • amsmath
  • Environments
  • Characters
  • Equations, numbering, and alignment
  • amssymb
  • Special symbols
  • amsthm
  • Theorems
  • Definitions
  • Proofs
  • And more!

Jimmy Broomfield Introduction to LaTeX 17/22

17/22

slide-25
SLIDE 25

Graphics

How To Add Graphics

  • \usepackage{graphicx}
  • \begin{figure}

\end{figure}

  • \includegraphics[options]{picture.png}
  • Add a caption using the \caption{caption here} command.
  • Alignment: left, right, center, outer and inner
  • You can also make your own images using the Tikz package,

but this is more advanced.

Jimmy Broomfield Introduction to LaTeX 18/22

18/22

slide-26
SLIDE 26

Graphics

How To Add Graphics

  • \usepackage{graphicx}
  • \begin{figure}

\end{figure}

  • \includegraphics[options]{picture.png}
  • Add a caption using the \caption{caption here} command.
  • Alignment: left, right, center, outer and inner
  • You can also make your own images using the Tikz package,

but this is more advanced.

Jimmy Broomfield Introduction to LaTeX 18/22

18/22

slide-27
SLIDE 27

Graphics

How To Add Graphics

  • \usepackage{graphicx}
  • \begin{figure}

\end{figure}

  • \includegraphics[options]{picture.png}
  • Add a caption using the \caption{caption here} command.
  • Alignment: left, right, center, outer and inner
  • You can also make your own images using the Tikz package,

but this is more advanced.

Jimmy Broomfield Introduction to LaTeX 18/22

18/22

slide-28
SLIDE 28

Graphics

How To Add Graphics

  • \usepackage{graphicx}
  • \begin{figure}

\end{figure}

  • \includegraphics[options]{picture.png}
  • Add a caption using the \caption{caption here} command.
  • Alignment: left, right, center, outer and inner
  • You can also make your own images using the Tikz package,

but this is more advanced.

Jimmy Broomfield Introduction to LaTeX 18/22

18/22

slide-29
SLIDE 29

Graphics

How To Add Graphics

  • \usepackage{graphicx}
  • \begin{figure}

\end{figure}

  • \includegraphics[options]{picture.png}
  • Add a caption using the \caption{caption here} command.
  • Alignment: left, right, center, outer and inner
  • You can also make your own images using the Tikz package,

but this is more advanced.

Jimmy Broomfield Introduction to LaTeX 18/22

18/22

slide-30
SLIDE 30

Graphics

How To Add Graphics

  • \usepackage{graphicx}
  • \begin{figure}

\end{figure}

  • \includegraphics[options]{picture.png}
  • Add a caption using the \caption{caption here} command.
  • Alignment: left, right, center, outer and inner
  • You can also make your own images using the Tikz package,

but this is more advanced.

Jimmy Broomfield Introduction to LaTeX 18/22

18/22

slide-31
SLIDE 31

Tables

How To Add Graphics

  • \begin{table}

\end{table}

  • \begin{tabular}{ l | c c r}

\end{tabular}

  • Using the & and \hline commands in a table
  • Row spacing using \renewcommand{\arraystretch}{1.5}
  • Adding a caption: Just like the graphicx package
  • Alignment: Just like the graphicx package

Jimmy Broomfield Introduction to LaTeX 19/22

19/22

slide-32
SLIDE 32

Tables

How To Add Graphics

  • \begin{table}

\end{table}

  • \begin{tabular}{ l | c c r}

\end{tabular}

  • Using the & and \hline commands in a table
  • Row spacing using \renewcommand{\arraystretch}{1.5}
  • Adding a caption: Just like the graphicx package
  • Alignment: Just like the graphicx package

Jimmy Broomfield Introduction to LaTeX 19/22

19/22

slide-33
SLIDE 33

Tables

How To Add Graphics

  • \begin{table}

\end{table}

  • \begin{tabular}{ l | c c r}

\end{tabular}

  • Using the & and \hline commands in a table
  • Row spacing using \renewcommand{\arraystretch}{1.5}
  • Adding a caption: Just like the graphicx package
  • Alignment: Just like the graphicx package

Jimmy Broomfield Introduction to LaTeX 19/22

19/22

slide-34
SLIDE 34

Tables

How To Add Graphics

  • \begin{table}

\end{table}

  • \begin{tabular}{ l | c c r}

\end{tabular}

  • Using the & and \hline commands in a table
  • Row spacing using \renewcommand{\arraystretch}{1.5}
  • Adding a caption: Just like the graphicx package
  • Alignment: Just like the graphicx package

Jimmy Broomfield Introduction to LaTeX 19/22

19/22

slide-35
SLIDE 35

Tables

How To Add Graphics

  • \begin{table}

\end{table}

  • \begin{tabular}{ l | c c r}

\end{tabular}

  • Using the & and \hline commands in a table
  • Row spacing using \renewcommand{\arraystretch}{1.5}
  • Adding a caption: Just like the graphicx package
  • Alignment: Just like the graphicx package

Jimmy Broomfield Introduction to LaTeX 19/22

19/22

slide-36
SLIDE 36

Tables

How To Add Graphics

  • \begin{table}

\end{table}

  • \begin{tabular}{ l | c c r}

\end{tabular}

  • Using the & and \hline commands in a table
  • Row spacing using \renewcommand{\arraystretch}{1.5}
  • Adding a caption: Just like the graphicx package
  • Alignment: Just like the graphicx package

Jimmy Broomfield Introduction to LaTeX 19/22

19/22

slide-37
SLIDE 37

Custom Commands

You Mean I Can Make It My Own

User Defined Commands

In L

AT

EX, you have the power to create your own custom commands.These are shortcuts for doing certain tasks without having to write out the full length command.i.e. instead of typing \mathbb{R} every time you want to add R to your document, you can instead add a command in the preamble to do this with the command: \R

Jimmy Broomfield Introduction to LaTeX 20/22

20/22

slide-38
SLIDE 38

Custom Commands

You Mean I Can Make It My Own

User Defined Commands

In L

AT

EX, you have the power to create your own custom commands.These are shortcuts for doing certain tasks without having to write out the full length command.i.e. instead of typing \mathbb{R} every time you want to add R to your document, you can instead add a command in the preamble to do this with the command: \R

Jimmy Broomfield Introduction to LaTeX 20/22

20/22

slide-39
SLIDE 39

Custom Commands

You Mean I Can Make It My Own

User Defined Commands

In L

AT

EX, you have the power to create your own custom commands.These are shortcuts for doing certain tasks without having to write out the full length command.i.e. instead of typing \mathbb{R} every time you want to add R to your document, you can instead add a command in the preamble to do this with the command: \R

Jimmy Broomfield Introduction to LaTeX 20/22

20/22

slide-40
SLIDE 40

Custom Commands

You Mean I Can Make It My Own

User Defined Commands

In L

AT

EX, you have the power to create your own custom commands.These are shortcuts for doing certain tasks without having to write out the full length command.i.e. instead of typing \mathbb{R} every time you want to add R to your document, you can instead add a command in the preamble to do this with the command: \R

Jimmy Broomfield Introduction to LaTeX 20/22

20/22

slide-41
SLIDE 41

Bibliographies

Cite Your Sources

  • Create a bibliography using \begin{thebibliography}{99}
  • End using \end{thebibliography}
  • Add bibliography items using \bibitem{label}

Jimmy Broomfield Introduction to LaTeX 21/22

21/22

slide-42
SLIDE 42

Resources for further learning

  • 1. Introduction - Tobias Oetiker, The Not So Short

Introduction to L

A

T EX 2ε, https://tobi.oetiker.ch/lshort/lshort.pdf.

  • 2. Tutorials/help - https://www.sharelatex.com
  • 3. Tutorials/help - https://www.overleaf.com/latex/learn/free-
  • nline-introduction-to-latex-part-1#.WB427vorJhF
  • 4. Encyclopedia-like resource -

https://en.wikibooks.org/wiki/LaTeX

  • 5. Symbol lookup - http://detexify.kirelabs.org/classify.html
  • 6. Math Symbol List -

http://www.math.boun.edu.tr/instructors/gurel/symbols-a4.pdf

  • 7. Templates - http://www.latextemplates.com/ or

https://www.sharelatex.com/templates

Jimmy Broomfield Introduction to LaTeX 22/22

22/22