\documentclass[12pt]{article} \usepackage{listings} \usepackage{fullpage} \usepackage{url} \usepackage{amsmath} \usepackage{comment} %\usepackage{hyperref} %\usepackage{verbatim} \usepackage{setspace} \usepackage{sectsty} \usepackage{mathdots} %\usepackage[pdftex]{graphicx} % This % ANY LATEX paper. Typically I'll use this file and some other file in the % directory of the paper, this one for general math things, that one for % things specific to that paper. % % font's used and general paper things. \font\tenrm=cmr10 \font\ninerm=cmr9 \font\eightrm=cmr8 \font\sevenrm=cmr7 % \font\title=cmbx10 scaled \magstep1 % extra big title font \font\ss=cmss10 % used by \proof \font\smallcaps=cmcsc10 % used to label Theorems, etc. % imhibit black bars on overflows % \overfullrule=0pt % % today's date % % % English words that I always italizice in papers. % Some words that appear in math mode alot that I wasn roman % \begin{document} %\lstset{language=Pascal} \newcommand{\While}{{\bf While }} \newcommand{\inp}{{\bf Input}} \newcommand{\N}{{\sf N}} \newcommand{\simple}{1 } \newcommand{\simplens}{1} \section{Using lstlisting} \begin{lstlisting}[mathescape,title={Program~\simple}] $(x,y,z) = (\inp(\N),\inp(\N),\inp(\N))$ While $x>0$ and $y>0$ and $z>0$ control := $\inp(1,2,3)$ if control = 1 $(x,y,z)=(x^2+10,y-x,z-10)$ else if control = 2 $(x,y,z)=(y^2+17,y-z^2,x-y)$ else if control = 3 $(x,y,z)=(y+17,xyz,x+y+z)$ \end{lstlisting} \section{Using Obeylines} \begin{obeylines} Does this also obey indenting Lets find out \end{obeylines} \section{Using Verbatim} \begin{verbatim} Is this text Ugly? Does it indent? \end{verbatim} \section{Using enumerate without numbers} \begin{enumerate} \item[] If this works then \begin{enumerate} \item[] Give me an A on the HW \item[] Give me an A on the next HW \end{enumerate} \item[] else \begin{enumerate} \item[] Help me get it right. \item[] I hope my mistake enlightens me \end{enumerate} \end{enumerate} \end{document}