Quick LaTeX Tutorial - PowerPoint PPT Presentation

1 / 44
About This Presentation
Title:

Quick LaTeX Tutorial

Description:

Why you want to learn LaTeX ... using the LaTeX program. Display resulting ... Need to include an extension package to LaTeX called 'graphics' using command ... – PowerPoint PPT presentation

Number of Views:907
Avg rating:3.0/5.0
Slides: 45
Provided by: rolando1
Learn more at: https://www.cis.rit.edu
Category:
Tags: latex | latex | quick | tutorial

less

Transcript and Presenter's Notes

Title: Quick LaTeX Tutorial


1
Quick LaTeX Tutorial
2
LaTeX Tutorial
  • Why do you want to learn LaTeX?
  • Nuts and Bolts of LaTex
  • Examples

3
Why you want to learn LaTeX
  • Very powerful control of document generation,
    particularly large technical documents
  • Minimizes the drudgery of formatting, numbering,
    and referencing
  • Disadvantage
  • Steep Learning Curve

4
LaTeX Platforms
  • Scientific Workplace
  • (Commercial Package)
  • UNIX Systems (LyX)
  • (Free)
  • MikTex and WinEdt
  • PC Shareware

5
LaTeX Resources
  • http//www.ctan.org
  • http//www.colorado.edu/ITS/docs/latex/Ref/
  • The Not So Short Introduction to LaTeX 2e (Tobias
    Oetiker)
  • Math Into LaTeX (George Gratzer)

6
The LaTeX Process
  • Create a text file (with your favorite text
    editor) with LaTeX commands
  • Compile or Build your document using the
    LaTeX program
  • Display resulting Document
  • Continue writing and go to 1 until finished
  • Convert Document to Postscript or PDF

7
Flow of LaTeX Process
8
Source code of your first LaTeX
document(fish.tex)
  • \documentclassarticle
  • \begindocument
  • My mother is a fish.
  • \enddocument

9
Commands to Build and View Document
  • To use xdvi viewer
  • latex fish.tex
  • xdvi fish.dvi
  • To use acroread
  • pdflatex fish.tex
  • acroread fish.pdf

10
(No Transcript)
11
Emphasizing words(fish.tex)
  • \documentclassarticle
  • \begindocument
  • \emphMy mother is a fish.
  • \enddocument

12
(No Transcript)
13
Underlining words(fish.tex)
  • \documentclassarticle
  • \begindocument
  • \emphMy mother is a
  • \underlinefish.
  • \enddocument

14
(No Transcript)
15
Making references in LaTeX(fish.tex)
  • \documentclassarticle
  • \begindocument
  • \emphMy mother is a \underlinefish \citeWF.
  • \beginthebibliography99
  • \bibitemWF
  • William Falkner, \emphAs I Lay Dying
  • \endthebibliography
  • \enddocument

16
Need to compile the document twice
  • Because we are using symbolic references, e.g.,
    \citeWF, a second pass is necessary
  • The second pass will resolve references

17
(No Transcript)
18
Sum Equation Example(sum.tex)
  • \documentclassarticle
  • \begindocument
  • \beginequation \labelEsum
  • s \sum_i1nx_i
  • \endequation
  • \enddocument

19
(No Transcript)
20
Sum of Squares Equation Example (sum_squares.tex)
  • \documentclassarticle
  • \begindocument
  • \beginequation
  • \labelEsum_squares
  • s2 \sum_i1nx_i2
  • \endequation
  • \enddocument

21
(No Transcript)
22
Mean Equation Example(mean.tex)
  • \documentclassarticle
  • \begindocument
  • \beginequation \labelEmean
  • \barx \frac\sum_i1nx_i n
  • \endequation
  • \enddocument

23
(No Transcript)
24
Mean Equation Examplewith limits
(mean_limits.tex)
  • \documentclassarticle
  • \begindocument
  • \beginequation \labelEmean
  • \barx \frac\sum\limits_i1n x_i n
  • \endequation
  • \enddocument

25
(No Transcript)
26
Variance Equation Example (variance.tex)
  • \documentclassarticle
  • \begindocument
  • \beginequation \labelEvariance
  • \sigma2 \frac\sum\limits_i1n
  • \left(x_i - \barx\right)2
  • n-1
  • \endequation
  • \enddocument

27
(No Transcript)
28
Standard Deviation Equation Example (sd.tex)
  • \documentclassreport
  • \begindocument
  • \chapterStandard Deviation
  • \beginequation \labelEsd
  • \sigma \sqrt\frac\sum\limits_i1n
  • \left(x_i - \barx\right)2
  • n-1
  • \endequation
  • \enddocument

29
(No Transcript)
30
Changing the document styles
  • \documentclassarticle
  • \documentclassbook
  • \documentclassletter
  • \documentclassreport

31
Report document style(main.tex)
  • \documentclassreport
  • \titleAssignment 2 for SIMG726
  • \authorRolando V. Raque\no
  • \begindocument
  • \maketitle
  • \tableofcontents
  • \enddocument

32
(No Transcript)
33
Create the following chapters
  • chapter_sum.tex
  • chapter_mean.tex
  • chapter_sd.tex

34
chapter_mean.tex
  • \chapterMean \labelCMean
  • \beginequation \labelEmean
  • \barx \frac\sum_i1nx_i n
  • \endequation

35
chapter_sum.tex
  • \chapterSum \labelCSum
  • \beginequation \labelEsum
  • s \sum_i1nx_i
  • \endequation

36
chapter_sd.tex
  • \chapterStandard Deviation \labelCSD
  • \beginequation \labelEsd
  • \sigma \sqrt\frac\sum\limits_i1n
  • \left(x_i - \barx\right)2
  • n-1
  • \endequation

37
Modify main.tex to include chapters
  • \documentclassreport
  • \titleAssignment 2 for SIMG726
  • \authorRolando V. Raque\no
  • \begindocument
  • \maketitle
  • \tableofcontents
  • \includechapter_sum
  • \includechapter_mean
  • \includechapter_sd
  • \enddocument

38
(No Transcript)
39
Modify chapter_sd.tex
  • \chapterStandard Deviation \labelCSD
  • \endequation
  • We can see that equation \refEsd uses equation
  • \refEmean to compute the mean and that the
    \emphMean
  • function uses equation \refEsum both of which
    are defined
  • in Chapter \refCSum and \refCMean,
    respectively

40
(No Transcript)
41
Modify main.tex to include chapters
  • \documentclassreport
  • \titleAssignment 2 for SIMG726
  • \authorRolando V. Raque\no
  • \begindocument
  • \maketitle
  • \tableofcontents
  • \includechapter_mean
  • \includechapter_sum
  • \includechapter_sd
  • \enddocument

42
(No Transcript)
43
Including image graphics into you LaTeX document
  • Need to convert your image graphics into EPS
    (encapsulated postscript).
  • For images, use pnmtops, e.g.
  • pnmtops MyCat.pgm MyCat.ps
  • Need to include an extension package to LaTeX
    called graphics using command
  • \usepackagegraphics
  • N.B. In CIS systems, following example works for
    latex but not for pdflatex

44
Image Graphics Example(image.tex)
  • \documentclassarticle
  • \usepackagegraphics
  • \begindocument
  • \beginfigure
  • \includegraphicsMyCat.ps
  • \captionThis is My Cat \labelFMyCat
  • \endfigure
  • \enddocument
Write a Comment
User Comments (0)
About PowerShow.com