latex tutorials & workshops

48
L A T E X tutorials Outline Introduction to L A T E X - Lance Carnes L A T E X Tutorials & Workshops Sponsored by Personal T E X, Inc. UC Berkeley Faculty Club October 12, 2007 Sponsored by Personal T E X, Inc. L A T E X Tutorials & Workshops

Upload: others

Post on 11-Sep-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

LATEX Tutorials & Workshops

Sponsored by Personal TEX, Inc.

UC Berkeley Faculty Club

October 12, 2007

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 2: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance CarnesOrganization of sessions

LATEX tutorialsOrganization of sessions

Introduction to LATEX - Lance CarnesSegment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, generalguidelines

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 3: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance CarnesOrganization of sessions

Organization of sessions

I Presenter will speak for 15 minutes

I Attendees will work on an exercise for 10 minutes

I The presenter will answer questions for 5 minutes

I There will be three of these segments per 90-minute session.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 4: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance CarnesOrganization of sessions

The presenters

I David Auslander, Professor of the Graduate School,Department of Mechanical Engineering, UC Berkeley. Davidhas been a LATEX user for twelve years and uses it to generateteaching materials in the Mechanical Engineering graduateschool.

I Richard W. Cottle, Professor Emeritus, Department ofManagement Science and Engineering, Stanford University.Richard has used LATEX for more than 20 years, for generatingteaching materials as well as for scholarly publication.

I Lance Carnes, President, Personal TeX, Inc., has been usingTEX since 1980. PCTEX has been available since 1985.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 5: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance CarnesOrganization of sessions

The presenters

I David Auslander, Professor of the Graduate School,Department of Mechanical Engineering, UC Berkeley. Davidhas been a LATEX user for twelve years and uses it to generateteaching materials in the Mechanical Engineering graduateschool.

I Richard W. Cottle, Professor Emeritus, Department ofManagement Science and Engineering, Stanford University.Richard has used LATEX for more than 20 years, for generatingteaching materials as well as for scholarly publication.

I Lance Carnes, President, Personal TeX, Inc., has been usingTEX since 1980. PCTEX has been available since 1985.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 6: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance CarnesOrganization of sessions

The presenters

I David Auslander, Professor of the Graduate School,Department of Mechanical Engineering, UC Berkeley. Davidhas been a LATEX user for twelve years and uses it to generateteaching materials in the Mechanical Engineering graduateschool.

I Richard W. Cottle, Professor Emeritus, Department ofManagement Science and Engineering, Stanford University.Richard has used LATEX for more than 20 years, for generatingteaching materials as well as for scholarly publication.

I Lance Carnes, President, Personal TeX, Inc., has been usingTEX since 1980. PCTEX has been available since 1985.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 7: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Introduction to LATEX

Presented by Lance Carnes

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 8: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Why use LATEX?

I Book or journal quality text

I Accepted by most science publishers and journals

I Professional looking output for self-publishing or anypublishing need

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 9: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Why use LATEX?

I Book or journal quality text

I Accepted by most science publishers and journals

I Professional looking output for self-publishing or anypublishing need

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 10: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Why use LATEX?

I Book or journal quality text

I Accepted by most science publishers and journals

I Professional looking output for self-publishing or anypublishing need

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 11: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

How does LATEX relate to TEX?

I TEX is a program for high-quality formatting developed byDonald E. Knuth in 1982

I The original release of TEX came with a “macro package”called Plain

I TEX + Plain is the bare minimum needed to format with TeX

I LATEX is another “macro package” developed by LeslieLamport in the early 1980’s

I When you use LATEX you are using the TEX program + LATEXmacros

I Other macro packages: Facil-TEX (early 1980’s, rarely usedtoday), AMSTEX (early 1980’s), ConTEXt (late 1990’s)

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 12: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

When to use LATEX

I When writing books or articles for publication

I When writing any type of multi-page document

I When writing documents that contain mathematics orscientific material

I LATEX is not well suited for small, intricate documents, such asfliers or advertisements

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 13: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

How to use LATEX

I Graphical User Interface (GUI)

I Command line

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 14: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

What is markup?

I Ground rules

I Special characters

# $ % & ~ ^ \ { } " |

I En- and em-dashes: -- gives – and --- gives —A--Z --- that’s all . . . gives . . . A–Z — that’s all

I Open and close quotes: ‘text’ gives ‘text’ and ‘‘text’’gives “text”

I LATEX commands (also called control sequences), for example. . .

I Bold, italic, and regular\textbf{Bold}, \textit{italic}, and\textrm{regular}

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 15: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

What is markup?

I Ground rules

I Special characters

# $ % & ~ ^ \ { } " |

I En- and em-dashes: -- gives – and --- gives —A--Z --- that’s all . . . gives . . . A–Z — that’s all

