You are on page 1of 27

LaTeX

Henry Stern Carrie Gates October 22, 2002

What is LaTeX?
Typesetting Language Designed for Science and Mathematics Used in Publishing Industry

Why Use LaTeX?


Easy Publication Easy Cross-References (table of contents, bibliography, figures, tables, etc. --- no renumbering required!) Clean, Tidy, Documents Maintainable Portable Some conferences/journals require it! A Dal thesis style exists, so you dont need to worry about proper formatting

Getting Started with LaTeX


LaTeX Implementations

LaTeX2e http://www.tug.org/ MiKTeX http://www.miktex.org/


Your Favourite Text Editor WinEdt http://www.winedt.com/ LyX Microsoft Visio XFig Gnuplot

LaTeX Editors

Tools for Making Figures

Output Formats
LaTeX

DVI Postscript PDF


PDF, Advanced Features Advanced HTML Output

PDFLaTeX

LaTeX2html

How To Write LaTeX Documents


Create a .tex file (e.g. thesis.tex) Compile using latex

latex thesis.tex xdvi thesis &

View using xdvi

Or convert to postscript using dvips

dvips thesis.dvi > thesis.ps

Or: ask Peter for his makefile!

Sample Proposal
\documentstyle[12pt]{report}

\textwidth=6.5in \textheight=9in \hoffset=-0.5in \voffset=-0.5in \begin{document} \input{epsf}


\title{Detection of Distributed Port Scans \\ A Thesis Proposal} \author{Carrie Gates} \date{10/2002} \maketitle \tableofcontents \newpage

Sample Proposal (contd)


% \begin{abstract} % Brief description of my idea for detection of distributed port scans using % set covering techniques. % \end{abstract} \input{introduction} \input{related} % reads in external file introduction.tex --- can be ispelled % reads in external file related.tex

\appendix \input appendix % this will be labeled Appendix A. % A second input file here would be labeled Appendix B. \bibliographystyle{apalike} \bibliography{proposal} \end{document} % also available: alpha, siam, plain

introduction.tex
\chapter{Introduction}

\section{Problem Description}
\paragraph{} The {\bf problem} to be addressed in this thesis is how can distributed port scans be recognized as one collective port scan, as opposed to multiple independent port scans? Info on port scans can be found in Section \ref{scans}. \paragraph{} Using Brinkley and Schell's classification scheme\cite{brinkley95a}, port scans are ``direct probes, so are not in and of themselves dangerous. To quote Brinkley and Schell\cite{brinkley95a}: \begin{quote} We must assume that a serious penetration attempt will be indirect in nature, will not require direct physical access by the penetrator and/or operator to the penetrated target, and will not advertise its presence or cause easily observable disturbances to the system's behaviour. \end{quote}

related.tex
\chapter{Literature Review} \paragraph{} This chapter will provide background on both the people involved in computer attacks and the tools they use. \section{Port Scans}\label{scans} \paragraph{} There are four types of scans, which are defined by the target information to be gathered: \begin{itemize} \item vertical scans, \item horizontal scans, \item strobe scans, and \item block scans. \end{itemize} A vertical scan refers to scanning all of the ports on a single system to determine what services that one system is running.

related.tex (contd)
\subsection{Stealth Port Scans} \paragraph{} Figure \ref{svm} shows a support vector machine. \epsfysize=5cm \begin{figure}[t] \center{ \leavevmode \epsfbox{svm.eps} \caption{A data set consisting of two classes, represented here as solid circles, can be separated using a hyperplane. The dashed line shows the convex hulls for the two sets.} \label{svm} } \end{figure} \paragraph{} This is some verbatim text: \begin{verbatim} alert tcp $EXTERNAL_NET 10101 -> $HOME_NET any alert tcp $EXTERNAL_NET 31790 -> $HOME_NET 31789 \end{verbatim}

related.tex (contd)
\begin{table}[t] \begin{center} \begin{tabular}{|l|l|l|} \hline anomaly & self-learning & non time series \\ & & \\ \cline{3-3} & & time series \\ \cline{2-3} & programmed & descriptive stat \\ & & \\ & & \\ \cline{3-3} & & default deny \\ \hline \hline signature & programmed & state-modelling \\ & & \\ \cline{3-3} & & expert-system \\ \cline{3-3} & & string-matching \\ \cline{3-3} & & simple rule-based \\ \hline \hline signature-inspired & self-learning & automatic feature selection \\ \hline \end{tabular} \caption{Taxonomy of Intrusion Detection Systems, adapted from Axelsson\cite{axelsson00a}} \label{axtax} \end{center} \end{table}

Bibliographies
Many possible types:

article book inbook inproceedings mastersthesis phdthesis techreport unpublished misc

http://www.ucalgary.ca/it/TeXclassfiles/AIX-52.html

Sample Article
@article{cortes95a, AUTHOR = "Corinna Cortes and Vladimir Vapnik", YEAR = 1995, TITLE = "Support-Vector Networks", JOURNAL = "Machine Learning", VOLUME = 20, NUMBER = 3, PAGES = {273 -- 297} }

All articles are contained in proposal.bib Need to bibtex it (bibtex proposal.bib) Can have ALL readings in bibtex file only those referenced will be used to generate the dvi file

So
Files:

Proposal.tex Introduction.tex Related.tex Appendix Proposal.bib

Commands:

latex proposal bibtex proposal latex proposal latex proposal

- generates proposal.aux - generates proposal.bbl - reads from proposal.bbl - fixes cross-references

The dalthesis Class


Helps Your Thesis Meet the FGS Regulations for Submission of Theses Margins Spacing Title Pages Table of Contents, Lists of Tables, etc.

thesis.tex
\documentclass{dalthesis} \usepackage[dvips]{epsfig} \graphicspath{{figures/}} \begin{document} \title{An Investigation of the Last Theorem of Fermat} \author{Pierre Wiles} \phd \twosupervisors \supervisor{Andrew Tamref} \firstreader{John Smith} \secondreader{Jane Doe} \thirdreader{Tara Whalen} \examiner{Kirstie Hawkey} \submitdate{March 1999} \copyrightyear{1999} \convocation{May}{1999}

thesis.tex (contd)
\dedicate{I dedicate this great\\ piece of work\\ To me!} \beforepreface \input{abstract} \input{acknow} \afterpreface \include{intro} \include{conclude} \bibliographystyle{plain} \bibliography{refs} \end{document}

Followed by: Dedication Table of contents List of tables List of figures Abstract Chapter 1, etc.

Environments
Text Math

\[\sum_{i=1}^n i = \frac{n(n+1)}{2}\] Inline:


My equation is $\alpha = \frac{n}{2} \times \xi$.

\begin{equation} \end{equation} http://www.agu.org/symbols.html

\begin{equation} \end{equation}
\begin{equation} x = \left\{ \begin{array}{lr} y & \mbox{if $y > 0$} \\ z+y & \mbox{otherwise} \end{array} \right. \end{equation}

Where to Get Help


LaTeX Documentation on Locutus

/opt/teTeX/share/texmf/doc
http://www.tug.org/ http://www.mscs.dal.ca/~clyde/dalthesis/ http://www.google.ca

Documentation Online

Fellow Students Profs (e.g. Dr. McAllister, Dr. Blustein)

You might also like