using latex: how and why?swensonj/latex/usinglatexhowandwhy.pdfi tex produces beautiful documents! i...

27
What is the problem? What is T E X? Installing and learning T E X Using L A T E X: How and Why? James A. Swenson 28 January 2014 James A. Swenson Using L A T E X: How and Why?

Upload: others

Post on 13-Jul-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Using LATEX: How and Why?

James A. Swenson

28 January 2014

James A. Swenson Using LATEX: How and Why?

Page 2: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Plan

What is the problem?

What is TEX?

Installing and learning TEX

James A. Swenson Using LATEX: How and Why?

Page 3: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Why not use the Microsoft Word Equation Editor?

(Image: Marko Pinteric)

James A. Swenson Using LATEX: How and Why?

Page 4: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Maintenance issues

[W]ho do you think will be able to read your Word97files in 10 years? The computer architecture on whichyour current Word binary runs will be obsolete, yourtoday’s computer will break down, and you will never beable to recover the information stored in your files.

Proprietary data formats DESTROY your information.

— Sam Steingold1

1Steingold, Sam, “No To Proprietary Data Formats,” updated 07 July 2010,available online at [http://www.podval.org/∼sds/data.html].

James A. Swenson Using LATEX: How and Why?

Page 5: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Social issues

We continue to live in a world where all ourknow-how is locked into binary files in an unknownformat. If our documents are our corporate memory,Microsoft still has us all condemned to Alzheimer’s.

— Simon Phipps2

2Quoted by Orlowski, Andrew, “Writing history with Microsoft’s Officelock-in,” The Register, 25 April 2003, available online at[http://www.theregister.co.uk/2003/04/25/writing history with microsofts office/].

James A. Swenson Using LATEX: How and Why?

Page 6: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Immediate issues

In a wysiwyg environment like Microsoft Word or PowerPoint:3

I Typing mathematical notation is frustrating andtime-consuming.

I You must divide your focus between content and layout.

I In a large document, it is difficult to change initial typesettingdecisions, and almost impossible to ensure consistency of style.

3See “Word Processors: Stupid and Inefficient” by Allin Cottrell:[http://ricardo.ecn.wfu.edu/∼cottrell/wp.html].

James A. Swenson Using LATEX: How and Why?

Page 7: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Immediate issues

In a wysiwyg environment like Microsoft Word or PowerPoint:3

I Typing mathematical notation is frustrating andtime-consuming.

I You must divide your focus between content and layout.

I In a large document, it is difficult to change initial typesettingdecisions, and almost impossible to ensure consistency of style.

3See “Word Processors: Stupid and Inefficient” by Allin Cottrell:[http://ricardo.ecn.wfu.edu/∼cottrell/wp.html].

James A. Swenson Using LATEX: How and Why?

Page 8: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Immediate issues

In a wysiwyg environment like Microsoft Word or PowerPoint:3

I Typing mathematical notation is frustrating andtime-consuming.

I You must divide your focus between content and layout.

I In a large document, it is difficult to change initial typesettingdecisions, and almost impossible to ensure consistency of style.

3See “Word Processors: Stupid and Inefficient” by Allin Cottrell:[http://ricardo.ecn.wfu.edu/∼cottrell/wp.html].

James A. Swenson Using LATEX: How and Why?

Page 9: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Immediate issues

In a wysiwyg environment like Microsoft Word or PowerPoint:3

I Typing mathematical notation is frustrating andtime-consuming.

I You must divide your focus between content and layout.

I In a large document, it is difficult to change initial typesettingdecisions, and almost impossible to ensure consistency of style.

3See “Word Processors: Stupid and Inefficient” by Allin Cottrell:[http://ricardo.ecn.wfu.edu/∼cottrell/wp.html].

James A. Swenson Using LATEX: How and Why?

Page 10: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Portrait of the artist

TEX is a typesetting system created byProf. Donald E. Knuth.

I TEX is free software.

I TEX is platform-independent.

I TEX is spelled teq, as in the Greekword tèqnh “art.”

I TEX produces beautiful documents!

I The current, expanded edition iscalled LATEX 2ε.

Donald Knuth (1938 – )

(image: Jacob Appelbaum)

James A. Swenson Using LATEX: How and Why?

Page 11: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Portrait of the artist

TEX is a typesetting system created byProf. Donald E. Knuth.

I TEX is free software.

I TEX is platform-independent.

I TEX is spelled teq, as in the Greekword tèqnh “art.”

I TEX produces beautiful documents!

I The current, expanded edition iscalled LATEX 2ε.

Donald Knuth (1938 – )

(image: Jacob Appelbaum)

James A. Swenson Using LATEX: How and Why?

Page 12: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Portrait of the artist

TEX is a typesetting system created byProf. Donald E. Knuth.

I TEX is free software.

I TEX is platform-independent.

I TEX is spelled teq, as in the Greekword tèqnh “art.”

I TEX produces beautiful documents!

I The current, expanded edition iscalled LATEX 2ε.

Donald Knuth (1938 – )

(image: Jacob Appelbaum)

James A. Swenson Using LATEX: How and Why?

Page 13: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Portrait of the artist

TEX is a typesetting system created byProf. Donald E. Knuth.

I TEX is free software.

I TEX is platform-independent.

I TEX is spelled teq, as in the Greekword tèqnh “art.”

I TEX produces beautiful documents!

I The current, expanded edition iscalled LATEX 2ε.

Donald Knuth (1938 – )

(image: Jacob Appelbaum)

James A. Swenson Using LATEX: How and Why?

Page 14: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Portrait of the artist

TEX is a typesetting system created byProf. Donald E. Knuth.

I TEX is free software.

I TEX is platform-independent.

I TEX is spelled teq, as in the Greekword tèqnh “art.”

I TEX produces beautiful documents!

I The current, expanded edition iscalled LATEX 2ε.

Donald Knuth (1938 – )

(image: Jacob Appelbaum)

James A. Swenson Using LATEX: How and Why?

Page 15: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Portrait of the artist

TEX is a typesetting system created byProf. Donald E. Knuth.

I TEX is free software.

I TEX is platform-independent.

I TEX is spelled teq, as in the Greekword tèqnh “art.”

I TEX produces beautiful documents!

I The current, expanded edition iscalled LATEX 2ε. Donald Knuth (1938 – )

(image: Jacob Appelbaum)

James A. Swenson Using LATEX: How and Why?

Page 16: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Markup langugage

A LATEX document is not wysiwyg; you type a plain-text file, andthen feed it to the TEX system to get a PDF document.For example, to produce:

I (λ) =

∫∫D

g(x , y)e iλh(x ,y) dx dy

one types:

\[\boxed{I(\lambda)=\iint_D g(x,y)e^{i\lambda h(x,y)}\,dx\,dy}\]

James A. Swenson Using LATEX: How and Why?

Page 17: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Markup langugage

This presentation was designed using beamer, an optional TEXpackage. The TEX file that produced these slides is on my website:

http://www.uwplatt.edu/∼swensonj/latex/

James A. Swenson Using LATEX: How and Why?

Page 18: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Markup langugage

This presentation was designed using beamer, an optional TEXpackage. The TEX file that produced these slides is on my website:

http://www.uwplatt.edu/∼swensonj/latex/

Here is what I typed to make LATEX format these slides with theblue title bar and the highlighted section list at the top, and myname and title at the bottom:

\usepackage{beamerthemesplit}

James A. Swenson Using LATEX: How and Why?

Page 19: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Another example

The equation ∂(x ,y)∂(u,v) =

∣∣∣∣∣ ∂x∂u

∂x∂v

∂y∂u

∂y∂v

∣∣∣∣∣ was produced by typing:

\(

\frac{\partial(x,y)}{\partial(u,v)}=

\left|

\begin{array}{cc}

\frac{\partial x}{\partial u} & \frac{\partial x}{\partial v}\\

\frac{\partial y}{\partial u} & \frac{\partial y}{\partial v}\\

\end{array}

\right|

\)

James A. Swenson Using LATEX: How and Why?

Page 20: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Other LATEX commands

You can make a whole variety of lovely symbols easily in LATEX:

\in ∈\infty ∞\pi π

\forall ∀\mathbb{Z} Z\NoIroning ²

\Capricorn é

\ge ≥\not\subseteq 6⊆\xi ξ

\otimes ⊗\aleph_0 ℵ0\Coffeecup K

\Smiley ©

You can find the 150-page “Comprehensive LATEX Symbol List” at:www.tex.ac.uk/tex-archive/info/symbols/comprehensive/symbols-letter.pdf

James A. Swenson Using LATEX: How and Why?

Page 21: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Completing assignments in LATEX

So your teacher wants you to write up homework in LATEX. . . . Getstarted by stealing my template:

http://www.uwplatt.edu/∼swensonj/latex/HomeworkSolution.tex

James A. Swenson Using LATEX: How and Why?

Page 22: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

What your homework will look like

James A. Swenson Using LATEX: How and Why?

Page 23: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

What you will type

James A. Swenson Using LATEX: How and Why?

Page 24: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Presentations in LATEX

So you’re planning to give a senior seminar presentation. . . .Get started by stealing the template for the slides I’m using rightnow! It’s all on the website:

http://www.uwplatt.edu/∼swensonj/latex/

James A. Swenson Using LATEX: How and Why?

Page 25: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

How do I get TEX?

I just installed LATEX on a new machine running Windows 7, andwrote full instructions for the process. They’re posted on thewebsite:

http://www.uwplatt.edu/∼swensonj/latex/

James A. Swenson Using LATEX: How and Why?

Page 26: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Have fun using TEX!

Steal what you need from the source file of this presentation! Ifyou need to know how to type something in LATEX, you cancertainly find out with Google. You could also ask me for advice!

James A. Swenson Using LATEX: How and Why?

Page 27: Using LATEX: How and Why?swensonj/latex/UsingLatexHowAndWhy.pdfI TEX produces beautiful documents! I The current, expanded edition is called LATEX2". Donald Knuth (1938 { ) (image:

What is the problem?What is TEX?

Installing and learning TEX

Two bears with chainsaw nunchucks

(Image: faustus fusilli) (Image: badassimus prime)

James A. Swenson Using LATEX: How and Why?