I Open and close quotes: ‘text’ gives ‘text’ and ‘‘text’’gives “text”

I LATEX commands (also called control sequences), for example. . .

I Bold, italic, and regular\textbf{Bold}, \textit{italic}, and\textrm{regular}

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 16: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

What is markup?

I Ground rules

I Special characters

# $ % & ~ ^ \ { } " |

I En- and em-dashes: -- gives – and --- gives —A--Z --- that’s all . . . gives . . . A–Z — that’s all

I Open and close quotes: ‘text’ gives ‘text’ and ‘‘text’’gives “text”

I LATEX commands (also called control sequences), for example. . .

I Bold, italic, and regular\textbf{Bold}, \textit{italic}, and\textrm{regular}

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 17: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

What is markup?

I Ground rules

I Special characters

# $ % & ~ ^ \ { } " |

I En- and em-dashes: -- gives – and --- gives —A--Z --- that’s all . . . gives . . . A–Z — that’s all

I Open and close quotes: ‘text’ gives ‘text’ and ‘‘text’’gives “text”

I LATEX commands (also called control sequences), for example. . .

I Bold, italic, and regular\textbf{Bold}, \textit{italic}, and\textrm{regular}

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 18: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

What is markup?

I Ground rules

I Special characters

# $ % & ~ ^ \ { } " |

I En- and em-dashes: -- gives – and --- gives —A--Z --- that’s all . . . gives . . . A–Z — that’s all

I Open and close quotes: ‘text’ gives ‘text’ and ‘‘text’’gives “text”

I LATEX commands (also called control sequences), for example. . .

I Bold, italic, and regular\textbf{Bold}, \textit{italic}, and\textrm{regular}

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 19: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

What is markup?

I Ground rules

I Special characters

# $ % & ~ ^ \ { } " |

I En- and em-dashes: -- gives – and --- gives —A--Z --- that’s all . . . gives . . . A–Z — that’s all

I Open and close quotes: ‘text’ gives ‘text’ and ‘‘text’’gives “text”

I LATEX commands (also called control sequences), for example. . .

I Bold, italic, and regular\textbf{Bold}, \textit{italic}, and\textrm{regular}

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 20: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Will using TEX or LATEX make me a typographer?

I Short answer: No. It takes a lot of training and experience tolearn page design and typographic conventions.

I However, LATEX gives you a lot for free, with no markuprequired:

I Letter kerning — AVOID AVOIDI Ligatures — fi ff ffl fi ff fflI Hyphenation

I Sophisticated line breaking

I Page layout smoothing (typographic color)

I Basic document styles

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 21: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

What will be covered today

I You will learn only a small fraction of LATEX’s capabilities

I . . . the possibilities are endless but not needed for everydayuse

I You will not become a typographer or LATEX expert

I . . . but you can continue learning on your own if you wish

I You will be able to write an article with math and figuresusing LATEX

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 22: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1

Write the following using LATEX:

I A 6-pack of A&W Root beer is on sale for $2.56, a25% savings.

I "Over the weekend I read Treasure Island," Johnrevealed.

I It’s the #1 best-seller - in the 18-25 age group.

I LaTeX is much easier than I thought it would be.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 23: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1 — Answers

I A 6-pack of A&W Root beer is on sale for $2.56, a 25%savings.

I A 6-pack of A\&W Root beer is on sale for \$2.56,a 25\% savings.

I “Over the weekend I read Treasure Island,” John revealed.I ‘‘Over the weekend I read \textit{Treasure

Island},’’ John revealed.I It’s the #1 best-seller — in the 18–25 age group.I It’s the \#1 best-seller --- in the 18--25 age

group.I LaTeX is much easier than I thought it would be.I LaTeX is much easier than I thought it would be.I LATEX is much easier than I thought it would be.I \LaTeX{} is much easier than I thought it would

be.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 24: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1 — Answers

I A 6-pack of A&W Root beer is on sale for $2.56, a 25%savings.

I A 6-pack of A\&W Root beer is on sale for \$2.56,a 25\% savings.

I “Over the weekend I read Treasure Island,” John revealed.I ‘‘Over the weekend I read \textit{Treasure

Island},’’ John revealed.I It’s the #1 best-seller — in the 18–25 age group.I It’s the \#1 best-seller --- in the 18--25 age

group.I LaTeX is much easier than I thought it would be.I LaTeX is much easier than I thought it would be.I LATEX is much easier than I thought it would be.I \LaTeX{} is much easier than I thought it would

be.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 25: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1 — Answers

I A 6-pack of A&W Root beer is on sale for $2.56, a 25%savings.

I A 6-pack of A\&W Root beer is on sale for \$2.56,a 25\% savings.

I “Over the weekend I read Treasure Island,” John revealed.

I ‘‘Over the weekend I read \textit{TreasureIsland},’’ John revealed.

