summaryrefslogtreecommitdiff
path: root/Latex/Latex2/latex_intro.tex
blob: 708467f18e913fa330144399a7aa737be5f7fe04 (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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Introduction to LaTeX 
%
% Author: FOSSEE 
% Copyright (c) 2009, FOSSEE, IIT Bombay
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[12pt,compress]{beamer}

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

\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
%\usepackage{times}
\usepackage[T1]{fontenc}

% Taken from Fernando's slides.
\usepackage{ae,aecompl}
\usepackage{mathpazo,courier,euler}
\usepackage[scaled=.95]{helvet}

\definecolor{darkgreen}{rgb}{0,0.5,0}

\usepackage{listings}
\lstset{language=sh,
    basicstyle=\ttfamily\bfseries,
    commentstyle=\color{red}\itshape,
  stringstyle=\color{darkgreen},
  showstringspaces=false,
  keywordstyle=\color{blue}\bfseries}
\newcommand{\inctime}[1]{\addtocounter{time}{#1}{\tiny \thetime\ m}}

\newcommand{\typ}[1]{\lstinline{#1}}

\newcommand{\kwrd}[1]{ \texttt{\textbf{\color{blue}{#1}}}  }
\title {Introduction to {\LaTeX}}
\author {FOSSEE}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DOCUMENT STARTS
\begin{document}

\begin{frame}

\begin{center}
\vspace{12pt}
\textcolor{blue}{\huge Introduction to {\LaTeX}}
\end{center}
\vspace{18pt}
\begin{center}
\vspace{10pt}
\includegraphics[scale=0.95]{../images/fossee-logo.png}\\
\vspace{5pt}
\scriptsize Developed by FOSSEE Team, IIT-Bombay. \\ 
\scriptsize Funded by National Mission on Education through ICT\\
\scriptsize  MHRD,Govt. of India\\
\includegraphics[scale=0.30]{../images/iitb-logo.png}\\
\end{center}
\end{frame}

\begin{frame}
\frametitle{Objectives}
\label{sec-2}

At the end of this tutorial, you will be able to,
\begin{itemize}
\item Get acquainted to LaTeX.
\item Know why we prefer LaTeX ??
\item Know about the advantages and disadvantages of typesetting documents using the LaTeX approach.
\item Have a description, of a typical work flow; which uses LaTeX to typeset documents.
\item Recognize and differentiate between LaTeX commands, LaTeX comments and special characters, spacing and actual document content.
\item Create and compile a very simple LaTeX document.
\end{itemize}
\end{frame}

\begin{frame}[fragile]
  \begin{block}{{\LaTeX} - Introduction}
    \begin{itemize}
      \item Typesetting program
       \begin{itemize}
         \item What is typesetting?
       \end{itemize}
      \item Excellently Typeset Documents - specially Math
      \item Anything from one page articles to huge books
      \item Pronounced \emph{Lah-tech} or \emph{Lay-tech}
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Why \LaTeX?}
  \begin{itemize}
  \item Excellent visual quality! 
  \item Handles the typesetting; Lets you focus on content
  \item Makes writing math extremely simple
  \item It is a standard -- widely used in Scientific community
  \end{itemize}
  \begin{block}{}
    \[\tilde{N}_{\mathbf{x}}\times \mathbf{r}(\mathbf{x}) f_{1k}(\mathbf{x},t) - \frac{1}{2} \tilde{N} \tilde{N}:\mathbf{BB}^{T}P(\mathbf{x},t) = -m_{k}f_{1k}(\mathbf{x},t) + 2 \mathop{\mathbf{\aa}}_{j=1}^{K} f_{1j}(\mathbf{x},t)m_{j}P_{k|j} \]
  \end{block}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Why \LaTeX?}
  \begin{itemize}
  \item {\LaTeX} is a document based mark-up
  \item Mark-up $\rightarrow$ 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}[fragile]
  \frametitle{Advantages of using \LaTeX }
  \begin{itemize}
  \item Easy availablity of professional templates.
  \item Typesetting complex formulae in a convenient environment.
  \item Can start typesetting with very little effort.
  \item Presence of a lot of add-on packages.
  \item Encourages creation of well structured texts.
  \end{itemize}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Disadvantages of using \LaTeX }
  \begin{itemize}
  \item Designing whole new layout is difficult.
  \end{itemize}
\end{frame}

\begin{frame}[fragile]
  \frametitle{\LaTeX \ input file format}
  \begin{itemize}
  \item \LaTeX takes ASCII text file as input.
  \item We can compile \LaTeX files into DVI,Postscript or PDF files.
  \item \alert{Note:} \typ{latex} vs. \typ{pdflatex} 
  \end{itemize}
\end{frame}



\begin{frame}[fragile]
  \frametitle{Commands, Comments and Special Characters }
  \begin{itemize}
  \item {\LaTeX} is case sensetive.
  \item Commands begin with a \typ{\\}
  \item Environments have a \typ{\\begin} and \typ{\\end} 
  \item Any content after the \typ{\\end\{document\}} is ignored
  \end{itemize}
  \begin{itemize}
  \item Anything that follows a \typ{\%} symbol till end of the line
    is a comment 
  \item Special characters (\typ{\~ \# \$ \^ \& \_ \{ \}}) are escaped by a
    \typ{\\} 
  \item \typ{\\} symbol is inserted using \typ{\\textbackslash}
    command
  \end{itemize}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Typesetting a minimal document}
  Write the sample code  into the file \typ{temp.tex}
  \begin{verbatim}
    \documentclass{article}
    \title{My First LaTeX Document}
    \begin{document}
     Hello world!
     \end{document}
  \end{verbatim}
\end{frame}  

\begin{frame}[fragile]
  \frametitle{Compiling to DVI }
    \begin{center}
   \alert{latex temp.tex}  
    \end{center}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Compiling to PDF }
    \begin{center}
   \alert{pdflatex temp.tex}  
    \end{center}
\end{frame}

\begin{frame}
\frametitle{Summary}
\label{sec-8}

  In this tutorial, we have learnt,
\begin{itemize}
\item About LaTeX.
\item why we prefer LaTeX.
\item about the advantages and disadvantages of typesetting documents using the LaTeX approach.
\item A description, of a typical work flow; which uses LaTeX to typeset documents.
\item The ability to recognize and differentiate between LaTeX commands, LaTeXcomments and special characters, spacing and actual document content.
\item Created and compiled a very simple LaTeX document.
\end{itemize}
\end{frame}
\begin{frame}[fragile]
\frametitle{Evaluation}
\label{sec-9}


\begin{enumerate}
\item Convert the temp.dvi created during the course of this tutorial to temp\_1.ps using the dvips command. Verify that the two files indeed look the same.
\vspace{8pt}
\item Convert the temp.dvi created during the course of this tutorial to temp\_1.pdf using the dvipdfm command. Verify that the two files indeed look the
\end{enumerate}
\end{frame}
\begin{frame}


\frametitle{Solutions}
\label{sec-10}
\begin{enumerate}
\item We can use the following command to convert temp.dvi to temp\_1.ps\\
\begin{center}
dvips -o temp\_1.ps temp.dvi
\end{center}
\vspace{15pt}
\item We can use the following command to convert temp.dvi to temp\_1.pdf\\
\begin{center}
dvipdfm \-o temp\_1.pdf temp.dvi
\end{center}
\end{enumerate}
\end{frame}
\begin{frame}

  \begin{block}{}
  \begin{center}
  \textcolor{blue}{\Large THANK YOU!} 
  \end{center}
  \end{block}
\begin{block}{}
  \begin{center}
    For more Information, visit our website\\
    \url{http://fossee.in/}
  \end{center}  
  \end{block}
\end{frame}

\end{document}