LaTeX Henry Stern Carrie Gates October 22, 2002. What is LaTeX? Typesetting Language Designed for...

27
LaTeX LaTeX Henry Stern Henry Stern Carrie Gates Carrie Gates October 22, 2002 October 22, 2002

Transcript of LaTeX Henry Stern Carrie Gates October 22, 2002. What is LaTeX? Typesetting Language Designed for...

LaTeXLaTeX

Henry SternHenry SternCarrie GatesCarrie Gates

October 22, 2002October 22, 2002

What is LaTeX?What is LaTeX?

Typesetting LanguageTypesetting Language

Designed for Science and MathematicsDesigned for Science and Mathematics

Used in Publishing IndustryUsed in Publishing Industry

Why Use LaTeX?Why Use LaTeX?

Easy PublicationEasy PublicationEasy Cross-References (table of contents, Easy Cross-References (table of contents, bibliography, figures, tables, etc. --- no renumbering bibliography, figures, tables, etc. --- no renumbering required!)required!)Clean, Tidy, DocumentsClean, Tidy, DocumentsMaintainableMaintainablePortablePortableSome conferences/journals require it!Some conferences/journals require it!A Dal thesis style exists, so you don’t need to worry A Dal thesis style exists, so you don’t need to worry about proper formattingabout proper formatting

Getting Started with LaTeXGetting Started with LaTeX

LaTeX ImplementationsLaTeX Implementations LaTeX2e LaTeX2e http://www.tug.org/http://www.tug.org/ MiKTeX MiKTeX http://www.miktex.org/http://www.miktex.org/

LaTeX EditorsLaTeX Editors Your Favourite Text EditorYour Favourite Text Editor WinEdt WinEdt http://www.winedt.com/http://www.winedt.com/ LyXLyX

Tools for Making FiguresTools for Making Figures Microsoft VisioMicrosoft Visio XFigXFig GnuplotGnuplot

Output FormatsOutput Formats

LaTeXLaTeX DVIDVI PostscriptPostscript PDFPDF

PDFLaTeXPDFLaTeX PDF, Advanced FeaturesPDF, Advanced Features

LaTeX2htmlLaTeX2html Advanced HTML OutputAdvanced HTML Output

How To Write LaTeX DocumentsHow To Write LaTeX Documents

Create a .tex file (e.g. thesis.tex)Create a .tex file (e.g. thesis.tex)

Compile using latexCompile using latex latex thesis.texlatex thesis.tex

View using xdviView using xdvi xdvi thesis &xdvi thesis &

Or convert to postscript using dvipsOr convert to postscript using dvips dvips thesis.dvi > thesis.psdvips thesis.dvi > thesis.ps

Or: ask Peter for his makefile!Or: ask Peter for his makefile!

Sample ProposalSample Proposal\documentstyle[12pt]{report}\documentstyle[12pt]{report}

\textwidth=6.5in\textwidth=6.5in\textheight=9in\textheight=9in\hoffset=-0.5in\hoffset=-0.5in\voffset=-0.5in\voffset=-0.5in

\begin{document}\begin{document}\input{epsf}\input{epsf}

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

Sample Proposal (cont’d)Sample Proposal (cont’d)% \begin{abstract}% \begin{abstract}% Brief description of my idea for detection of distributed port scans using% Brief description of my idea for detection of distributed port scans using% set covering techniques.% set covering techniques.% \end{abstract}% \end{abstract}

\input{introduction}\input{introduction} % reads in external file introduction.tex --- can be % reads in external file introduction.tex --- can be ispellispell’ed’ed

\input{related}\input{related} % reads in external file related.tex% reads in external file related.tex

\appendix\appendix\input appendix\input appendix % this will be labeled Appendix A.% this will be labeled Appendix A.% A second input file here would be labeled Appendix B.% A second input file here would be labeled Appendix B.

\bibliographystyle{apalike}\bibliographystyle{apalike} % also available: % also available: alpha, siam, plainalpha, siam, plain\bibliography{proposal}\bibliography{proposal}

\end{document}\end{document}

introduction.texintroduction.tex\chapter{Introduction}\chapter{Introduction}

\section{Problem Description}\section{Problem Description}

\paragraph{}\paragraph{}The The {\bf problem}{\bf problem} to be addressed in this thesis is how can distributed port scans be to be addressed in this thesis is how can distributed port scans berecognized as one collective port scan, as opposed to multiple independent port scans?recognized as one collective port scan, as opposed to multiple independent port scans?Info on port scans can be found in Section Info on port scans can be found in Section \ref{scans}.\ref{scans}.

\paragraph{}\paragraph{}Using Brinkley and Schell's classification schemeUsing Brinkley and Schell's classification scheme\cite{brinkley95a},\cite{brinkley95a}, port scans are port scans are ````directdirectprobesprobes’’’’, so are not in and of themselves dangerous. To quote Brinkley and, so are not in and of themselves dangerous. To quote Brinkley andSchell\cite{brinkley95a}:Schell\cite{brinkley95a}:\begin{quote}\begin{quote}We must assume that a serious penetration attempt will be indirect in nature, will notWe must assume that a serious penetration attempt will be indirect in nature, will notrequire direct physical access by the penetrator and/or operator to the penetrated target,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 theand will not advertise its presence or cause easily observable disturbances to thesystem's behaviour….system's behaviour….\end{quote}\end{quote}

related.texrelated.tex\chapter{Literature Review}\chapter{Literature Review}

\paragraph{}\paragraph{}This chapter will provide background on both the people involved in computer attacksThis chapter will provide background on both the people involved in computer attacksand the tools they use.and the tools they use.

