LATEX - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

LATEX

Description:

Student No: 12345678 Login ID: s00bfxxx Email: fergus. ... textbf{text} Bold Face. It is considered very bad practice to use underlines in Latex documents. ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 23
Provided by: fergus6
Category:
Tags: latex | book | face | in | log

less

Transcript and Presenter's Notes

Title: LATEX


1
LATEX
  • Fergus Toolan
  • Intelligent Information Retrieval Group
  • University College Dublin

2
What is Latex?
  • Latex appeared in 1982 as an extension to TeX.
  • TeX was created in 1978 by Donald Knuth (The Art
    of Computer Programming)
  • It is a typesetting language.
  • Especially good for Mathematical documents.

3
Components
  • Latex file This is where you write your Latex
    commands and the document text. Use a .tex
    extension.
  • DVI file The file generated when the .tex file
    is compiled. (DeVice independent)
  • EPS Encapsulated Postscript used for graphics.
  • PDF Portable Document Format.

4
Latex Commands
  • \command_nameparameter list
  • Some include
  • \textbfHello World
  • \emphHello World
  • \citetoolan2003
  • \\
  • \titleLatex Guide

5
Beginning a document
  • \documentclasstimes,10pt,twocolumnarticle
  • This gives us a document using Times new Roman in
    10pt font.
  • The document contains two columns
  • It is of class article others include book,
    report (used for a thesis or final year report)

6
Packages
  • Like programming languages Latex imports alot of
    extra functionality.
  • To do this \usepackagepackage_name
  • The only one you are likely to need is graphicx
  • \usepackagegraphicx

7
Beginning the document
  • Now we are ready to begin the document properly.
  • \begindocument
  • Like blocks of code in programming a begin
    directive must be followed by an end directive.
  • At the end so put \enddocument

8
The Title
  • \titleEssay Title
  • \authorFergus Toolan \\
  • Student No 12345678 \\
  • Login ID s00bfxxx \\
  • Email fergus.toolan_at_ucd.ie
  • \maketitle

9
Comments in Latex
  • Like all programming languages sometimes comments
    are essential.
  • The is the comment character
  • Anything appearing after is ignored by Latex.
  • ----------------------- often used to divide
    sections for human readers.

10
in Latex
  • is the comment character but what happens if we
    wish to print a sign.
  • It must be escaped.
  • To escape a character in latex use \ (like Java)
  • So to print a the latex command is \

11
The Abstract
  • the abstract is standard in all scientific papers
    and reports. It is a brief (lt 100 words) synopsis
    of the paper.
  • To write an abstract
  • \beginabstract
  • text goes here
  • \endabstract

12
Sections
  • Sections provide some form of organisation for a
    report.
  • \sectionIntroduction
  • Subsections
  • \subsectionName of Subsection

13
Formatting
  • Paragraphs.
  • Hitting the return key twice will begin a new
    paragraph
  • EG
  • This is paragraph 1.
  • This is paragraph 2.

14
Formatting
  • Newlines
  • \\ gives a new line. However this must occur on a
    line with some text on it.
  • Correct
  • We need a new line \\
  • Incorrect
  • We need a new line
  • \\

15
Formatting
  • Fonts
  • \emphtext emphasis i.e. italics
  • \textbftext Bold Face.
  • It is considered very bad practice to use
    underlines in Latex documents.
  • This is a throwback to old manually typesetting.

16
Figures
  • When a figure image, equation, algorithm etc
    appears it has a caption and a number.
  • \beginfigure
  • Equation algorithm image etc....
  • \caption\labeleg_figThis is the eg figure
  • \endfigure

17
Figures
  • The previous example will appear as...
  • Picture or equation appears here.
  • Figure 1 This is the eg figure.

18
Figures
  • To refer to a figure in text use
  • As can be seen in Figure \refeg_fig the
    values....
  • Hence Latex worries about the number not the
    person writing the document.

19
Graphics
  • \includegraphicsfilename.eps
  • Normally inside a figure.
  • Encapsulated Postscript format
  • convert orig_file new_file
  • Or can be created in PSP or Fireworks.

20
References
  • All scientific documents must contain references.
  • \beginthebibliography99
  • \bibitemtoolan2004 Toolan, F. A guide to
    Latex, 2004.
  • \endthebibliography

21
References
  • To then refer to the reference we use the
    following.
  • In the guide to latex \citetoolan2004 Toolan
    stated that....
  • It is essential to reference correctly.

22
Compiling
  • To generate a PDF file use the following commands
  • latex file.tex
  • latex file.tex (must do this twice)
  • xdvi file.dvi (will view the dvi file.)
  • dvipdf file.dvi (will create the PDF file)
  • xpdf file.pdf (to view the PDF file)
Write a Comment
User Comments (0)
About PowerShow.com