%% ============================
%%  CMPU-181, Spring 2013
%%  Asmt. 3
%%  sample.tex
%% ============================
%%  This is a sample latex file to use as a template in Asmt. 3.

\documentclass{article}

%% Need the following if you want to cite webpages as shown in this
%% file and in myrefs.bib.
\usepackage{url}

\title{Some Information for Asmt. 3 in CMPU-181}
\author{Luke Hunsberger}

\begin{document}

\maketitle

\section{Citing References}

This section illustrates how to cite references in a Latex document.
For example, a webpage from the United Kingdom describes how to cite
webpages using Latex and Bibtex~\cite{webRef}.  Unfortunately, that
webpage does not specify an author---which makes Bibtex complain,
because it normally sorts the entries in the bibliography according to
the names of the authors.  In contrast, my own webpage has an
author---me!---which means that Bibtex will like this citation much
better~\cite{lukeWebpage}.

Incidentally, I am very interested in the problem of modeling
intentions in computer systems.  The philosopher Michael Bratman wrote
a very influential book on intentions~\cite{book-bratman-87}.  He also
wrote a journal article on what he calls ``shared cooperative
activity''~\cite{bratmanSharedCoopAct}.  Look at the entries in the
{\tt myrefs.bib} file.\footnote{Observe how the ``tt'' command---which
  is short for ``teletype''---can be used to format some text in a
  ``teletype'' font.  Also, check out how this footnote is created in
  Latex!}  Each entry provides information about one reference.

I said, ``Hey there!''  He replied  ``Halloo.''


\section{Presenting Scheme Interactions}

Here is a Scheme function:
\begin{list}{}{}
  \item \begin{verbatim};;;  FACTY
;;; --------------------
;;;  INPUT:  N, a non-negative integer
;;;  OUTPUT:  The factorial of N:  1*2*...*(N-1)*N

(define facty
  (lambda (n)
    (if (= n 0)
        1
        (* n (facty (- n 1))))))\end{verbatim}
\end{list}
The ``list'' environment is used to provide a standard amount of
indentation.  In this case, the ``list'' only has one ``item''.
That item is the ``verbatim'' text that I copied from DrScheme's
definitions window.  Everything in the ``verbatim'' environment
is presented as written, including all typed spaces and carriage
returns (i.e., new lines).

Here are some interactions demonstrating the behavior of the
{\tt facty} function:
\begin{list}{}{}
  \item \begin{verbatim}> (facty 3)
6
> (facty 4)
24
> (facty 8)
40320\end{verbatim}
\end{list}
I copied the above text directly from DrScheme's interactions window.
For this assignment, you may find it useful to present some interactions
from DrScheme that demonstrate your testing of the two sorting algorithms.

\begin{list}{}{}
  \item [$\Rightarrow$] Be sure to look at the {\tt sample.tex} file
    to see the Latex source code that generated the {\tt sample.pdf} 
    article!
\end{list}

%% The following lines are needed to generate the bibliography section.
%% The first line simply says to use a standard format for the bibliography.
%% The second line says that the Bibtex entries are stored in a file myrefs.bib.

\bibliographystyle{plain}
\bibliography{myrefs}

\end{document}
