%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MFwL.tex % Copyright 2006 Rohit Vishal Kumar % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 % of this license or (at your option) any later version. % The latest version of this license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of LaTeX % version 2005/12/01 or later. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is Rohit Vishal Kumar. % % This work consists of the files: % 1. MFwL.tex : The source code % 2. transistor.eps : Encapsulated Postscript File (*) % 3. transistor.bb : The Bounding Box information of transistor.eps % 4. MFwL.pdf : The presentation % 5. Readme.txt : The readme file % % MFwL.dvi and MFwL.ps are derieved when the source is compiled using the % LaTeX -> PS -> PDF route. These files are not included in the package but should be % considered under the LPPL % % * This file has been taken from the Ghostscript Distribution %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Welcome. This is the source of the presentation ``Making Friends With LaTeX'' Version 2.00 % You will require the powerdot and the fancyvrb packages. Please install them before % trying to compile this source. % % LaTeX may report 2 errors while compiling pd@labels and \label{tab:1} % Unfortunately I have not been able to correct these two errors. Seems there is some problem % between the \label{} tag and powerdot. Anyhow the output is compelete. So for the time being % ignore these errors % % Happy TeXing!!! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% This is the documentclass declaration \documentclass[ % size=10pt, % Base font size 10 points paper=screen, % Indicates screen output mode=present, % Indicates will be used as an onscreen presentation clock=true, % Show the clock in the presentation style=sailor, % Use the sailor style of powerdot class ]{powerdot} \usepackage{graphicx} % Load the graphicx package \usepackage{fancyvrb} % Load the fancyvrb package \pdsetup{ % Additional commands for powerdot package lf=\copyright~Rohit Vishal Kumar 2006, % Left footer rf=MFwL Ver~2.0, % Right Footer trans=Split, % Trnasition type } % Slide 1: The Title Slide \title{Making Friends with \LaTeX\ \\ % Begin the title of the presentation \small{Version 2.00} } % End the title of the presentation \author{Rohit Vishal Kumar \\ % Begin the Author Block \small{Reader} \\ \small{Department of Marketing \& Finance} \\ \small{Xavier Institute of Social Service} \\ \small{P.O. Box No: 7, Purulia Road} \\ \small{Ranchi - 834001, Jharkhand, India} \\ \small{Email: rohitvishalkumar@yahoo.com} } % End the Author Block \begin{document} % Begin the Document \maketitle % Make the title slide % Slide 2 : The Contents Slide \begin{slide}{contents} % Make the contents slide \tableofcontents[content=sections] % I want section heading as contents \end{slide} % Slide 3 : The Front Matter Separator Slide \section{Front Matter} % Start Section Front Matter % Slide 4 : Acknowledgement Slide \begin{slide}[method=direct]{acknowledgement} \begin{small} Many hours of work has gone in to making this presentation. But most of all, this presentation has benefitted from the criticisms and comments from various people. \vspace{1em} \textbf{Subha Natarajan} for proof reading the earlier version of the document without knowing an iota of \LaTeX\ . \textbf{Dan Luecking} for a detailed list of erratta which proved extremely helpful in developing this version of the document. \textbf{Kenneth Jacker} for his encouraging words and \textbf{Phil M Perry} for his slide by slide comment on the earlier version of the document. \textbf{D Venu~Gopal} for sending me his excellent presentation on \LaTeX{}. \vspace{1em} Thanks are also due to \textbf{Hendri Adriaens and Christopher Ellison} for the \verb+powerdot+ package and \textbf{Denis Girou, Sebastian Rahtz and Timothy Van Zandt} for the \verb+fancyvrb+ package. \vspace{1em} Finally, thanks are due to my wife, Neerajakshi, and my son, Devansh, who tolerated my late nights on computer with the outmost of patience. I could not have done this without your support. And of course, to everyone, who downloaded MFwL Version 1 and found it useful. Of course, errors will remain and the only person responsible for them, to quote Harry Potter, is \textit{``you-know-who''}. \end{small} \end{slide} % Slide 5 : License Slide \begin{slide}{license} This document is released under the \LaTeX{} Project Public License (LPPL) Version 1.3c or any newer version that may be released by the \LaTeX{}3 Project. \vspace{1em} A copy of the license can be found here: \href{http://www.latex-project.org/lppl/lppl-1-3c.txt}{{\blue \LaTeX{} Project}}. \end{slide} % Slide 6 : Conventions used in the Presentation \begin{slide}[method=direct]{conventions} This document is primarily focussed on new users of \LaTeX\ on Windows platform. The reason is that most of the computer users are first exposed to MS Windows and therefore to MS Word. This in turn leads to sloppy writing skills, where more time is spent on choosing fonts, colours and what-not; than on writing. \vspace{1em} There are some conventions used in this presentation: \vspace{1em} \textbf{Code:} Code is presented in a frame with line numbers as follows: \begin{Verbatim}[frame=single, xleftmargin=2mm, numbers=left, firstnumber=1, label={[Begin Code]End Code}] Code Line .... Code Line \end{Verbatim} \textbf{Output:} Output is presented below the following marker: \textcolor{black}{\texttt{c:$\backslash$output>}} \textbf{Links:} Hyperlinks are in blue \href{http://neeraja-rohit.cjb.net/}{{\blue like this}} \end{slide} % Slide 7 : Introduction to LaTeX Separator Slide \section{Introduction to \LaTeX\ } % Slide 8 : The History Slide \begin{slide}{the history of \TeX\ \& \LaTeX\ } \begin{itemize} \item \TeX was created by Prof. Donald Knuth \item He was dissatisfied with the final proof of his \emph{Magnum Opus} ``The Art of Computer Programming'' \item Started work on \TeX\ in 1977 and the first version was released in 1982 \item His efforts were supported by American Mathematical Society \item However, the \TeX\ was not a user friendly software \item In 1985, Leslie Lamport created the \LaTeX\ interface for \TeX \item \LaTeX\ was further developed by a group of people - Frank Mittelbach, David Carlisle \textit{et. al.} and was released as \LaTeXe\ in 1994 \end{itemize} \end{slide} % Slide 9 : Word Processors vs. LaTeX \begin{slide}{word processors vs. \LaTeX\ } Writing a large document has four basic stages: \begin{itemize} \item Writing the draft \item Typesetting \item Proof reading \item Making the final copy \end{itemize} Users of Word Processors --- which are WYSIWYG in nature --- normally end up writing, typesetting and to an extent, proof reading simultaneously. For example, changing the font size for headings, or spending time on trying to correct a presumed grammatical error or spelling mistake. This distracts from the main task of translating the thoughts into words. \vspace{1em} \LaTeX\ minimizes the distraction by taking away (almost) the task of typesetting and forcing the user to think in terms of the logical structure of the document. \end{slide} % Slide 10 : Advantages of Using LaTeX \begin{slide}{pros of \LaTeX\ } \begin{small} \LaTeX\ provides the following advantages: \begin{enumerate} \item \textbf{Structured Documents:} \LaTeX\ forces the user to think in terms of the structure of the document. So the user has to think in terms of chapters, sections, subsections etc. This leads to more organised presentation of thoughts. \item \textbf{Consistent Formatting:} \LaTeX\ documents are formatted consistently. All chapter, section, subsection style would be the same through out the document. \item \textbf{Professional Output:} \LaTeX\ produces it output in formats which render same across computers and operating systems. The default output is in DVI (Device Independent) format. It can also produce PS (Postscript) or PDF (Portable Document Format) \item \textbf{Reusable Source:} \LaTeX\ documents can be thought of as source-code which is compiled to get the output. As the source-code is in plain text it can be used across any operating system where \LaTeX\ is available \item \textbf{Extremely Extensible:} \LaTeX\ can be extended using packages. Packages exist for doing any possible task. If none exist, user can write his own package with a little programming knowledge, thus providing flexibility to meet all possible user needs \item \textbf{Free:} \LaTeX\ is freely available, freely distributable and free to use \end{enumerate} \end{small} \end{slide} % Slide 11 : Disadvantages of Using LaTeX % PS: Anyone who can provide a well structred documentation detailing % the disadvantages is welcome to send me the matter \begin{slide}{cons of \LaTeX\ } Personally, since I discovered \LaTeX\ I have stopped using word processors --- except in office where people still require it. However it does has certain disadvantages: \begin{small} \begin{enumerate} \item \textbf{Not Easy to Configure:} Configuring \LaTeX\ is not an easy task. If you wish to change styles, shapes etc. you may have to use low level commands \item \textbf{Requires Patience:} Yes. \LaTeX\ requires patience to learn and use. If you are addicted to the click-select-change method of Word Processors you may find it hard work \end{enumerate} \end{small} \end{slide} % Slide 12 : Our Fist LaTeX Source Separator Slide \section{Our First \LaTeX\ Source} % Slide 13 : Our Fist LaTeX Source \begin{slide}[method=direct]{our first \LaTeX\ document} \begin{Verbatim}[frame=single, xleftmargin=2mm, numbers=left, label={[Begin Code]End Code}] \documentclass[a4paper,12pt]{article} \begin{document} Let $D$ be a subset of $\bf R$ and let $f \colon D \to \mathbf{R}$ be a real-valued function on $D$. The function $f$ is said to be \emph{continuous} on $D$ if, for all $\epsilon > 0$ and for all $x \in D$, there exists some $\delta > 0$ (which may depend on $x$) such that if $y \in D$ satisfies \[ |y - x| < \delta \] then \[ |f(y) - f(x)| < \epsilon. \] \end{document} \end{Verbatim} \end{slide} % Slide 14 : Compiling the Source \begin{slide}[method=direct]{compiling the \LaTeX\ Source} Assuming that you are in a Windows environment and already have MiK\TeX\ you will need to do the following: \begin{itemize} \item Type the source in a text file using any text editor \item Save the file and give it a name, say, \texttt{myfile.tex} \item The default extension of \LaTeX\ source file is \texttt{.tex} \item Now go to the command prompt and type: \end{itemize} \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Command]End Command}] c:\>latex myfile.tex c:\>yap myfile.dvi \end{Verbatim} The first line tells \LaTeX\ to process the source. If there are no errors, \LaTeX\, produces a DVI (DeVice Independent) file which can be viewed using the program YAP (Yet Another Previewer). Under Linux, the steps are the same, except that you would probably use XDVI to preview the \texttt{.dvi} file. \end{slide} % Slide 15 : The LaTeX Output \begin{slide}{our first \LaTeX\ output} The Output of the above code would be as follows: \vspace{1em} \textcolor{black}{\texttt{c:$\backslash$output>}} \vspace{1em} Let $D$ be a subset of $\bf R$ and let $f \colon D \to \mathbf{R}$ be a real-valued function on $D$. The function $f$ is said to be \emph{continuous} on $D$ if, for all $\epsilon > 0$ and for all $x \in D$, there exists some $\delta > 0$ (which may depend on $x$) such that if $y \in D$ satisfies \[ |y - x| < \delta \] then \[ |f(y) - f(x)| < \epsilon. \] \end{slide} % Slide 16 : LaTeX Document Structure Separator Slide \section{\LaTeX\ Document Structure} % Slide 17 : LaTeX Document Structure \begin{slide}{document structure} A \LaTeX\ document is divided in to two parts: \begin{itemize} \item \textsc{Preamble:} Contains all formatting information, declarations about which packages to use, title of the document, authorship etc. \item \textsc{Body:} contains the material that is to be typeset. \end{itemize} \end{slide} % Slide 18 : Preamble \begin{slide}[method=direct]{preamble} The Preamble is the contains the following commands: \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \documentclass[option-list]{class-name} \usepackage[option-list]{package-name} \title{Name of the Article} \author{Name of the Author(s)} \date{17th November, 2005} \end{Verbatim} \begin{itemize} \item \verb|\documentclass[...]{class-name]| is mandatory. \item In \LaTeX\ the following are valid document classes: \begin{itemize} \item \texttt{book:} This class is used for typesetting books \item \texttt{report:} This class is used for typesetting reports \item \texttt{article:} This is used for typesetting articles \item \texttt{letter:} This is used for writing letters \item \texttt{slides:} This is used for making presentations \end{itemize} \item \verb|[...]| encloses the optional arguments, which may or may not be given. If optional arguments are not given \LaTeX\ uses the default parameters. \end{itemize} \end{slide} % Slide 19 : LaTeX Document Structure Separator Slide \begin{slide}{\texttt{documentclass}: optional arguments} \LaTeX\ provides lots of optional parameters for the \texttt{documentclass}. \vspace{1em} \begin{small} \begin{tabular}{lll} \textbf{Argument} & \textbf{Possible Values} & \textbf{Default Value} \\ Typeface Size & 10pt, 11pt, 12pt & 10pt \\ Paper Size & a4paper, a5paper, & letterpaper \\ & letterpaper, legalpaper & \\ & executivepaper b5paper & \\ Paper Orientation & portrait, landscape & portrait \\ Title Page & titlepage, notitlepage & titlepage \\ Equation Numbering & leqno & Right side \\ Equation Alignment & fleqn & Centered \\ Output Type & draft, final & final \\ Layout Type & oneside, twoside & oneside \\ Chapter Opening & openright, openany & openright \\ Columns & onecolumn, twocolumn & onecolumn \\ \end{tabular} \end{small} \vspace{1em} \textcolor{red}{NOTE:} The \texttt{slides} class does not accepts all the above mentioned arguments. Layout Type, Chapter Opening, Columns are not available to \texttt{slides} class. \end{slide} % Slide 20 : PReamble Other Options \begin{slide}[method=direct]{preamble: other options} \begin{itemize} \item \verb+\usepackage[option-list]{package-name}+ is used to include the various packages that control the layout of various elements in the document. Packages normally have the extension \texttt{.sty} for style \item Various packages are available from \href{http://www.ctan.org/}{{\blue CTAN}} (Comprehensive \TeX\ Archive Network). Read the package documentation carefully before attempting to use a package \item \verb+\title{...}+ is used to insert the title of the document \item \verb+\author{...}+ is used to insert the name of the author(s) and affiliation \item \verb+\\+ is used to insert a new line \item Multiple authors are separated by \verb+\and+ \item \verb+\date{...}+ is used to insert the date. If date is not specified, \LaTeX\ uses the current system date \item \verb+%+ introduces a comment till the end of the line \end{itemize} \end{slide} % Slide 21 : Preamble: final Form \begin{slide}[method=direct]{preamble: the final form} Here is the preamble in all its glory. \vspace{1em} \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \documentclass[a4paper,twocolumn,draft]{article} \usepackage{graphicx} % use package graphicx \usepackage{setspace} % use package setspace .. % add more packages \title{This is my Thesis} % This is the title \author{My Name \\ % This is my name My Institution \\ % This is my Intitute ... \\ % Address (if you wish) \and Another Author \\ % Another author's name His Institution \\ % This is his institute ... \\ % His Address } % End of author block \date{14 Sept 1972} % This gives the date \end{Verbatim} \end{slide} % Slide 22 : LaTeX Document Structure : Body \begin{slide}[method=direct]{body} \begin{itemize} \item Body is enclosed within the following command: \end{itemize} \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{document} % Start of the Document ... % Some Matter \end{document} % End of the Document \end{Verbatim} \begin{itemize} \item \LaTeX\ works in three different modes within the body \begin{itemize} \item \textsc{Paragraph Mode:} Used for processing normal text \item \textsc{Math Mode:} Used for processing Mathematical Equations and Formulas. It has three different sub-modes viz. \textbf{Math}, \textbf{Displaymath} and \textbf{Equation} \item \textsc{Left-Right Mode:} A special kind of mode used for specific purposes \end{itemize} \end{itemize} \end{slide} % Slide 23 : Paragraph Mode \begin{slide}[method=direct]{paragraph mode} \begin{itemize} \item In paragraph mode, \LaTeX\ works by defining environments \item It is a special area in the document which tells \LaTeX\ to treat the matter present in a separate manner \item Any environment is within a \verb|\begin{environment}| and \verb|\end{environment}| command. \item \LaTeX\ provides numerous prespecified environments \item Environments can be customised or user defined \item We shall look at some available environments in the next section \end{itemize} \end{slide} % Slide 24 : Entering Special Charecters \begin{slide}[method=direct]{entering special characters} The following special characters cannot be entered directly in the document. \vspace{1em} \begin{tabular}{lll} \textbf{Special Character} & \textbf{Type the Following} & \textbf{Output} \\ \verb+#+ (hash) & \verb+\#+ & \# \\ \verb+$+ (dollar) & \verb+\$+ & \$ \\ \verb+%+ (percent) & \verb+\%+ & \% \\ \verb+_+ (underscore) & \verb+\_+ & \_ \\ \verb+{+ (left curly brace) & \verb+\{+ & \{ \\ \verb+}+ (right curly brace) & \verb+\}+ & \} \\ \verb+~+ (tilde) & \verb+\~{}+ & \~{} \\ \verb+^+ (caret) & \verb+\^{}+ & \^{} \\ \verb+\+ (backslash) & \verb+$\backslash$+ & $\backslash$ \\ \end{tabular} \vspace{1em} \begin{itemize} \item \verb+~+ is normally used to put tilde accent over the following letter (\~{A}); hence it needs the \verb+{}+ to ensure correct display. \item \verb+^+ is normally used to put a superscript in math mode ($X^{A}$); hence it needs the \verb+{}+ to ensure correct display. \item \verb+\+ escaped with a \verb+\+ is a \verb+\\+ which is a newline insertion. To correctly get the \verb+\+ we use the \verb+$\backslash$+ \end{itemize} \end{slide} % Slide 25 : LaTeX Environment Separator Slide \section{Some Environments} % Slide 26 : Environment Alignment \begin{slide}[method=direct]{alignment} Alignments are useful if we want to move a block of text to left right or center. See the code and the output below: \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{flushleft} This is flushed to the left \end{flushleft} \begin{flushright} This is flushed to the Right \end{flushright} \begin{center} And this is dead center \end{center} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{flushleft} This is flushed to the left \end{flushleft} \begin{flushright} This is flushed to the Right \end{flushright} \begin{center} And this is dead center \end{center} \end{slide} % Slide 27 : Environment Bullets and Lists \begin{slide}[method=direct]{bullets and lists} \LaTeX\ provides three different methods for itemising your document: \begin{itemize} \item \verb+itemize+ environment produces bullets \item \verb+enumerate+ environment produces number \item \verb+description+ environment provides a labelled item \item Item within \verb+itemize+ and \verb+enumerate+ environment are preceded with the \verb+\item+ command. \item Item within \verb+description+ environment are preceded with the \verb+\item[label] + command. \item Items can be nested within each other \end{itemize} \end{slide} % Slide 28 : Environment Bullet and Lists (Code and Output) \begin{slide}[method=direct]{bullets and lists (code)} \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{itemize} \item This is the an itemized item \end{itemize} \begin{enumerate} \item This is an enumerated item \end{enumerate} \begin{description} \item[hello] This is a description \end{description} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{itemize} \item This is the an itemized item \end{itemize} \begin{enumerate} \item This is an enumerated item \end{enumerate} \begin{description} \item[hello] This is a description \end{description} \end{slide} % Slide 29 : Environment Quotation \begin{slide}[method=direct]{quotation} \LaTeX\ has provided two environment for including quotation. \begin{itemize} \item \verb+quote+ is used for inserting short quotation \item \verb+quotation+ is used for inserting longer quotation with a blank line \end{itemize} There is not much difference between the \verb+quote+ and the \verb+quotation+ environment; except that the margins of the \verb+quotation+ environment are indented on the left and right. Text is justified on both the margins and leaving a blank line produces a new paragraph \end{slide} % Slide 30 : Environment Quotation (Code) \begin{slide}[method=direct]{quotation (code)} \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{quote} Now go forth and conquer the World and keep on going forth and forth and forth until you reach the fjord of the forth \end{quote} \begin{quotation} Now go forth and conquer the World and keep on going forth and forth and forth until you reach the fjord of the forth \end{quotation} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{quote} Now go forth and conquer the World and keep on going forth and forth and forth until you reach the fjord of the forth \end{quote} \begin{quotation} Now go forth and conquer the World and keep on going forth and forth and forth until you reach the fjord of the forth \end{quotation} \end{slide} % Slide 31 : Environment Verse \begin{slide}[method=direct]{verse} \LaTeX\ provides the \verb+verse+ environment for typesetting poetry. The margins are intended on the left and right and each line of the stanza is separated with \verb+\\+. Each stanza is separated from each other by a blank line. \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{verse} Early in the morning \\ come to me \\ I will teach you \\ A, B, C ... \\ \end{verse} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{verse} Early in the morning \\ come to me \\ I will teach you \\ A, B, C ... \\ \end{verse} \end{slide} % Slide 32 : Environment Abstract \begin{slide}[method=direct]{abstract} The \verb+abstract+ environment is to typeset abstracts in books, reports and articles. \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{abstract} This is the abstract of my pathbreaking paper \end{abstract} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{abstract} This is the abstract of my pathbreaking paper \end{abstract} \end{slide} % Slide 33 : Complex Environment Separator Slide \section{Complex Environments} % Slide 34 : Complex Environment : Tabular \begin{slide}[method=direct]{tabular} \LaTeX\ allows the creation of tabular output using the \verb+tabular+ environment. The following should be noted: \begin{itemize} \item \verb+\begin{tabular}{no-of-columns}+ required the user to specify the number of columns the environment should create. \item This alignment of each column is determined by a single alphabet - \verb+l+ (left aligned), \verb+r+ (right aligned) or \verb+c+ (centered). \item Each column entry is separated by \verb+&+ and each row by \verb+\\+ \item Horizontal lines are entered with the \verb+\hline+ command and vertical lines are inserted by \verb+|+. Vertical lines can be entered only when the number of columns is specified. \item \verb+\multicolumn{N}{A}{T}+ command allows us to span columns; where N indicated the number of columns to span, A indicates the alignment of the column and T indicates the Text of the spanned column \end{itemize} \end{slide} % Slide 35 : Complex Environment: Tabular (Code and Output) \begin{slide}[method=direct]{tabular (code)} \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{tabular}{|l|c|r|} \hline City & State & Population \\ \hline New Delhi & NCR & 1,279,000 \\ \hline Kolkata & WB & 1,322,000 \\ \hline \end{tabular} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} \vspace{1em} \begin{tabular}{|l|c|r|} \hline City & State & Population \\ \hline New Delhi & NCR & 1,279,000 \\ \hline Kolkata & WB & 1,322,000 \\ \hline \end{tabular} \end{slide} % Slide 36 : Complex Environment: Tabbing \begin{slide}[method=direct]{tabbing} \LaTeX\ allows use of the \verb+tabbing+ environment to align text in columns. It works by setting tab stops and allow jumping between the tabs as in old fashioned typewriter. The following are useful in the \verb+tabbing+ environment. \begin{itemize} \item \verb+\=+ sets a tab stop at the current position \item \verb+\>+ advances to the next tab stop \item \verb|\+| moves the left margin (of the next and all following commands) one tab to the right \item \verb|\-| moves the left margin (of the next and all following commands) one tab to the left \item \verb+\kill+ sets the tab stops without producing any text \item \verb+\pushtabs+ saves all current tab position and allows temporary changing of tab stops position. A subsequent use of \verb+\pushtabs+ restores all previous tab stops \end{itemize} Personally i have never preferred the tabbing environment. But then, it is pretty useful at times. \end{slide} % Slide 37 : Complex Environment: Tabbing (Code) \begin{slide}[method=direct]{tabbing (code) } \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{tabbing} function \= fact(n : integer) : integer;\\ \> begin \= \+ \\ \> if \= n $>$ 1 then \+ \\ fact := n * fact(n-1) \- \\ end;\\ \end{tabbing} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{tabbing} function \= fact(n : integer) : integer;\\ \> begin \= \+ \\ \> if \= n $>$ 1 then \+ \\ fact := n * fact(n-1) \- \\ end;\\ \end{tabbing} \end{slide} % Slide 38 : Floating Environment: Separator Slide \section{Floating Environments} % Slide 39 : Floating Environment: Introduction \begin{slide}[method=direct]{what do you mean: floating?} Yes. You heard right. \LaTeX\ has two environments which it treats as floats --- \verb+figure+ and \verb+table+. Floating bodies are treated in special way following the given logic: \begin{itemize} \item \textbf{Step 1:}Try to place the float on the desired page \begin{itemize} \item \textcolor{green}{success} - carry on and typeset the page \item \textcolor{black}{no success} - place the float in a FIFO queue and typeset the page \end{itemize} \item \textbf{Step 2:} Start a new page and check whether this page can be treated as a special float page \begin{itemize} \item \textcolor{green}{success} - place as many floats from the queue here \item \textcolor{black}{no success} - treat the page as a normal page and try to place the first float from the queue on this page. Any new float occurring in the text gets added to the float queue \end{itemize} \item \textbf{Step 3} Repeat \textbf{Step 1} and \textbf{Step 2} as long as there are floats to process \begin{itemize} \item \textcolor{green}{success} - Celebrate and dance with joy \item \textcolor{black}{no success} - Give up and wait for the user to correct the problem \end{itemize} \end{itemize} \end{slide} % Slide 40 : Floating Environment: More on Floats \begin{slide}[method=direct]{more on floats} \begin{itemize} \item A float cannot occur before its given position in the text \item Users can request \LaTeX\ to try and place the float at a desired place by using the following placement specifiers: \begin{description} \item[t] place the float at the \textbf{top} of the page \item[b] place the float at the \textbf{bottom} of the page \item[h] place the float \textbf{here} please \item[p] place the float at in a separate \textbf{page} of floats \item[!] Just \textbf{bang} it here \textcolor{red}{\textbf{[Not Recommended at all]}} \end{description} \item The general syntax for a floating environment is as follows: \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{float-type}[placement-specifier] ... Matter of the float ... \caption[short]{A Long Caption} \label{myfloat} \end{float-type} \end{Verbatim} \end{itemize} \end{slide} % Slide 41 : Floating Environment: Table \begin{slide}[method=direct]{table} Tables are treated as floating objects in \LaTeX\ . The \verb+table+ environment could be looked upon as a wrapper for the \verb+tabular+ environment. See the \verb+table+ code \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{table}[tbh] \begin{tabular}{|l|c|r|} \hline City & State & Population \\ \hline New Delhi & NCR & 1,279,000 \\ Kolkata & WB & 1,322,000 \\ \hline \end{tabular} \caption{My Table} \label{tab:1} \end{table} \end{Verbatim} \end{slide} % Slide 42 : Floating Environment: Table (Output) \begin{slide}[method=direct]{table (output)} The output of the table code is as follows: \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{table}[tbh] \begin{tabular}{|l|c|r|} \hline City & State & Population \\ \hline New Delhi & NCR & 1,279,000 \\ Kolkata & WB & 1,322,000 \\ \hline \end{tabular} \caption{My Table} \label{tab:1} \end{table} The table reference is produced using \verb+\ref{label-tag}+ and the page reference is produced using \verb+\pageref{label-tag}+. So if we use the following code: \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] The table~\ref{tab:1} is reproduced on page~\pageref{tab:1} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} The table~\ref{tab:1} is reproduced on page~\pageref{tab:1} \end{slide} % Slide 43 : Floating Environment: Figure \begin{slide}[method=direct]{figure} \begin{itemize} \item Figures can be inserted in a \LaTeX\ document using the \verb+figure+ environment \item Inserting figures require the use of \verb+graphics+ or \verb+graphicx+ package \item \LaTeX\ can handle many types of figures --- Post Script (PS), Encapsulated Post Script (EPS) being the preferred option. \item The full command sequence would be as follows: \end{itemize} \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \documentclass{article} \usepackage{graphicx} % MANDATORY ... \begin{document} \begin{figure}[htb] % Start \includegraphics{figure.eps} % Include figure.eps \caption{Transistor} % The caption \label{fig:fig1} % The label \end{figure} % End ... \end{document} \end{Verbatim} \end{slide} % Slide 44 : Floating Environment: Figure (Output) \begin{slide}[method=direct]{figure (output)} The output of the code inserts the figure transistor.eps in to the document \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{figure}[htb] % Start \includegraphics[scale=.5]{transistor.eps} % Include tiger.eps \caption{Transistor} % The caption \label{fig:tiger} % The label \end{figure} % End You can play along with the figures too. Make it this small \includegraphics[scale=.1]{transistor.eps} by using the \verb+\includegraphics[scale=.1]{transistor.eps}+ or even rotate it. Read the \verb+graphics+ manual before attempting to insert graphics. \end{slide} % Slide 45 : Maths Separator Slides \section{Working with Maths} % Slide 46 : Typesetting Maths \begin{slide}[method=direct]{typesetting maths} \LaTeX\ can be used to typeset mathematics with ease. \LaTeX\ makes use of a special mode known as \texttt{math mode} for typesetting mathematics. In \texttt{math mode} \LaTeX\ works using three different environments: \begin{description} \item[1. Math Mode:] This mode is enclosed between \verb|$| and \verb|$|. It can also be entered using \verb+\(+ and \verb+\)+ or \verb+\begin{math}+ and \verb+\end{math}+. This produces inline equations such as follows: $ \sigma^2 = \frac{\Sigma_{i = 1}^{n}(X_{i} - \overline{X})}{N}$. \pause \item[2. Display Math Mode:] is entered using \verb|\begin{diaplaymath}| and \verb|\end{displaymath}| or by using \verb+\[+ and \verb+\]+ and produces the equation in a separate line. It does not produces equation numbering. \begin{displaymath} \sigma^2 = \frac{\sum_{i = 1}^{n}(X_{i} - \overline{X})}{N} \end{displaymath} \pause \item[3. Equation Mode:] is entered using \verb|\begin{equation}| and \verb|\end{equation}| and produces the equation in a separate line with an equation number. \begin{equation} \sigma^2 = \frac{\sum_{i = 1}^{n}(X_{i} - \overline{X})}{N} \end{equation} \end{description} \end{slide} % Slide 47 : Maths - Eqnarray \begin{slide}[method=direct]{eqnarray} The \verb+eqnarry+ environment is used to display a series of equations. It is a three column array environment with consecutive rows separated by \verb+\\+ and consequetive items separated by \verb+&+. It places an equation number on every line unless that line has a \verb+\nonumber+ command. \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{eqnarray} \sigma & = & \sqrt{\frac{ax^2}{N}} \\ N \sigma^2 & = & {ax^2} \end{eqnarray} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{eqnarray} \sigma & = & \sqrt{\frac{ax^2}{N}} \\ N \sigma^2 & = & {ax^2} \end{eqnarray} \end{slide} % Slide 48 : Maths Array \begin{slide}[method=direct]{array} The \verb+array+ environment is similar to the \verb+tabular+ environment. The only difference is that it can only be used in a math mode. \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \begin{equation} \begin{array}{llll} X_{11} & X_{12} & \cdots & X_{1n} \\ X_{21} & X_{22} & \cdots & X_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ X_{n1} & X_{n2} & \cdots & X_{nn} \\ \end{array} \end{equation} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{equation} \begin{array}{llll} X_{11} & X_{12} & \cdots & X_{1n} \\ X_{21} & X_{22} & \cdots & X_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ X_{n1} & X_{n2} & \cdots & X_{nn} \\ \end{array} \end{equation} \end{slide} % Slide 49 : Creating Math Magic \begin{slide}[method=direct]{creating math-magic} \begin{table}[h] \begin{tabular}{ll} You want this & You type this \\ $x^{y}$ & \verb|$ x^{y} $| \\ $x_{i}$ & \verb|$ x_{i} $| \\ $x^{y}_{1}$ & \verb|$ x^{y}_{1} $| \\ $\frac{ax}{b} $ & \verb|$ \frac{ax}{b} $| \\ $\sqrt[n]{x + y}$ & \verb|$ \sqrt[n]{x + y} $| \\ $\overline{\overline{x}^{2} + 1}$ & \verb|$ \overline{\overline{x}^{2} + 1} $| \\ $\overbrace{a + \underbrace{b+c} + d} $ & \verb|$ \overbrace{a + \underbrace{b+c} + d} $| \\ $ \int_{0}^{1} x dx = 0 $ & \verb|$ \int_{0}^{1}x dx = 0 $| \\ \end{tabular} \end{table} \end{slide} % Slide 50 : BIBTeX Separator Slide \section{Working with BIB\TeX\ } % Slide 51 : BIBTeX : Introduction \begin{slide}[method=direct]{introduction to BIB\TeX} \begin{itemize} \item BIB\TeX\ was written by Oren Patashnik \item It facilitates entering bibliographical data into \LaTeX\ documents \item It was developed along with \LaTeX\ \item Support for BIB\TeX is built into all versions of \LaTeX \item It is an autonomous program that has to be invoked outside the main \LaTeX\ run \item An external database file (\verb+.bib+) keeps the bibliographical records \item The BIB\TeX\ file can keep records of the following entities: \end{itemize} \begin{tabular}{llll} & Article & Book & Booklet \\ & Conference & Inbook & Incollection \\ & Inproceedings & Manual & Mastersthesis \\ & Misc & Other & Phdthesis \\ & Proceedings & Techreport & Unpublished \\ \end{tabular} \end{slide} % Slide 52 : BIBTeX : Introduction to bib file \begin{slide}[method=direct]{the format of .bib file} The \verb+.bib+ file contains entries in the following format: \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] @ARTICLE{RVK, author={Rohit Vishal Kumar}, title={{Making Friends with LaTeX}}, journal={Journal of University}, year={2005}, volume={I}, pages={1--20}, month={September}, } \end{Verbatim} The first line identifies the type of entry \verb+@ARTICLE{+ and the citation key \verb+RVK+ For each type of entry there are some fields. Depending on the entry type some fields may be required, optional or ignored \end{slide} % Slide 53 : BIBTeX : Using Bibtex \begin{slide}[method=direct]{using BIB\TeX} \begin{itemize} \item BIB\TeX\ , by default, uses the numerical citation style in which the citation are numbered within \verb+[ and ]+ \item To use BIB\TeX\ we would use the \verb+\cite{citation-key}+ in the document \item The command \verb+\nocite{citation-key}+ suppresses the citation from occurring in the text but includes it in the bibliography \item The command \verb+\bibliography{style-name}+ is used to inform BIB\TeX\ the bibliography-style file which is to be used for formatting the bibliography \item The command \verb+\bibilography{file-name}+ is used to provide the name of the bibliography database to BIB\TeX \item Support for author-date citation style is provided by various packages like \verb+natbib+, \verb+apacite+, \verb+harvard+, \verb+chicago+ etc. These should be used via the \verb+\usepackage{package-name}+ command. \end{itemize} Some of the author-date citation packages use additional citation commands. Please read the documentation of the respective package(s) for better understanding of how the package works \end{slide} % Slide 53 : BIBTeX : Using Bibtex (code) \begin{slide}[method=direct]{using BIB\TeX\ (code)} The Full setup would be as follows: \begin{Verbatim}[frame=single, numbers=left, xleftmargin=2mm, firstnumber=last, label={[Begin Code]End Code}] \documentclass{article} ... \begin{document} In a recent article \cite{RVK} % Citing the entry it was found that ... \bibliographystyle{plain} % Default Bib Style \bibliography{myref} % Bib file myref.bib \end{document} \end{Verbatim} \textcolor{black}{\texttt{c:$\backslash$output>}} \begin{itemize} \item[] \textrm{In a recent article $[\;1\;]$ it was found that} \item[] \item[] \textbf{References} \item[] \textrm{[1] Rohit Vishal Kumar, Making Friends with \LaTeX\,, \textit{Journal of University}, I:1--20, September, 2005} \end{itemize} \end{slide} % Slide 55 : Miscelleneous Separator Slide \section{Miscellaneous} % Slide 56 : Miscelleneous Sectioning Commands \begin{slide}[method=direct]{sectioning commands} \begin{itemize} \item \LaTeX\ allows for structuring the document by providing various sectioning commands \item These commands are used for numbering the various logical structures of a document \end{itemize} \verb|\part| \verb|\chapter| \verb|\section| \verb|\subsection| \verb|\subsubsection| \verb|\paragraph| \verb|\subparagraph| \begin{itemize} \item \verb|\part| and \verb|\chapter| are not present in the article class \item \verb|\appendix| command changes the way the sectional units like \verb|chapter, section| are numbered in appendix \end{itemize} \end{slide} % Slide 57 : Miscelleneous: Other commands \begin{slide}[method=direct]{other commands} \begin{table}[h] \begin{center} \begin{tabular}{ll} You want this & You type this \\ A Table of Contents & \verb|\tableofcontents| \\ A List of Tables & \verb|\listoftables| \\ A List of Figures & \verb|\listoffigures| \\ \textit{Italics} & \verb|\textit{Italics}| \\ \textbf{Bold Face} & \verb|\textbf{Bold Face}| \\ \textsf{Sans Serif} & \verb|\textsf{Sans Serif}| \\ \texttt{Type writer style} & \verb|\texttt{Type writer style}| \\ \textsc{Small Caps} & \verb|\textsc{Small Caps}| \\ \end{tabular} \end{center} \end{table} \end{slide} % Slide 58 : Extending LaTeX \begin{slide}{extending \LaTeX} \begin{itemize} \item \LaTeX\ can be extended by using packages \item More than 1000 packages exist for taking on any possible task \item It can be used to produce documents in almost any known language \item Check out \href{http://www.ctan.org/}{{\blue CTAN}} for a definitive set of packages \end{itemize} \end{slide} % Slide 59 : Installing LaTeX Section Separator \section{Installing \LaTeX} % Slide 60 : Setting up a LaTeX System \begin{slide}[method=direct]{setting your own \LaTeX\ system} \begin{small} Under the assumption, that you are on a Windows system, download the following: \begin{description} \item[\href{http://www.miktex.org/}{{\blue MiKTeX}}] It is the \LaTeX system of choice under Windows. If you are a beginner, I recommend that you download the MikTeX small package. (Version: 2.4.1661 Size: 25.50 MB) \item[\href{http://www.toolscenter.org/}{{\blue TeXnicCenter}}] Free and preferred IDE for using \LaTeX\ on windows. (Version: 7.01 Size: 4.43 MB) \item[\href{http://www.adobe.org/}{{\blue Adobe Acrobat Reader}}] Useful for viewing the Portable Document Format (.pdf) file created using \LaTeX. (Version: 5.00 Size:8.41 MB) \item[\href{http://www.cs.wisc.edu/~ghost/}{{\blue Ghostscript}}] The Ghostscript engine for producing the postscript (.ps) files created using \LaTeX. (Version: 8.15 Size: 9.26 MB) \item[\href{http://www.cs.wisc.edu/~ghost/}{{\blue Ghostview}}] The viewer for viewing the postscript (.ps) files created using \LaTeX. (Version: 4.80 Size: 1.42 MB) \end{description} Clicking on the blue program name should take you to the website of each program. You may find newer versions on the web. Download the programs to a directory of your choice and then install them one by one in the following order: MikTeX, Ghostscript, Ghostview, Acrobat Reader and finally TeXnicCenter. Under LINUX, teTeX is normally installed. You can use any editor of your choice to edit the \verb+.tex+ files. For installation on Operating Systems other than LINUX, UNIX or Windows, please refer to \href{http://www.ctan.org/}{{\blue CTAN}} or your local guru \end{small} \end{slide} % Slide 61 : Separator Slide \section{In the end} % Slide 62: Error Messages \begin{slide}[method=direct]{error messages} \LaTeX\ error messages are of three types: \begin{description} \item[error(s)] This is the most critical. It means something has gone drastically wrong. If a \verb+*+ is issued, that means \LaTeX\ needs more inputs. Most of the times, errors are generated due to (i) a misspelled command (ii) a mismatched brace (iii) improper use of special character (iv) using characters or symbols which require math mode and or (v) forgetting to use the required package. Check your document carefully \item[warning(s)] This is the second level and is less severe in nature. It normally implies that \LaTeX\ has not been able to process the document correctly and more runs of \LaTeX\ are required to get the cross-referencing right \item[bad box(es)] This is the least critical. It normally implies that \LaTeX\ is not happy with the document layout. \LaTeX\ has a defined tolerance for typesetting paragraphs and documents. Anything which crosses this threshold generates this error. For example, Figures may be bigger than page, Hyphenation was not done properly etc. \end{description} \end{slide} % Slide 63 : Suggested Reading \begin{slide}{suggested readings} \begin{enumerate} \item A Gentle Introduction to \TeX\ , A manual for self study , Michael Dobb \item \LaTeX\ for Word Processor Users , Guido Gonzato \item The not So Short Introduction to \LaTeXe\ , Or \LaTeXe\ in 129 minutes, Tobias Oetiker \item An Essential Guide to \LaTeXe\ usage, Obsolete Commands and Packages, Mark Trettin. (Translated into English by Jurgen Fenn) \item References for \TeX\ and friends, Peter Karp and Michael Wiedmann \item The UK \TeX\ FAQ, Your 407 questions answered, UK TUG \item \LaTeX\ user guide and reference manual, Leslie Lamport, Pearson Education Asia, First Indian Reprint, 2000 \end{enumerate} Besides the above, I suggest that you subscribe to the local \TeX\ user group (TUG) for quick answer to your queries \end{slide} % Slide 64 : Thank You \begin{slide}[method=direct]{thank you} I shall be happy to hear from you anything regarding MFwL Version 2. Comments, Criticism, Improvements and Suggestions, all are welcome. Please send them to \verb+rohitvishalkumar@yahoo.com+. \vspace{1em} Thank you very much for your interest in \LaTeX. \vspace{1em} Happy \TeX~ing \begin{center} \Huge{THANK YOU} \end{center} \end{slide} % End of Slides % End of Document \end{document}