An introduction to TeX - PowerPoint PPT Presentation

1 / 58
About This Presentation
Title:

An introduction to TeX

Description:

Ghostview is a freeware PS viewer. Emacs: Windows version of standard Unix text editor. ... Adobe Acrobat or Viewer (freeware) for PDF. File formats ... – PowerPoint PPT presentation

Number of Views:148
Avg rating:3.0/5.0
Slides: 59
Provided by: earthurro
Category:

less

Transcript and Presenter's Notes

Title: An introduction to TeX


1
An introduction to TeX
  • And other options for producing documents
    containing mathematics

2
Robbie Robinson
  • Department of Mathematics
  • GWU
  • Washington DC 20052
  • robinson_at_gwu.edu

3
1. What is TeX?
4
Tex is
  • A typesetting system for professional quality
    scientific documents.
  • ...especially those containing a lot of
    mathematical symbols.
  • Runs on multiple platforms.
  • Comes in PlainTeX, LaTex, AMS-LaTeX, etc.

5
Origin
  • Stanford University computer scientist Donald
    Knuth.
  • was as unhappy about how publishers typeset his
    papers
  • studied traditional typesetting and printing
  • built a lot of expert knowledge into TeX

6
Pronunciation
  • Name comes from Greek tec.
  • Means both art and technology.
  • Rhymes with belch
  • Does not rhyme with sex
  • However LaTeX is sometimes prounounced lay-tex
    (as in a type of rubber).

7
What does TeX consist of?
  • A language and software.
  • Knuths part, plus packages (like LaTex)
  • Knuths ultimate version of the TeX program was
    released in 1983.
  • Knuth There will be no more changes.
  • The TeX Book (1986) ultimate TeX language
    reference
  • other Knuth books on the program, fonts, etc.

8
2. LaTeX and other packages
9
Programming in TeX
  • TeX is a primitive typesetting engine that allows
    additional programming.
  • Programs can be put together into packages.
  • These define dialects and styles.
  • With the final version of the TeX program, Knuth
    released PlainTex and the Vanilla style.

10
AMS-TeX
  • Released in early 1980's by AMS.
  • Based on Knuths Vanilla style.
  • Several improvements
  • handling very complex math formulas.
  • additional fonts.
  • Developed by Michael Spivak.
  • The Joy of TeX (1982)

11
LaTeX
  • Released in mid 1980s
  • written by Leslie Lamport, of Digital Equipment
    Co.
  • LaTeX A documant preparation system (1986)
  • Upgrade of Knuths basic TeX language,
    independent of AMS-TeX.

12
Innovations in LaTeX
  • Automatic numbering of theorems and equations.
  • A better mark-up system (e.g., environments).
  • A Pascal-like style.
  • A greater variety of document types article,book,
    etc.)
  • still more fonts.

13
Situation in the 1990s
  • LaTeX 2.09 de-facto standard in most fields
    (Economics, Computer Science)
  • Mathematicians split (some use LaTeX, others
    cling to AMS-TeX or PlainTeX).
  • AMS (officially) refuses to accept LaTeX for its
    journals (!!)
  • c 1990, TeX users wish list
  • LaTeX version 3, and
  • a combination of LaTeX and AMS-TeX.

14
Current State of the Art
  • LaTeX-2e released in 1994.
  • i.e., still not LaTeX 3
  • improvements in internal operation of LaTeX.
  • Author(s) Frank Mittelbach (et al)
  • AMS simultaneously releases AMS-LaTeX
  • runs as a package within LaTeX-2e.

15
What TeX version should I use?
  • Definitely AMS-LaTeX or LaTeX-2e
  • PlainTeX can also still sometimes useful.
  • Some other useful TeX programs are
  • epsfig.sty used to import postscript drawings
    into TeX files.
  • bibtex used to automatically create a
    bibliography from a bibliographic database.

16
Implementation.
  • TeX and LaTeX are public domain, but complicated
    to install from scratch.
  • Best to have precompiled binaries and an
    installation utility.
  • TeX is a standard part of most Linux
    distributions (e.g., Red Hat).
  • Mac TeXShop, iTeXMac, etc.

17
PC Implementations
  • MikTeX
  • freeware port of standard Unix version.
  • fully featured includes installer.
  • Can be combined with emacs (AUC-TeX) or
    Winedit.
  • PC-TeX (commercial). Includes TrueType fonts.
  • Scientific Workplace (commercial WYSIWYG version)
    includes Maple.

18
3. Using TeX
19
Mark-up
  • TeX is a markup language, like HTML.
  • You type an ascii file with the extension ".tex".
  • As in HTML, you do not worry about formatting.
  • In HTML leave formatting to the browser.
  • In TeX leave formatting to TeX.
  • TeX formats according to the style you are using.

20
Ideology
  • Logical Document Design
  • Common to TeX and HTML
  • User describes logical role of each part of the
    document.
  • ... not how to place items on the page!
  • i.e., definitely not WYSIWYG!!!

21
Comparison with HTML
  • HTML markup accomplished by surrounding items
    by tags.

This is emphasized.
This is emphasized.
Your web browser decides how to emphasize (!)
22
What if you insist on italics?
But I wanted italics!
But I wanted italics!
Works, but violates logical document design (!!)
23
Logical design
  • A great idea in theory
  • ... can be a pain in practice.
  • HTML has been moving away from a strictly logical
    design for years.
  • dot.coms want complete control of what you
    see!

24
Logical Document Design in TeX
  • To emphasize text, you type

\em Emphasize this!
  • What you will (probably) get