I It’s the #1 best-seller — in the 18–25 age group.I It’s the \#1 best-seller --- in the 18--25 age

group.I LaTeX is much easier than I thought it would be.I LaTeX is much easier than I thought it would be.I LATEX is much easier than I thought it would be.I \LaTeX{} is much easier than I thought it would

be.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 26: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1 — Answers

I A 6-pack of A&W Root beer is on sale for $2.56, a 25%savings.

I A 6-pack of A\&W Root beer is on sale for \$2.56,a 25\% savings.

I “Over the weekend I read Treasure Island,” John revealed.I ‘‘Over the weekend I read \textit{Treasure

Island},’’ John revealed.

I It’s the #1 best-seller — in the 18–25 age group.I It’s the \#1 best-seller --- in the 18--25 age

group.I LaTeX is much easier than I thought it would be.I LaTeX is much easier than I thought it would be.I LATEX is much easier than I thought it would be.I \LaTeX{} is much easier than I thought it would

be.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 27: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1 — Answers

I A 6-pack of A&W Root beer is on sale for $2.56, a 25%savings.

I A 6-pack of A\&W Root beer is on sale for \$2.56,a 25\% savings.

I “Over the weekend I read Treasure Island,” John revealed.I ‘‘Over the weekend I read \textit{Treasure

Island},’’ John revealed.I It’s the #1 best-seller — in the 18–25 age group.

I It’s the \#1 best-seller --- in the 18--25 agegroup.

I LaTeX is much easier than I thought it would be.I LaTeX is much easier than I thought it would be.I LATEX is much easier than I thought it would be.I \LaTeX{} is much easier than I thought it would

be.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 28: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1 — Answers

I A 6-pack of A&W Root beer is on sale for $2.56, a 25%savings.

I A 6-pack of A\&W Root beer is on sale for \$2.56,a 25\% savings.

I “Over the weekend I read Treasure Island,” John revealed.I ‘‘Over the weekend I read \textit{Treasure

Island},’’ John revealed.I It’s the #1 best-seller — in the 18–25 age group.I It’s the \#1 best-seller --- in the 18--25 age

group.

I LaTeX is much easier than I thought it would be.I LaTeX is much easier than I thought it would be.I LATEX is much easier than I thought it would be.I \LaTeX{} is much easier than I thought it would

be.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 29: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1 — Answers

I A 6-pack of A&W Root beer is on sale for $2.56, a 25%savings.

I A 6-pack of A\&W Root beer is on sale for \$2.56,a 25\% savings.

I “Over the weekend I read Treasure Island,” John revealed.I ‘‘Over the weekend I read \textit{Treasure

Island},’’ John revealed.I It’s the #1 best-seller — in the 18–25 age group.I It’s the \#1 best-seller --- in the 18--25 age

group.I LaTeX is much easier than I thought it would be.

I LaTeX is much easier than I thought it would be.I LATEX is much easier than I thought it would be.I \LaTeX{} is much easier than I thought it would

be.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 30: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1 — Answers

I A 6-pack of A&W Root beer is on sale for $2.56, a 25%savings.

I A 6-pack of A\&W Root beer is on sale for \$2.56,a 25\% savings.

I “Over the weekend I read Treasure Island,” John revealed.I ‘‘Over the weekend I read \textit{Treasure

Island},’’ John revealed.I It’s the #1 best-seller — in the 18–25 age group.I It’s the \#1 best-seller --- in the 18--25 age

group.I LaTeX is much easier than I thought it would be.I LaTeX is much easier than I thought it would be.

I LATEX is much easier than I thought it would be.I \LaTeX{} is much easier than I thought it would

be.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 31: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1 — Answers

I A 6-pack of A&W Root beer is on sale for $2.56, a 25%savings.

I A 6-pack of A\&W Root beer is on sale for \$2.56,a 25\% savings.

I “Over the weekend I read Treasure Island,” John revealed.I ‘‘Over the weekend I read \textit{Treasure

Island},’’ John revealed.I It’s the #1 best-seller — in the 18–25 age group.I It’s the \#1 best-seller --- in the 18--25 age

group.I LaTeX is much easier than I thought it would be.I LaTeX is much easier than I thought it would be.I LATEX is much easier than I thought it would be.

I \LaTeX{} is much easier than I thought it wouldbe.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 32: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 1 — Answers

I A 6-pack of A&W Root beer is on sale for $2.56, a 25%savings.

I A 6-pack of A\&W Root beer is on sale for \$2.56,a 25\% savings.

I “Over the weekend I read Treasure Island,” John revealed.I ‘‘Over the weekend I read \textit{Treasure

Island},’’ John revealed.I It’s the #1 best-seller — in the 18–25 age group.I It’s the \#1 best-seller --- in the 18--25 age

