diff options
author | Kiran Isukapatla | 2012-01-17 13:51:15 +0530 |
---|---|---|
committer | Kiran Isukapatla | 2012-01-17 13:51:15 +0530 |
commit | 4fb8618148ed084de3f1a3426f41c0ae05f7eb64 (patch) | |
tree | bca74908a72d8151ecb15b95bb9990ecf1a4085a | |
parent | cac7cfc75f705a3ad72dd2bb32166af9b66ee439 (diff) | |
parent | f2de5a9a0afe7d4b4c5e2ee4cf813da9aacc2ca6 (diff) | |
download | sdes-stscripts-4fb8618148ed084de3f1a3426f41c0ae05f7eb64.tar.gz sdes-stscripts-4fb8618148ed084de3f1a3426f41c0ae05f7eb64.tar.bz2 sdes-stscripts-4fb8618148ed084de3f1a3426f41c0ae05f7eb64.zip |
Merge branch 'master' of github.com:FOSSEE/sdes-stscripts
-rw-r--r-- | .gitignore | 14 | ||||
-rw-r--r-- | Latex/Latex1/Latex_Introduction.rst | 242 | ||||
-rw-r--r-- | Latex/Latex4/Latex_Typesetting_Text.tex | 210 | ||||
-rw-r--r-- | Latex/Latex4/Typesetting_Text_Latex.rst | 221 | ||||
-rw-r--r-- | Latex/Latex5/FTF_Latex.rst | 206 | ||||
-rw-r--r-- | Latex/Latex5/Latex_FTF.tex | 246 | ||||
-rw-r--r-- | Latex/images/folder.png | bin | 0 -> 45829 bytes | |||
-rw-r--r-- | Latex/images/fossee-logo.png | bin | 0 -> 13587 bytes | |||
-rw-r--r-- | Latex/images/iitb-logo.jpg | bin | 0 -> 325871 bytes | |||
-rw-r--r-- | Latex/images/mercurial_logo.png | bin | 0 -> 6684 bytes | |||
-rw-r--r-- | Version_Control/vcs1/vcs1.rst | 2 |
11 files changed, 1140 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cce9eac --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +*.aux +*.dvi +*.log +*.nav +*.snm +*.toc +*.pdf +*.vrb +*.out +*.sty +*.pyc +*.zip +*.org + diff --git a/Latex/Latex1/Latex_Introduction.rst b/Latex/Latex1/Latex_Introduction.rst new file mode 100644 index 0000000..4e944ce --- /dev/null +++ b/Latex/Latex1/Latex_Introduction.rst @@ -0,0 +1,242 @@ +.. Objectives +.. ---------- + +.. By the end of this tutorial, you will be able to + +.. 1. Have an insight on the history and development of LaTeX. +.. #. Adopt a simple workflow, that uses LaTeX to typeset documents. +.. #. Know the advantages and disadvantages of typesetting documents using +.. the LaTeX. +.. #. Create a very simple LaTeX document + +.. Prerequisites +.. ------------- + +.. 1. LaTeX and its supported packages installed on the host machine. +.. #. Should be comfortable using a text editor of your choice. + + +.. Author : Harish Badrinath < harish [at] fossee [dot] in > + Internal Reviewer : Kiran Isukapatla < kiran [at] fossee [dot] in > + External Reviewer : + Langauge Reviewer : + Checklist OK? : <put date stamp here, if OK> + +Script +------ + +.. L1 + +{{{ Show the first slide containing title, name of the production +team along with the logo of MHRD }}} + +.. R1 + +Hello friends and welcome to the tutorial on 'Introduction to LaTeX'. + +.. L2 + +{{{ Show the objectives slide }}} + +.. R2 + +.. By the end of this tutorial, you will be able to + +.. 1. Have an insight on the history and development of LaTeX. +.. #. Adopt a simple workflow, that uses LaTeX to typeset documents. +.. #. Know the advantages and disadvantages of typesetting documents using LaTeX. +.. #. Create a very simple LaTeX document + +.. L3 + +{{{ Switch to the pre-requisite slide }}} + +.. R3 + +You would require: +.. 1. LaTeX and its supporting packages installed on the host machine. +.. #. Should be comfortable using a text editor of your choice. + +We recommend you to go thorugh the tutorial titled, "Installing LaTeX" for more information on installation. + +.. L4 + +{{{ switch to the photograph of Donald E. Knuth }}} + +.. R4 + +LaTeX began as TeX, a computer program originally created by +Donald E. Knuth. Its was designed mainly to aid typesetting +of text and mathematical formulae. TeX was started to reverse +the trend of deteriorating typographical quality of the then, +nascent digital publishing industry. + +LaTeX is a document preparation system for high quality typesetting. It is based on the TeX typesetting language or certain +extensions. + +.. L5 + +{{{ switch to pronunciation stock photograph }}} + +.. R5 + +LaTeX is pronounced Lah-tech or Lay-tec. +TeX is pronounced Tech. TeX is also the first syllable in the greek word for +technology. +LaTeX allows authors to typeset and print their content at the highest +typographical quality, using predefined, professional layouts. + +.. L6 + +{{{ switch to Image saying/symbolizing work flow }}} + +.. R6 +LaTeX input files are simple ASCII text files that are processed by a TeX +processing engine. +Next comes the question compiling LaTeX input files and viewing the output +typeset document. +The process is a little different from other markup languages like HTML. +We compile ASCII text files into typeset files that are normally DVI, Postscript +or PDF files. +The latex command converts LaTeX input files into dvi files. +We can view DVI files on Gnu/Linux using xdvi. +Further DVI files can be converted either to a post script file, using the +dvips command or to a PDF file using the dvipdfm command. +The command pdflatex is used to convert LaTeX input files directly to pdf files. +The resultant PDF files can be viewed using standard tools on most platforms +(Eg: evince on Gnu/Linux). + +.. L7 + +{{{ switch to stock photograph of/symbolizing advantages and disadvantages }}} + +.. R7 + +Some of the advantages of using LaTeX approach to typesetting are +(1) Easy availability of professionally crafted layouts. +(2) Typesetting of mathematical formulae is supported in a convenient +environment. +(3) Typesetting for most cases can be done with very little learning curve, +using easy to use/understand commands, that only specify the logical structure +of the document. +(4) Presence of lots of add-on packages. +(5) Encourages creation of well structured texts. + +.. L8 + +{{{ switch to stock photograph of/symbolizing advantages and disadvantages }}} + +.. R8 + +Some of the disadvantages of using LaTeX approach to typesetting are +(1) Designing a whole new layout is difficult. +(2) Typesetting even complex documents, is mostly done using text editors. + +.. L9 +:: + +{{{ Show slide with exercise 1 }}} +\documentclass{article} +\title{My First LaTeX Document} +\author{Harish} +\begin{document} +\maketitle +Hello world! +\end{document} + +.. R9 + +Now, we try to create a simple LaTeX document. Pause the tutorial and type the +content shown on the screen in a text editor. Save the file as 'temp.tex' + +.. L10 + +{{{continue from paused state}}} +latex temp.tex + +.. R10 + +Now, we compile the commands in the LaTeX input file 'temp.tex' into a +typeset file. +The first alternative is to compile LaTeX input file into a DVI file. We use +the following latex command for this purpose. +'latex temp.tex' +The output file would be 'temp.dvi'. +On Gnu/Linux, use a program like 'xdvi' to view the output file. + +.. L11 + +pdflatex temp.tex + +.. R11 + +The other alternative is to create PDF files from LaTeX input files. +We use the 'pdflatex' command for this purpose. +For compiling the LaTeX input file 'temp.tex' into a PDF file, we use the +following command + +'pdflatex temp.tex' + +The output file would be 'temp.pdf'. +On Gnu/Linux use a program like 'evince' to view the output file. + +.. L12 + +{{{ Show summary slide }}} + +.. R12 + +This brings us to the end of this tutorial. In this tutorial, we have, + + 1. An insight on the history and development of LaTeX. + #. Adopted a simple work flow, that uses LaTeX to typeset documents. + #. Come to Know the Advantages and disadvantages of typesetting documents +.. using the LaTeX approach. + #. Have gone through an example on creating a very simple LaTeX document. + +.. L13 + +{{{Show self assessment questions slide}}} + +.. R13 + +Here are some self assessment questions for you to solve + + 1. 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. + + 2. 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 +same. + +3. Remove the line "\maketitle" from 'temp.tex' file. Recompile the file into +either a DVI or a PDF file. what is the difference between the original output +and the output from the newer version of the 'temp.tex' file ?? + +.. L14 + +{{{Show self assessment questions slide}}} + +.. R14 + +And the answers, + +1. We can use the following command to convert 'temp.dvi' to 'temp_1.ps'. + +dvips -o temp_1.ps temp.dvi + +2. We can use the following command to convert 'temp.dvi' to 'temp_1.pdf'. + +dvipdfm -o temp_1.pdf temp.dvi + +3. The output file consists of a file with a single line of text "Hello world!". + +.. L15 + +{{{ Show the thank you slide }}} + +.. R15 + +Hope you have enjoyed this tutorial and found it useful. +Thank you! + diff --git a/Latex/Latex4/Latex_Typesetting_Text.tex b/Latex/Latex4/Latex_Typesetting_Text.tex new file mode 100644 index 0000000..1b54103 --- /dev/null +++ b/Latex/Latex4/Latex_Typesetting_Text.tex @@ -0,0 +1,210 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% LateX +% +% Author: FOSSEE +% Copyright (c) 2009, FOSSEE, IIT Bombay +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[14pt,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=bash, + 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}}} } + +\setbeamercolor{emphbar}{bg=blue!20, fg=black} +\newcommand{\emphbar}[1] + + +\begin{document} + +\begin{frame} + +\begin{center} +\vspace{12pt} +\textcolor{blue}{\huge {\LaTeX}: Typesetting Text} +\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.15]{../images/iitb-logo.jpg}\\ +\end{center} +\end{frame} + +\begin{frame} + \frametitle{Objectives} + At the end of this session, you will be able to: + \begin{itemize} + \item Learn how to typeset your document using {\LaTeX} + \item Use lists, listings in your document for formatting text + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Prerequisite} + Spoken Tutorial on: + \begin{itemize} + \item {\LaTeX} Part 1 - Getting Started + \item {\LaTeX} Part 2 - Introduction + \item {\LaTeX} Part 3 - Structuring the Content + \end{itemize} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Quotation Marks} + \begin{itemize} + \item Use \`~ (accent) for left quote + \item Use \'~ (apostrophe) for right quote + \item For double quotes, use them twice + \end{itemize} + \tiny See rev11 of \typ{hg} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Fonts - Emphasis, Fixed width, \ldots} + \begin{itemize} + \item \lstinline{\emph} gives emphasized or italic text + \item \typ{flushleft} to have text left aligned + \item \typ{flushright}, \typ{center} + \end{itemize} + \tiny See rev12 of \typ{hg} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Fonts - Emphasis, Fixed width, \ldots} + \begin{itemize} + \item \lstinline{\texttt} gives fixed width font + \item \lstinline{\textbf} bold face font + \item \lstinline{--} en dash (--); \lstinline{---} em dash (---). + \end{itemize} + \tiny See rev13 of \typ{hg} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Lists} + \begin{itemize} + \item \lstinline{enumerate} environment is used for numbered lists + \item \lstinline{itemize} environment gives un-numbered lists + \item Each item in the list is specified using \lstinline{\item} + \item Nested lists are also easily handled, as expected + \end{itemize} + \tiny See rev14 of \typ{hg} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Footnotes} + \begin{itemize} + \item \typ{\\footnote} command adds a footnote + \end{itemize} + \tiny See rev15 of \typ{hg} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Labels and References} + \begin{itemize} + \item \lstinline+\label{labelname}+ is used to label an element + \item \lstinline+\ref{labelname}+ is used to refer to that element + \item Compile twice + \end{itemize} + \tiny See rev15 of \typ{hg} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Including code} + \begin{itemize} + \item Instead of using \lstinline{\texttt} we could use + \lstinline{\verbatim} + \item \lstinline+listings+ is a powerful package + \item \lstinline+\usepackage{listings}+ needs to be added + \item Tell {\LaTeX} the language to be used, using \typ{\\lstset} + \end{itemize} + \tiny See rev16 of \typ{hg} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Including code} + \begin{itemize} + \item Use \lstinline+\lstlisting+ for a block of code + \item \typ{\\lstinline} for inline code + \end{itemize} + \tiny See rev16 of \typ{hg} +\end{frame} + + +\begin{frame}[fragile] + \frametitle{Summary...} + \begin{itemize} + Put Quotation Marks around text + \item How to Emphasize and give fixed width to fonts. + \item Use numbered and un-numbered lists + \item Add Footnotes, Labels and References + \item Use the listings package to include code + \end{itemize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Evaluation} +\begin{enumerate} +\item +\item +\item +\end{enumerate} +\end{frame} +\begin{frame} + +\frametitle{Solutions} +\begin{enumerate} +\item +\vspace{15pt} +\item +\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} diff --git a/Latex/Latex4/Typesetting_Text_Latex.rst b/Latex/Latex4/Typesetting_Text_Latex.rst new file mode 100644 index 0000000..2442060 --- /dev/null +++ b/Latex/Latex4/Typesetting_Text_Latex.rst @@ -0,0 +1,221 @@ + +.. Prerequisites +.. ------------- + +.. None + +.. Author : Primal Pappachan + Internal Reviewer : Kiran Isukapatla, Sushma Dubey + Date: Jan 8, 2012 +-------- +Script +-------- + +.. L1 + +{{{ Show the first slide containing title, name of the production team along with the logo of MHRD}}} + +.. R1 + +Hello friends and welcome to the second tutorial on Latex. + +.. L2 + +{{{Show the slide containing the objectives}}} + +.. R2 + +At the end of this tutorial you will be able to + +1. Learn how to typeset your document using LaTEX + +#. Use lists, listings in your document for formatting text + +.. L3 + +{{{Show the slide 'Prerequisite'}}} + +.. R3 + +Please make sure that you have gone through the following tutorials before you continue on this tutorial + +.. L4 + +{{{Show the slide 'Quotation Marks'}}} + +.. R4 + +Look at the quotation marks around the text, Sigh Pie. They are not formatted properly. + +.. L5 + +{{{Show rev11 of hg}}} + +.. R5 + +To place quotation marks in LaTeX, you should use ` character for the left quote & ' character for the right quote. For double quotes, they should be used twice. + +.. L6 + +{{{Show the slide 'Fonts'}}} + +.. R6 + +The names of the software tools, Scilab, Matlab, etc. appear in italics or emphasized as it is called in LaTeX. + +.. L7 + +{{{Show rev12 of hg}}} + +.. R7 + +To emphasize text, the \emph command is used. + +.. R8 + +Let's try and form a tabular structure by separating the left and right columns using spaces. On compiling we find that LaTeX doesn't add multiple spaces between words. Just like multiple empty lines, multiple spaces are considered as a single space. + +Also, you would have noticed that LaTeX starts a new paragraph at the beginning of the table. To avoid this, we use the flushleft environment. + +.. L8 + +{{{Show slides second part of 'Fonts'}}} + +.. R9 + +\textbf is used to change text to bold face and \texttt is used to change text to fixed width font. + +.. L9 + +{{{Show rev13 of hg}}} + +.. R10 + +We could also change the separating - (hyphen) to an em-dash (or en-dash) -- is em-dash and --- is an em-dash, to improve the appearance of the document. + +.. L10 + +{{{Show the slides Lists }}} + +.. R11 + +The section on Use of Scipy in this course, contains lists. Let's now add lists to our document. + +.. L11 + +{{{Show rev14 of hg}}} + +.. R12 + +The enumerate environment adds numbered lists to our document and the itemize environment adds un-numbered lists. \item command adds a new entry to a list. Note, that LaTeX can easily handle nested lists. In fact most environments can be embedded within other environments, without any problems. + + +.. L12 + +{{{Show slides 'Footnotes'}}} + +.. R13 + +Let's now add the footnote to pylab. LaTeX provides a footnote command to add a footnote. + + +.. L13 + +{{{Show rev15 of hg}}} + +.. R14 + +In case we wish to add another Appendix before the section on using pylab, the footnote will have to be edited. To avoid this, LaTeX provides a handy system of labels and referencing. + +.. L14 + +{{{Show the slide 'Labels and References'}}} + +.. R15 + +We first add a label to the section that we want to refer in this footnote. Then, we change the footnote, and add the reference to this label instead of the character A. If you look at the output after compiling the document once, you will see that the footnote has question marks instead of the section number. You will have to compile once again, for the section number to appear in the footnote. + +.. L15 + +{{{Show rev15 of hg}}} + + +.. R16 + +LaTeX by default provides the verbatim environment to include pre-formatted text. You can try that out during the lab session. We shall look at using the listings package, specifically meant for including code in our document. + +.. L16 + +{{{Show the slide 'Include Code'}}} + +.. R17 + +First of all you need to tell LaTeX, that you want to use the listings package in your document. We add the directive \usepackage{listings} to the preamble of our document. + +Then we set the language of the code that we are going to embed into our document. For this we use the lstset command. + +.. L17 + +{{{Show rev16 of hg}}} + +.. L18 + +{{{Show slide 'Including code'}}} + +.. R18 + +Now, to put a line of code, inline and not as a separate block, we use the \lstinline command. We change the name pylab in the footnote to use lstinline instead of the texttt. To embed a block of code, we use the lstlisting environment (\begin{lstlisting} and \end{lstlisting}). + +.. L19 + +{{{Show rev16 of hg}}} + +.. R19 + +For example, let's add the code to the Appendix of our document. + +.. L20 + +{{{Show the 'summary' slide'}}} + +.. R20 + +This brings us to the end of the tutorial. In this tutorial, we have +learnt to, + +1. Put Quotation Marks around text + +#. How to Emphasize and give fixed width to fonts. + +#. Use numbered and un-numbered lists + +#. Add Footnotes, Labels and References + +#. Use the listings package to include code + +.. L21 + +{{{Show self assessment questions slide}}} + +.. R21 + +Here are some self assessment questions for you to solve + +.. L22 + +{{{Show the solutions slide to self assessment questions }}} + +.. R22 + +And the answers, + + +.. L23 + +{{{Show the thank you slide}}} + +.. R23 + +Hope you have enjoyed this tutorial and found it useful. +Thank you + diff --git a/Latex/Latex5/FTF_Latex.rst b/Latex/Latex5/FTF_Latex.rst new file mode 100644 index 0000000..b213709 --- /dev/null +++ b/Latex/Latex5/FTF_Latex.rst @@ -0,0 +1,206 @@ + +.. Prerequisites +.. ------------- + +.. None + +.. Author : Primal Pappachan + Internal Reviewer : Kiran Isukapatla, Sushma Dubey + Date: Jan 15, 2012 +-------- +Script +-------- + +.. L1 + +{{{ Show the first slide containing title, name of the production team along with the logo of MHRD}}} + +.. R1 + +Hello friends and welcome to the second tutorial on Latex. + +.. L2 + +{{{Show the slide containing the objectives}}} + +.. R2 + +1. Learn how to add figures to your document + +#. Include tabular environments + +.. L3 + +{{{Show the slide 'Prerequisite'}}} + +.. R3 + +Please make sure that you have gone through the following tutorials before you continue on this tutorial + +.. L4 + +{{{Show the slide 'Figures'}}} + +.. R4 + +To include graphics in a LaTeX document, we need to use the graphicx package. Add the \usepackage{graphicx} directive to the preamble of the document. + +To add the graphic, use the includegraphics command. The relative path of the image that we wish to include is passed as an argument to includegraphics. It takes an optional argument of scaling the image. + +.. L5 + +{{{Show rev17 of hg}}} + +.. R5 + +We use a scale of 0.4 to scale our image. + +.. L6 + +{{{Show slide 'includegraphics'}}} + +.. R6 + +It takes other optional arguments. + +1. width=x, height=x + +If only the height or width is specified, the image is scaled, maintaining the aspect ratio. + +#. keepaspectratio + +This parameter can either be set to true or false. When set to true, the image is scaled according to both width and height, without changing the aspect ratio, so that it does not exceed both the width and the height dimensions. + +#. angle=x + +This option can be used to rotate the image by x degrees, counter-clockwise. + +.. L7 + +{{{Show the slide 'Floats'}}} + +.. R7 + +Figures (and tables) are treated specially because, they cannot be broken across pages. They are "floated" across to the next page, if they donot fit on the current page, filling the current page with text. To make our graphic into a float, we should enlose it within a figure environment. The figure environment takes an additional parameter for the location of the float. + +.. L8 + +\begin{figure}[hbtp!] + +.. R8 + +The specifiers htbp are permissions to place the float at various locations. t for top of page, b for bottom of page, p for a separate page for floats and h for here, as in the same place where the command appears in the source. ! mark overrides a few of LaTeX's internal parameters for good position of floats. + +.. L9 + +{{{Show the slide Captions and References}}} + +.. R9 + +The figure environment also, allows us to add a caption to the graphic using the \caption command. + +To place the graphic in the center aligned in the page, we use the center environment. + +To label a figure, we just add a label with in the figure environment. Note, that the label to a figure should be added after the caption command. + +.. L9 + +{{{Show rev17 of hg}}} + +.. R9 + +Figures are auto numbered + +.. L10 + +{{{Show the slide 'Tables'}}} + +.. R10 + +Now, let us look at the other kind of floats - Tables. We shall convert the list of sub-packages in the sub-packages section to a table. + +To begin a table, we use the tabular environment. And to make this a float, it is enclosed in the table environment. The table environment also allows us to add captions to the table and Tables are also auto numbered. + +.. L11 + +{{{Show the slide 'tabular'}}} + +.. R11 + +The tabular environment takes as arguments the columns and the formatting of each column. The possible arguments to the tabular environment are + +1. l for left justified column content + +#. r for right justified column content + +#. c for centered column content + +#. | for produces a vertical line. + +It also takes an optional parameter that specifies the position of the table; t for top, b for bottom, or c for center. + +.. L12 + +{{{Show rev18 of hg}}} + +.. R12 + +Each column of a table is separated by an & symbol and each row is separated by a new line. The \hline command allows you to draw horizontal lines between two rows of the table. + +.. L13 + +{{{Show the slide 'List of Tables, Figures'}}} + +.. R13 + +You could also add a listoftables or listoffigures to the document, similar to the way we added table of contents. + +.. L14 + +{{{Show the 'summary' slide'}}} + +.. R20 + +This brings us to the end of the tutorial. In this tutorial, we have +learnt to, + +1. Add graphics to a LateX document + +#. Include tabular environments in a LateX document + + +.. L21 + +{{{Show self assessment questions slide}}} + +.. R21 + +Here are some self assessment questions for you to solve + +.. L22 + +{{{Show the solutions slide to self assessment questions }}} + +.. R22 + +And the answers, + + +.. L23 + +{{{Show the thank you slide}}} + +.. R23 + +Hope you have enjoyed this tutorial and found it useful. +Thank you + + + + + + + + + + diff --git a/Latex/Latex5/Latex_FTF.tex b/Latex/Latex5/Latex_FTF.tex new file mode 100644 index 0000000..9ae52b6 --- /dev/null +++ b/Latex/Latex5/Latex_FTF.tex @@ -0,0 +1,246 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% LateX +% +% Author: FOSSEE +% Copyright (c) 2009, FOSSEE, IIT Bombay +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass{beamer} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{fixltx2e} +\usepackage{graphicx} +\usepackage{longtable} +\usepackage{float} +\usepackage{wrapfig} +\usepackage{soul} +\usepackage{textcomp} +\usepackage{marvosym} +\usepackage{wasysym} +\usepackage{latexsym} +\usepackage{amssymb} +\usepackage{hyperref} +\tolerance=1000 +\usepackage[english]{babel} \usepackage{ae,aecompl} +\usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet} +\usepackage{listings} +\lstset{ + language=TeX, + basicstyle=\ttfamily\bfseries, + commentstyle=\ttfamily\color{blue}, + stringstyle=\ttfamily\color{orange}, + showstringspaces=false, + breaklines=true, + postbreak = \space\dots +} + +\newcommand{\typ}[1]{\lstinline{#1}} + +\mode<presentation> +{ + \usetheme{Warsaw} + \useoutertheme{infolines} + \setbeamercovered{transparent} +} + + +\setbeamercolor{emphbar}{bg=blue!20, fg=black} +\newcommand{\emphbar}[1] + + +\begin{document} + +\begin{frame} + +\begin{center} +\vspace{12pt} +\textcolor{blue}{\huge {\LaTeX}:Tables, Figures and Floats} +\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.15]{../images/iitb-logo.jpg}\\ +\end{center} +\end{frame} + + +\begin{frame} + \frametitle{Objectives} + At the end of this session, you will be able to: + \begin{itemize} + \item Learn how to add figures to your document + \item Include tabular environments + \end{itemize} +\end{frame} + + +\begin{frame} + \frametitle{Prerequisite} + Spoken Tutorial on: + \begin{enumerate} + \item {\LaTeX} - Getting Started + \item {\LaTeX} - Introduction + \item {\LaTeX} - Structuring the Content + \item {\LaTeX} - Typesetting Text + \end{enumerate} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Figures} + \begin{itemize} + \item The \typ{graphicx} package allows us to insert graphics + \item \lstinline+\usepackage{graphicx}+ + \item To add a graphic, use \lstinline{\includegraphics} command + \item Use relative path to the image + \end{itemize} + \tiny See rev17 of \typ{hg} +\end{frame} + +\begin{frame}[fragile] + \frametitle{\lstinline{includgraphics}} + It takes following optional arguments + \begin{itemize} + \item \lstinline+scale+ --- specifies the factor by which to scale + the image + \item \lstinline+height+, \lstinline+width+ --- If only one of them + is specified, aspect ratio is maintained + \item \lstinline+keepaspectratio+ --- boolean value to keep aspect + ratio or not + \item \lstinline+angle+ --- specify by what angle the image should + be rotated + \end{itemize} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Floats} + \begin{itemize} + \item Graphics (\& Tables) are special because they cannot be broken + across pages + \item They are ``floated'' to the next page, if they don't fit in + the current page + \item Enclose graphic within \lstinline+figure+ environment to make + it float + \item Figure environment takes additional parameter for location of + float + \end{itemize} + \begin{table} + \caption{Permission Specifiers} + + \begin{tabular}{|c|c|} + Specifier & Permission\\\hline + t & Top of page\\ + b & Bottom of page\\ + p & Separate page for floats\\ + h & here (the same place where command appears in source)\\ + ! & override \LaTeX's internal parameters for good position + \end{tabular} + \end{table} +\end{frame} + +\begin{frame} + \frametitle{Captions and References} + \begin{itemize} + \item Figure environment allows us add a caption + \item To place the image in the center we enclose it in the + \lstinline+center+ environment + \item We can label images too + \item label should be added after the caption command + \item Figures are auto numbered + \end{itemize} + \tiny See rev17 of \typ{hg} +\end{frame} + +\begin{frame}[frame] + \frametitle{Tables} + \begin{itemize} + \item \lstinline+tabular+ is used to typeset a table + \item It is enclosed in a \lstinline+table+ environment to make it a + float + \item \lstinline+table+ environment also gives captions, auto + numbering + \end{itemize} +\end{frame} + + +\begin{frame}[fragile] + \frametitle{\lstinline+tabular+} + \begin{itemize} + \item tabular takes formatting of each column as argument + \end{itemize} + + \begin{table} + \caption{tabular environment} + + \begin{tabular}{|l|l|} + \lstinline+l+ & left justified column content\\\hline + \lstinline+r+ & right justified column content\\\hline + \lstinline+c+ & centered column content\\\hline + \lstinline+|+ & produces a vertical line\\ + \end{tabular} + \end{table} + \begin{itemize} + \item also takes an optional parameter for specifying position of + table + \item \lstinline+t+ for top, \lstinline+b+ for bottom, \lstinline+c+ + for center + \item each column of table is separated by \& + \item each row is separated by newline \lstinline{\\} + \item \lstinline+\hline+ give a horizontal line between two rows + \end{itemize} + \tiny See rev18 of \typ{hg} +\end{frame} + +\begin{frame}[fragile] + \frametitle{List of Tables, Figures} + \begin{itemize} + \item \lstinline+\listoftables+ -- to add a list of tables + \item \lstinline+\listoffigures+ -- to add a list of figures + \end{itemize} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Summary...} + \begin{itemize} + \item + \end{itemize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Evaluation} +\begin{enumerate} +\item +\item +\item +\end{enumerate} +\end{frame} +\begin{frame} + +\frametitle{Solutions} +\begin{enumerate} +\item +\vspace{15pt} +\item +\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} + diff --git a/Latex/images/folder.png b/Latex/images/folder.png Binary files differnew file mode 100644 index 0000000..42d01a2 --- /dev/null +++ b/Latex/images/folder.png diff --git a/Latex/images/fossee-logo.png b/Latex/images/fossee-logo.png Binary files differnew file mode 100644 index 0000000..49d1797 --- /dev/null +++ b/Latex/images/fossee-logo.png diff --git a/Latex/images/iitb-logo.jpg b/Latex/images/iitb-logo.jpg Binary files differnew file mode 100644 index 0000000..2a63fae --- /dev/null +++ b/Latex/images/iitb-logo.jpg diff --git a/Latex/images/mercurial_logo.png b/Latex/images/mercurial_logo.png Binary files differnew file mode 100644 index 0000000..4cd736e --- /dev/null +++ b/Latex/images/mercurial_logo.png diff --git a/Version_Control/vcs1/vcs1.rst b/Version_Control/vcs1/vcs1.rst index 623d73c..863ed87 100644 --- a/Version_Control/vcs1/vcs1.rst +++ b/Version_Control/vcs1/vcs1.rst @@ -15,7 +15,7 @@ Script {{{ Show the first slide containing title, name of the production team along with the logo of MHRD}}} -i.. R1 +.. R1 Hello friends and welcome to the tutorial on 'Version Control with Hg' |