Tools - Overview

24
CSE470 Software Engineering Fall 2000 1 Tools - Overview • LaTeX – Tool to create documents • RCS – Revision Control System, to maintain multiple versions of files • XFig – Drawing tool, will be used to create UML diagrams

description

Tools - Overview. LaTeX – Tool to create documents RCS – Revision Control System, to maintain multiple versions of files XFig – Drawing tool, will be used to create UML diagrams. Why LaTeX. A word processing tool capable of creating publishing-quality documents - PowerPoint PPT Presentation

Transcript of Tools - Overview

Page 1: Tools - Overview

CSE470 Software Engineering Fall 2000 1

Tools - Overview

• LaTeX – Tool to create documents

• RCS – Revision Control System, to maintain multiple versions of files

• XFig – Drawing tool, will be used to create UML diagrams

Page 2: Tools - Overview

CSE470 Software Engineering Fall 2000 2

Why LaTeX

• A word processing tool capable of creating publishing-quality documents

• Text-driven: Requires only a simple text editor to achieve complex publishing requirements such as including images, specifying different text styles, creating a bibliography, TOC, etc.

• Works on Unix!

Page 3: Tools - Overview

CSE470 Software Engineering Fall 2000 3

LaTeX - Objectives• Learn how to create simple LaTeX

documents, including:– Including figures– Referencing figures and sections– Inserting other tex files

• Learn how to generate a Postscript file

• Learn some advanced LaTeX features– Creating a Table of Contents– Creating Bibliography

Page 4: Tools - Overview

CSE470 Software Engineering Fall 2000 4

A Simple LaTeX File

\documentclass{article}

\begin{document}

\section{sample section}

Text goes here

\end{document}

Page 5: Tools - Overview

CSE470 Software Engineering Fall 2000 5

Simple LaTeX file after compiling

Page 6: Tools - Overview

CSE470 Software Engineering Fall 2000 6

Sample LaTeX File\documentclass[11pt]{article}\usepackage{boxedminipage, doublespace,

psfig}\begin{document}\title{CSE470: Lab2}\author{Prasad}\date{1/12/2000}\maketitle\section{Introduction to LaTeX}\label{s:IntroSection}Introduction to LaTeX goes here.\end{document}

Page 7: Tools - Overview

CSE470 Software Engineering Fall 2000 7

Sample File Output

Page 8: Tools - Overview

CSE470 Software Engineering Fall 2000 8

Including a PostScript Figure\begin{figure}[h]\begin{center}

\center{\psfig{figure=figname.ps}}\caption{\label{f:figexample} Example of a

figure.}

\end{center}\end{figure}

Page 9: Tools - Overview

CSE470 Software Engineering Fall 2000 9

PostScript Figure Added

Page 10: Tools - Overview

CSE470 Software Engineering Fall 2000 10

Cross-references (internal references)

• \label{key-string}– assigns the key key-string to the current

element of the document

• \ref{key-string}– inserts a string identifying that the element key-

string refers to

• \pageref{key-string}– inserts the number of the page that key-string is

on.

Page 11: Tools - Overview

CSE470 Software Engineering Fall 2000 11

Cross-reference Example

Figure \ref{f:figexample} in Section \ref{s:IntroSection} is on page \pageref{f:figexample}.

Results in:Figure 1 in Section 1 is on page 1.

Page 12: Tools - Overview

CSE470 Software Engineering Fall 2000 12

Including Other LaTeX Files

• LaTeX supports modularity– a single LaTeX document can consist of

multiple LaTeX files

• \input{latex-file}– Command to include other LaTeX files– LaTeX filename includes the .tex extension

Page 13: Tools - Overview

CSE470 Software Engineering Fall 2000 13

Processing a LaTeX file

• latex latex-file.tex– generates latex-file.dvi

• xdvi latex-file.dvi– displays the dvi file for preview

Page 14: Tools - Overview

CSE470 Software Engineering Fall 2000 14

Generating a PostScript File

• Dvips latex-file.dvi– generates latex-file.ps

• gv latex-file.ps– displays the postscript version of the document

• lpr –P mountaind latex-file.ps– prints latex-file.ps to the ‘mountaind’ printer

Page 15: Tools - Overview

CSE470 Software Engineering Fall 2000 15

Generating HTML or ASCII Output

• latex2html latex-file.tex

• dvi2tty latex-file.dvi > latex-file.txt– creates an ascii version of the latex-file

Page 16: Tools - Overview

CSE470 Software Engineering Fall 2000 16

Table of Contents

• Contains titles of section units and the corresponding page number where the section starts

• \tableofcontents– cause LaTeX to generate a .toc file

• Must run LaTeX at least twice

Page 17: Tools - Overview

CSE470 Software Engineering Fall 2000 17

Creating a Bibliography with BibTeX

• Must create a bibliography database– References.bib file– read by BibTeX

• Bibliographies can have different formats– e.g., Alphabetical, Numbered, etc.

• BibTeX formats entries based on the bibliography style chosen– e.g., Plain, Alpha, IEEE, ACM, etc.

Page 18: Tools - Overview

CSE470 Software Engineering Fall 2000 18

BibTeX Entry• Entry Type: book, article, in proceeding, etc.• Keyword identifying publication• Series of Fields

– Author– Journal– Title, etc.

• Example: @book{pressman97,

title = {Software Engg, A practitioner’s Approach}, author = {Roger S.Pressman}, publisher = {McGraw-Hill}, year = {1997} }

Page 19: Tools - Overview

CSE470 Software Engineering Fall 2000 19

Referencing a .bib Entry

• References.bib file must be included in LateX by using

\bibliography{References}

• Cite the reference by using:\cite{cite-key}

• Example:– In \cite{pressman97}, the characteristics of software

are discussed.– Result: In [1], the characteristics of software are

discussed.

Page 20: Tools - Overview

CSE470 Software Engineering Fall 2000 20

Command Sequence

• latex latex-file.tex

• bibtex latex-file

• latex latex-file.tex

Page 21: Tools - Overview

CSE470 Software Engineering Fall 2000 21

LaTeX Files

• Input source file: .tex

• TeX formatted output file: .dvi

• Others: .toc, .lof, .bib, .lot, .log, .aux

Page 22: Tools - Overview

CSE470 Software Engineering Fall 2000 22

Document Classes

• Five standard document classes– article, report, book, slide, letter

• Classes can be further customized– Specify class options– Use additional packages

Page 23: Tools - Overview

CSE470 Software Engineering Fall 2000 23

Xfig Overview• A intuitive, menu-driven drawing tool that will be

run on X-Windows• To start XFig, type ‘xfig’ on the command line (on

X-Windows terminal)• Save file with .fig extension (default) to be able to

edit later• Export file as a PostScript (.ps) file, to be able to

include figure in PostScript documents

Page 24: Tools - Overview

CSE470 Software Engineering Fall 2000 24

References• The LaTeX Companion, Michael Goosens,

et.al.• On-line:

– ‘LaTeX Handouts’ link on Lab Web Page• A Short Introduction to LaTeX• Essential LaTeX• A Gentle Introduction to TeX

– ‘LaTeX Command Summary’ link on Lab Web Page