\section{Port Scans}\label{scans}\section{Port Scans}\label{scans}

\paragraph{}\paragraph{}There are four types of scans, which are defined by the target information to be gathered:There are four types of scans, which are defined by the target information to be gathered:\begin{itemize}\begin{itemize}\item\item vertical scans, vertical scans,\item horizontal scans,\item horizontal scans,\item strobe scans, and\item strobe scans, and\item block scans.\item block scans.\end{itemize}\end{itemize}A vertical scan refers to scanning all of the ports on a single system to determine whatA vertical scan refers to scanning all of the ports on a single system to determine whatservices that one system is running.services that one system is running.

related.tex (cont’d)related.tex (cont’d)\subsection{Stealth Port Scans}\subsection{Stealth Port Scans}

\paragraph{}\paragraph{}Figure \ref{svm} shows a support vector machine.Figure \ref{svm} shows a support vector machine.\epsfysize=5cm\epsfysize=5cm\begin{figure}[t]\begin{figure}[t]\center{\center{\leavevmode\leavevmode\epsfbox{svm.eps}\epsfbox{svm.eps}\caption{A data set consisting of two classes, represented here as solid circles, can be\caption{A data set consisting of two classes, represented here as solid circles, can beseparated using a hyperplane. The dashed line shows the convex hulls for the two sets.}separated using a hyperplane. The dashed line shows the convex hulls for the two sets.}\label{svm}\label{svm}}}\end{figure}\end{figure}

\paragraph{}\paragraph{}This is some verbatim text:This is some verbatim text:\begin{verbatim}\begin{verbatim}alert tcp $EXTERNAL_NET 10101 -> $HOME_NET anyalert tcp $EXTERNAL_NET 10101 -> $HOME_NET anyalert tcp $EXTERNAL_NET 31790 -> $HOME_NET 31789alert tcp $EXTERNAL_NET 31790 -> $HOME_NET 31789\end{verbatim}\end{verbatim}

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

BibliographiesBibliographies

Many possible types:Many possible types: articlearticle bookbook inbookinbook inproceedingsinproceedings mastersthesismastersthesis phdthesisphdthesis techreporttechreport unpublishedunpublished miscmisc

http://www.http://www.ucalgaryucalgary.ca/it/.ca/it/TeXclassfilesTeXclassfiles/AIX-52.html/AIX-52.html

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

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

So…So…Files:Files: Proposal.texProposal.tex Introduction.texIntroduction.tex Related.texRelated.tex AppendixAppendix Proposal.bibProposal.bib

Commands:Commands: latex proposallatex proposal - generates proposal.aux- generates proposal.aux bibtex proposalbibtex proposal - generates proposal.bbl- generates proposal.bbl latex proposallatex proposal - reads from proposal.bbl- reads from proposal.bbl latex proposallatex proposal - fixes cross-references- fixes cross-references

The The dalthesisdalthesis Class Class

Helps Your Thesis Meet the FGS’ Helps Your Thesis Meet the FGS’ “Regulations for Submission of Theses ““Regulations for Submission of Theses “

MarginsMargins

SpacingSpacing

Title PagesTitle Pages

Table of Contents, Lists of Tables, etc.Table of Contents, Lists of Tables, etc.

thesis.texthesis.tex\documentclass{dalthesis}\documentclass{dalthesis}\usepackage[dvips]{epsfig}\usepackage[dvips]{epsfig}\graphicspath{{figures/}}\graphicspath{{figures/}}

\begin{document}\begin{document}

\title{An Investigation of the Last Theorem of Fermat}\title{An Investigation of the Last Theorem of Fermat}\author{Pierre Wiles}\author{Pierre Wiles}

\phd\phd\twosupervisors\twosupervisors\supervisor{Andrew Tamref}\supervisor{Andrew Tamref}\firstreader{John Smith}\firstreader{John Smith}\secondreader{Jane Doe}\secondreader{Jane Doe}\thirdreader{Tara Whalen}\thirdreader{Tara Whalen}\examiner{Kirstie Hawkey}\examiner{Kirstie Hawkey}

\submitdate{March 1999}\submitdate{March 1999}\copyrightyear{1999}\copyrightyear{1999}\convocation{May}{1999}\convocation{May}{1999}

thesis.tex (cont’d)thesis.tex (cont’d)\dedicate{I dedicate this great\\\dedicate{I dedicate this great\\ piece of work\\piece of work\\ To me!}To me!}

\beforepreface\beforepreface

\input{abstract}\input{abstract}\input{acknow}\input{acknow}

\afterpreface\afterpreface

\include{intro}\include{intro}\include{conclude}\include{conclude}

\bibliographystyle{plain}\bibliographystyle{plain}\bibliography{refs}\bibliography{refs}

\end{document}\end{document}

Followed by:

• Dedication

• Table of contents

• List of tables

• List of figures

• Abstract

• Chapter 1, etc.

EnvironmentsEnvironments

TextText

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

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

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

\begin{equation} … \end{equation}\begin{equation} … \end{equation}

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

Where to Get HelpWhere to Get Help

LaTeX Documentation on LocutusLaTeX Documentation on Locutus /opt/teTeX/share/texmf/doc/opt/teTeX/share/texmf/doc

Documentation OnlineDocumentation Online http://www.tug.org/http://www.tug.org/ http://www.http://www.mscsmscs..daldal.ca/~.ca/~clydeclyde//dalthesisdalthesis// http://www.http://www.googlegoogle.ca.ca

Fellow StudentsFellow Students

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