latex/examples/final.tex
author Puneeth Chaganti <puneeth@fossee.in>
Fri, 18 Sep 2009 15:49:06 +0530
changeset 62 780effcd7c5a
parent 56 eee394eb05fc
permissions -rw-r--r--
fixed table in session4.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
56
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
     1
%hello.tex - First LaTeX document
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
     2
\documentclass[11pt,a4paper,twoside]{article}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
     3
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
     4
\usepackage{graphicx}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
     5
\usepackage{listings}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
     6
\usepackage{amsmath}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
     7
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
     8
\lstset{language=Python, showstringspaces=false}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
     9
\bibliographystyle{plain}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    10
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    11
\title{LaTeX - A Two Hour Introduction}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    12
\author{The FOSSEE Team}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    13
\date{August 2009}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    14
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    15
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    16
\begin{document}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    17
\maketitle
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    18
\tableofcontents
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    19
\listoftables
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    20
\listoffigures
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    21
\begin{abstract}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    22
This is a sample document to be used in the STTP course for a quick introduction to \LaTeX
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    23
\end{abstract}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    24
\section{Introduction}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    25
LaTeX is a typesetting program used to produce excellently typeset documents. It is extensively used for producing high quality scientific and mathematical documents. It may also be used for producing other kinds of documents, ranging from simple one page articles or letters 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    26
\section{Structural Elements}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    27
Let us now look at giving a better structure to our document. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    28
\subsection{documentclass}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    29
The \verb+documentclass+ variable tells \LaTeX, the type of document we wish to prepare. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    30
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    31
\subsection{Sections, Chapters and Parts}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    32
We shall first look at how to divide the document into Sections, Chapters and Parts. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    33
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    34
\subsubsection{Appendices}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    35
I can't tell you how to add an appendix, in the main document. Refer Appendix \ref{append} to see how to do it. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    36
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    37
\section{Text Typesetting}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    38
\begin{itemize}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    39
\item Now we move onto some elementary \emph{Text Typesetting}.
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    40
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    41
\item How do we get \emph{emphasized or italic text}?
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    42
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    43
\item \emph{Did you wonder what happens when we try \emph{emphasizing text} within \emph{emphasized text}}?
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    44
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    45
\item ``Beautiful is better than ugly.''
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    46
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    47
\item `In the face of ambiguity, refuse the temptation to guess.'
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    48
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    49
\item LaTeX has 4 different types of dashes. The names of these dashes are: `-' hyphen, `--' en-dash, `---' em-dash and `$-$' minus sign. \footnote{We shall look at how to do math in a later section}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    50
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    51
\item \LaTeX has \verb+enumerate+, \verb+itemize+ and \verb+description+ commands to generate lists. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    52
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    53
\end{itemize}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    54
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    55
\begin{flushleft}This is left flushed text. \LaTeX normally produces text with no white space at the end of the line. But, this text isn't so, if you can see.\end{flushleft}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    56
\begin{flushright}Similarly, Right-aligned Text here\end{flushright}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    57
\begin{center} and centered text here.\end{center}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    58
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    59
\begin{description}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    60
  \item[Description] This list is a description list. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    61
  \item[Enumerate] Numbered lists are often useful.
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    62
    \begin{enumerate}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    63
    \item First
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    64
    \item Second
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    65
    \item Third
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    66
    \item \ldots
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    67
    \end{enumerate}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    68
  \item[Itemize] The list above this description list is an itemize list.
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    69
\end{description}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    70
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    71
\subsection{Quotes \& Verbatim Text}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    72
Since the \emph{Zen of Python} instructs that, 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    73
\begin{quote}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    74
Readability counts.
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    75
\end{quote}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    76
we use the \verb+quote+ environment to include quotes. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    77
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    78
\begin{verbatim}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    79
def signum( r ):
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    80
    """returns 0 if r is zero
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    81
    -1 if r is negative
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    82
    +1 if r is positive"""
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    83
    if r < 0:
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    84
        return -1
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    85
    elif r > 0:
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    86
        return 1
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    87
    else:
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    88
        return 0
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    89
\end{verbatim}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    90
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    91
\section{Tables \& Figures}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    92
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    93
\begin{table}[h]
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    94
\caption{A simple table, on making tables}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    95
\centering
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    96
\begin{tabular}{|c|c|}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    97
  \hline
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    98
  \verb+l+ & left justified column content\\ 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
    99
  \hline
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   100
  \verb+r+ & right justified column content\\ 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   101
  \hline
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   102
  \verb+c+ & centered column content\\ 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   103
  \hline
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   104
  \verb+*{n}{col}+ & produces \verb+n+ columns with the\\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   105
                   & \verb+col+ type of formatting\\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   106
  \cline{2-2}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   107
                   &\verb+*{3}{c}+ is the same as \verb+{c c c}+ \\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   108
  \hline
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   109
  \verb+|+ & produces a vertical line\\ 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   110
  \hline
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   111
\end{tabular}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   112
\end{table}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   113
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   114
\begin{figure}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   115
\centering
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   116
\caption[CTAN Lion]{CTAN lion drawing by Duane Bibby; thanks to www.ctan.org}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   117
\label{fig:lion}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   118
\includegraphics[scale=0.8, angle=30]{lion_orig.png}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   119
\end{figure}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   120
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   121
List of Tables and List of figures can be autogenerated suigng the \verb+\listoftables+ and \verb+\listoffigures+ commands. Let's insert them after the table of contents. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   122
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   123
Cross referencing is one of the best features of \LaTeX. The CTAN lion has the figure number \ref{fig:lion} and is on page number \pageref{fig:lion}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   124
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   125
It was drawn by Duane Bibby, a well-known commercial artist. He used this lion in the illustrations for Donald Knuth's original TeXbook\cite{Knuth84}, for Leslie Lamport's LaTeX book\cite{Lamport94}, and for other books having to do with TeX, so his work is familiar to everyone in the community. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   126
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   127
%% \begin{thebibliography}{99}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   128
%%   \bibitem{Knuth84} Donald E. Knuth (1984). \emph{The TeXbook} (Computers and Typesetting, Volume A). Reading, Massachusetts: Addison-Wesley. ISBN 0-201-13448-9.
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   129
  
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   130
%%   \bibitem{Lamport94} Lamport, Leslie (1994). \emph{LaTeX: A document preparation system: User's guide and reference}.
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   131
%%      illustrations by Duane Bibby (2nd ed.). Reading, Mass: Addison-Wesley Professional. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   132
%% \end{thebibliography}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   133
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   134
\section{Typesetting Math}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   135
The equation $F=m \cdot a$ is an equation, that has been set inline. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   136
Equation \eqref{force} is the same equation typeset in the display style. Note, that it is also numbered. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   137
\begin{equation}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   138
\label{force}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   139
F=m\cdot a
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   140
%%\tag{Fore-acceleration}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   141
\end{equation}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   142
More equations --- vertically aligned. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   143
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   144
\begin{align}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   145
\alpha^2 + \beta^2 &= \gamma^2 \\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   146
\sum_{i=1}^ni &= \frac{n(n+1)}{2}\\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   147
\sqrt{-1} &= \pm1 \nonumber \\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   148
y &= \frac{r_1^2-r_3^2-x^2+(x-i)^2+j^2}{2j} \nonumber \\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   149
  &= \frac{r_1^2-r_3^2+i^2+j^2}{2j}-\frac{i}{j}x \\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   150
\end{align}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   151
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   152
\begin{equation*}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   153
s(t) = \left\{
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   154
 \begin{array}{rl}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   155
   0 & \text{if } t \le 0\\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   156
   1 & \text{if } t > 0
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   157
 \end{array} \right.
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   158
\end{equation*}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   159
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   160
\begin{equation*}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   161
\mathbf{X} = \left(
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   162
 \begin{array}{ccc}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   163
 a_1 & a_2 & \ldots \\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   164
 b_1 & b_2 & \ldots \\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   165
 \vdots & \vdots & \ddots
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   166
 \end{array} \right)
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   167
\end{equation*}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   168
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   169
\begin{equation}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   170
  \begin{matrix}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   171
  1 & 2 \\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   172
  3 & 4
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   173
  \end{matrix} \qquad \& \qquad 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   174
  \begin{bmatrix}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   175
  1 & 2 & 3 \\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   176
  4 & 5 & 6 \\
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   177
  7 & 8 & 9
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   178
  \end{bmatrix}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   179
\end{equation}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   180
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   181
\section{Miscellaneous}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   182
\subsection{Presentations}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   183
\subsection{Including Code}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   184
\begin{lstlisting}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   185
string="Hello, World! "
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   186
for i in range(10):
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   187
    print string*i
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   188
\end{lstlisting} 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   189
\subsection{Including files}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   190
\input{final-include}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   191
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   192
\bibliography{final}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   193
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   194
\appendix
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   195
\section{Appendices - How to}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   196
\label{append}
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   197
Every Part, Chapter or Section that follows the \verb+\appendix+ command is included in the appendix. Appendices have auto numbering too. The numbering begins freshly in the appendices. 
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   198
eee394eb05fc Added Loops section in ULT, modified LaTeX handout to use examples from sample doc.
Puneeth Chaganti <puneeth@fossee.in>
parents:
diff changeset
   199
\end{document}