% texintro.tex
%
% Subject:
%   Major topics covered in first half of the semester.
%
% Bruce M. Bolden			Februrary 23, 1999
% Updated:
%
%-----------------------------------------------
%

% Handouts 
\def\lecpb{}

%  Lecture
%\def\lecpb{\pagebreak}


\documentstyle[12pt]{article}

\pagestyle{myheadings}
\markboth{CS 102}{Introduction to \LaTeX}

\begin{document}

\large

\section{Document Layout}

\begin{verbatim}
%  file.tex
\documentstyle[12pt]{article}

\begin{document}

  Contents of your document.  

\end{document}
\end{verbatim}

\lecpb

\section{Commands}

Most commands in \TeX and \LaTeX start with a \verb+\+.

Comments can be placed in document using a \%.  It behaves
in a manner similar to the \verb+//+ in C++.

Curly braces  (\{ and \}) are used to group or delimit text.


\lecpb

\section{Section Commands}

There are commands for automatically generating sections.  This
is done by placing the section title within the curly braces
following one of the section commands.

\begin{verbatim}
\section{Main Section}
\subsection{A Subsection}
\subsubsection{A Subsubsection}
\end{verbatim}


\lecpb

\subsection{Emphasizing Text}

\noindent  This text is {\em emphasized}.

\begin{verbatim}
This text is {\em emphasized}.
\end{verbatim}

\noindent  This text is {\bf bold}.

\begin{verbatim}
This text is {\bf bold}.
\end{verbatim}

\noindent  This text is {\tt typewriter}-like.

\begin{verbatim}
This text is {\tt typewriter}-like.
\end{verbatim}


\lecpb

\subsection{Lists}

Lists are created very easily using \LaTeX.  The two most
common lists are bulleted and enumerated.

\subsubsection{Bulleted List}

\begin{itemize}

\item Variables
\begin{itemize}
\item naming conventions
\item types
\begin{itemize}
\item char
\item integer
\item real numbers
\end{itemize}
\end{itemize}

\end{itemize}

The preceding list was created using:

\begin{verbatim}
\begin{itemize}

\item Variables
\begin{itemize}
\item naming conventions
\item types
\begin{itemize}
\item char
\item integer
\item real numbers
\end{itemize}
\end{itemize}

\end{itemize}
\end{verbatim}

\lecpb

\subsubsection{Enumerated List}

\begin{enumerate}
\item char
\item integer
\item real numbers
\end{enumerate}

The preceding list was created using:

\begin{verbatim}
\begin{enumerate}
\item char
\item integer
\item real numbers
\end{enumerate}
\end{verbatim}


\lecpb

\section{Mathematics}

One of the reasons many people use \LaTeX is the output of
mathematical equations.

\[ 
\int_{0}^{\frac{\pi}{4}} \cos x dx
\]

\begin{verbatim}
\[ 
\int_{0}^{\frac{\pi}{4}} \cos x dx
\]
\end{verbatim}


\lecpb

\section{\LaTeX{} on the CS Machines}

To process your \LaTeX{} file:

\begin{verbatim}
latex file.tex
\end{verbatim}

If your file is processed successfully, it will generate a 
number of files: 

\begin{tabular}{ll}
file.aux    &  auxiliary file \\
file.dvi    &  DVI file       \\
file.log    &  a log
\end{tabular}

\lecpb

\subsection{Viewing}

It is a good idea to view your \TeX{} output before printing it.
This is done using {\tt xdvi}.

\begin{verbatim}
xdvi file.dvi
\end{verbatim}

\noindent  Note:  It may be necessary to set your display variable 
for {\tt xdvi} to work properly.

\lecpb

\subsection{Printing}

To print your output, you must convert from a DVI file to
{\sc PostScript}.  The utility for doing this is  {\tt dvips}

\begin{verbatim}
dvips  file.dvi
\end{verbatim}

\noindent  The output of {\tt dvips} is a file named {\tt file.ps}.  
This file may be sent directly to the printer.


\end{document}

