latex/workbook/example8.tex
author Puneeth Chaganti <punchagan@fossee.in>
Tue, 31 Aug 2010 19:10:09 +0530
changeset 108 d90e054894cd
parent 107 80a8b46754f8
permissions -rw-r--r--
Merged heads.

\documentclass[english]{beamer}

% generated by Docutils <http://docutils.sourceforge.net/>
\usepackage{fixltx2e} % LaTeX patches, \textsubscript
\usepackage{cmap} % fix search and cut-and-paste in PDF
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{listings}
\usepackage{amsmath}
\lstset{
  language=TeX,
  basicstyle=\small\ttfamily,
  commentstyle=\ttfamily\color{blue},
  stringstyle=\ttfamily\color{orange},
  showstringspaces=false,
  breaklines=true,
  postbreak = \space\dots
}

\usepackage{ifthen}
\usepackage{longtable}
\usepackage{array}
\setlength{\extrarowheight}{2pt}
\newlength{\DUtablewidth} % internal use in tables

\mode<presentation>
{
  \usetheme{Warsaw}
  \useoutertheme{infolines}
  \setbeamercovered{transparent}
}


\title{\LaTeX}
\author[FOSSEE] {FOSSEE}
\institute[IIT Bombay] {Department of Aerospace Engineering\\IIT
  Bombay}
\date{}

%% Delete this, if you do not want the table of contents to pop up at
%% the beginning of each subsection:
\AtBeginSubsection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

\AtBeginSection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

\begin{document}

% Document title
\begin{frame}
  \maketitle  
\end{frame}

\section{Introduction}

\begin{frame}
  \frametitle{\LaTeX~- Introduction}
  \begin{itemize}
  \item Typesetting program
  \item Excellently Typeset Documents - specially Math
  \item Anything from one page articles to books. 
  \item Based on \TeX
  \item Pronounced ``Lah-tech'' or ``Lay-tech''
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{This Course}
  \begin{itemize}
  \item Look at Sample document - \texttt{sample.pdf}
  \item The document will be produced by the end of the course. 
  \item First Hour - Basic Structure
  \item Second Hour - Text, Tables, Figures, References
  \item Third Hour - Math, Bibliography, Presentations
  \end{itemize}
\end{frame}


\begin{frame}
  \frametitle{A Look at the Sample Document}
  \begin{itemize}
  \item Title, Author, Date
  \item Abstract
  \item Sections
  \item Subsections
  \item Appendix
  \item References/Bibliography
  \item Tables
  \item Figures
  \item Math
  \end{itemize}
\end{frame}

\begin{frame}[fragile]
  \frametitle{The source \& compilation}
  Write the following code into the file \texttt{draft.tex}.
  \begin{lstlisting}
    \documentclass{article}
    \begin{document}
    SciPy is open-source software for mathematics, 
    science, and engineering.   
    \end{document}
  \end{lstlisting}
  To compile the document, do the following in your terminal: 
  \begin{lstlisting}[language=bash]
    $ pdflatex draft.tex
  \end{lstlisting}
  This produces the output file \texttt{draft.pdf} %%$
  Note: \texttt{latex} command is often used to get \texttt{dvi}
  output. Throughout this course, we shall use \texttt{pdflatex} to
  compile our documents to \texttt{pdf} output.
\end{frame}  

\section{Structure of the Document}

\begin{frame}[fragile]
  \frametitle{\lstinline+documentclass+}
  \begin{itemize}
  \item \LaTeX~typesets based on \lstinline{documentclass}
  \item Defines structure and formatting of a document
  \item \LaTeX~is a document based mark-up
  \item Mark-up --- a system of annotating text, adding extra
    information to specify structure and presentation of text
  \item Document based markup $\rightarrow$ you don't have to worry
    about each element individually 
  \item Allows you to focus on content, rather than appearance.
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Environments and Commands}
  \lstinline{document} is an environment, present in every document. 
  \begin{itemize}
  \item Environments
    \begin{itemize}
    \item \lstinline{\begin} and \lstinline{\end} define the beginning
      and end of an environment
    \item All the content of the document is placed inside the
      \lstinline{document} environment 
    \end{itemize}
  \item Commands
    \begin{itemize}
    \item All commands begin with \textbackslash
    \item They are case-sensitive
    \item Only alpha caracthers; other characters terminate commands
    \end{itemize}
  \end{itemize}
\end{frame}


\begin{frame}[fragile]
  \frametitle{Top Matter}
  Let's add the Title, Author's name and the date to the document.
  \begin{itemize}
  \item Add title, author and date. Compile. Nothing changes.
  \end{itemize}
  \begin{lstlisting}
    \title{A Glimpse at Scipy}
    \author{FOSSEE}
    \date{June 2010}
  \end{lstlisting}
  \tiny{See \texttt{hg} rev1 of draft.}
\end{frame}
\end{document}