group.I LaTeX is much easier than I thought it would be.I LaTeX is much easier than I thought it would be.I LATEX is much easier than I thought it would be.I \LaTeX{} is much easier than I thought it would

be.Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 33: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Typing text and math

I Make a simple document article.tex

I Fill in the title, author, etc.

I Enter a paragraph of text

I Enter an itemized list

I Enter a simple math equation

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 34: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Typing text and math

I Make a simple document article.tex

I Fill in the title, author, etc.

I Enter a paragraph of text

I Enter an itemized list

I Enter a simple math equation

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 35: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Typing text and math

I Make a simple document article.tex

I Fill in the title, author, etc.

I Enter a paragraph of text

I Enter an itemized list

I Enter a simple math equation

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 36: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Typing text and math

I Make a simple document article.tex

I Fill in the title, author, etc.

I Enter a paragraph of text

I Enter an itemized list

I Enter a simple math equation

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 37: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Typing text and math

I Make a simple document article.tex

I Fill in the title, author, etc.

I Enter a paragraph of text

I Enter an itemized list

I Enter a simple math equation

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 38: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 2 — add to the sample article

I Add foreign words, j’ecris caffe pena

I Add a new math equation∫

f (x)dx

I Add a new displayed math equation∫f (x)dx

I Add an enumerated list:Groceries 1. eggs 2. carrots 3. spam

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 39: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 2 — Answers

I foreign words, j’ecris caffe pena

I j’\’{e}cris caff\‘{e} pe\~{n}aI new math equation

∫f (x)dx

I $ \int f(x) dx$ or \( \int f(x) dx\)

I new displayed math equation∫f (x)dx

I \[\int f(x) dx\]

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 40: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 2 — Answers

I foreign words, j’ecris caffe pena

I j’\’{e}cris caff\‘{e} pe\~{n}a

I new math equation∫

f (x)dx

I $ \int f(x) dx$ or \( \int f(x) dx\)

I new displayed math equation∫f (x)dx

I \[\int f(x) dx\]

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 41: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 2 — Answers

I foreign words, j’ecris caffe pena

I j’\’{e}cris caff\‘{e} pe\~{n}aI new math equation

∫f (x)dx

I $ \int f(x) dx$ or \( \int f(x) dx\)

I new displayed math equation∫f (x)dx

I \[\int f(x) dx\]

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 42: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 2 — Answers

I foreign words, j’ecris caffe pena

I j’\’{e}cris caff\‘{e} pe\~{n}aI new math equation

∫f (x)dx

I $ \int f(x) dx$ or \( \int f(x) dx\)

I new displayed math equation∫f (x)dx

I \[\int f(x) dx\]

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 43: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 2 — Answers

I foreign words, j’ecris caffe pena

I j’\’{e}cris caff\‘{e} pe\~{n}aI new math equation

∫f (x)dx

I $ \int f(x) dx$ or \( \int f(x) dx\)

I new displayed math equation∫f (x)dx

I \[\int f(x) dx\]

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 44: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Exercise 2 — Answers

I foreign words, j’ecris caffe pena

I j’\’{e}cris caff\‘{e} pe\~{n}aI new math equation

∫f (x)dx

I $ \int f(x) dx$ or \( \int f(x) dx\)

I new displayed math equation∫f (x)dx

I \[\int f(x) dx\]

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 45: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Workflow

I Show typeset view, jump to the source, edit and re-typeset

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 46: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Recovering from errors

I Once the error appears read the error message and try tocorrect from that

I If this isn’t helpful, try to narrow down where the erroroccurred by commenting out blocks of text using %

I Errors are usually misspelled commands, misplacedcommands, or misused commands (e.g. a missing part of thecommand such as an argument)

I Some errors will not cause LATEX to stop — check your typesetoutput carefully

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 47: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

Guidelines

I Keep the source file simple — avoid using complicated LATEXcommands

I Write a small amount and then typeset — easier to recoverfrom errors

I Let LATEX do the formatting work — do not try to force thelook you want

I Watch out for special characters

I Be patient

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops

Page 48: LaTeX Tutorials & Workshops

LATEX tutorialsOutline

Introduction to LATEX - Lance Carnes

Segment 1 - The basicsSegment 2 - Typing text and mathSegment 3 - Workflow, recovering from errors, general guidelines

LATEX resources

I Use the web, for exampleGoogle "LaTeX tables"

for useful information

I Use available online documentation, for examplePCTeX Help..LaTeX GuidePCTeX Help..LaTeX Packages

I Look at document examples, e.g. The PracTEX Journal(tug.org/pracjourn)

I Wikipedia.org for math examples

I Books:George Gratzer, Math Into LATEXKopka & Daly, A Guide to LATEXMittelbach et. al., The LATEX Companion, 2nd ed.

Sponsored by Personal TEX, Inc. LATEX Tutorials & Workshops