Emphasize this!
25
How do you demand italics?
\it Italicize this!
  • What you (should) get

Italicize this!
26
Font control in La-TeX.
  • \bf for boldface,
  • \rm for Roman (not italics or bold)
  • \tt for teletype.
  • \sc for small caps.

27
4. Typing Mathematics.
28
More TeX v.s. HTML
  • In HTML the big thing is hyperlinks
  • naturally there is an elaborate code for them.
  • In TeX the big thing is mathematics.
  • Inside your document, all formulas are typeset in
    math mode.
  • In contrast, text is set in text mode.

29
Plain TeX example
  • Inline math (mode) equations between s

An inline equation x2-x-10 appears in this
line.
  • You will get (approximately)

An inline equation x2x1 0 appears in this
line.
30
Displayed Equations (Plain TeX)
  • Put display math between (double) s

A displayed equation x2-x-10 sits by
itself, centered on its own line.
A displayed equation x2x1 0 sits by
itself, centered on its own line.
31
Knuths poor choice of delimiters
  • TeX violates a common custom of mathematical
    notation
  • Delimiters or tags should come in left and
    right pairs.
  • x2-x-10 violates this.

32
LaTeX corrects Knuths faux pas
  • Uses \( x2-x-10 \) for inline
  • Uses \ x2-x-10 \ for display.

Yucko!
  • I don't use either of these!
  • I still use x2-x-10 for inline.
  • For equations, I use a LaTeX feature called
    environments

33
Display equation environment in LaTeX
Here is a displayed equation \beginequation
\labeleqfibx2-x-10, \endequation and it
has a number.
Here is a displayed equation (1.1) x2x1
0, and it has a number!
34
Greek letters
Spelled out as control sequences.
For all \epsilon0 there exists \delta so
that if x-y.
For all ? 0 there exists ? 0 so that if x -
y
35
Subscripts and superscripts
These use and _. Nesting is allowed with

Given a bounded sequence x_1,x_2,\dots, there
exists a convergent subsequence
x_i_1,x_i_2,\dots.
36
Integrals, and sums
If f is in L20,1 and \beginequation f_n
\frac12\pi \int_02\pi f(x)ei n
x\,dx \endequation then f2_2\Sum_0\inf
ty f_n2.
37
Theorem-like environments
\beginthm\labelthfw The equation
AnBnCn has no integer solutions for
n2. \endthm \beginproof See the
margins.\endproof
Theorem 1.1. The equation AnBnCn has no integer
solutions for n2. Proof. See the margins.
?
38
Starting and finishing
  • LaTeX requires (at least a few) special lines at
    the beginning and end of a document.

\documentclassarticle \begindocument Put
your text here... \enddocument
39
5. How to operate LaTeX.
40
(No Transcript)
41
Example Basic MikTeX on a PC
  • Use any text editor to create an ascii LaTeX file
    called file.tex
  • Get a command prompt (Windows XP) or DOS
    prompt.

42
(No Transcript)
43
comment run LaTex twice!
44
(No Transcript)
45
(No Transcript)
46
(No Transcript)
47
(No Transcript)
48
Additional Useful Software
  • Yap yet another previewer comes with MikTeX.
  • Ghostview is a freeware PS viewer.
  • Emacs Windows version of standard Unix text
    editor.
  • Ispell Windows version of Unix spelling program
    can be attached to Emacs.
  • AUC-TeX Emacs package that integrates TeX,
    Ispell, Yap, and Ghostview into emacs.
  • PDF-TeX produces PDF files directly from TeX.
    Comes with MikTeX.
  • Adobe Acrobat or Viewer (freeware) for PDF.

49
File formats
  • Postscript is a page definition language.
  • It is essentially a printer program.
  • Preferred form for camera-ready publishing.
  • Encapsulated postscript (eps) is a stricter
    standard of postscript, mostly used for pictures.
  • PDF is a simplified and compressed version of
    postscript
  • Most e-publishers want a TeX file plus eps
    figures.
  • EPS pictures not appropriate for web (unsupported
    by browsers).
  • Usual .jpeg and .gif pictures not appropriate for
    e-publishing.

50
EPS Graphics
  • X-Fig (Unix, Linux and Windows with Cygwin).
  • Win-Fig approximately X-fig for windows
  • Adobe Illustrator (commercial) steep learning
    curve
  • Mathematica, Maple and Matlab all export eps
    graphics.

51
(No Transcript)
52
Bibtex
  • Supports bib format for bibliographic citations.
  • Downloadable from MathSciNet
  • References automatically labeled
  • Can make master bibliography which can be reused.

53
(No Transcript)
54
6. Alternatives
  • Now and on the horizon

55
Typing formulas in MS Office
  • Microsoft Equation 3.0
  • Comes with Office products.
  • Surprisingly not bad! (students can use it).
  • MathType
  • Commercial upgrade of Equation 3.0. Now in
    Version 5.2. Design Science Inc.
  • 30 day free trial. About 100. Well worth it!!

56
MS Office continued
  • TeXPoint for PowerPoint (freeware).
  • Builds a limited TeX interpreter into PowerPoint.
  • Type TeX expressions (without s) into a slide.
    Select TeX-ify from the TeXPoint menu. Converts
    to formula.
  • Works well in combination with MathType

57
Still more MS Office TeX
  • New (commercial) product TeX2Word and Word2TeX.
  • Converts between LaTeX and MS Word with MathType
    formulas.
  • End result similar to Scientific Workplace (?)
  • Academic price 4545. (30 day trial available)
  • I have not tried it yet.

58
The future?
Write a Comment
User Comments (0)
About PowerShow.com