summaryrefslogtreecommitdiff
path: root/latex/workbook/example8.tex
blob: 87267ae5a2fdeb7f286c057bc5b8f63710ef8c8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
\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}