diff options
author | Hardik Ghaghada | 2014-06-12 13:22:13 +0530 |
---|---|---|
committer | Hardik Ghaghada | 2014-06-12 13:22:13 +0530 |
commit | 1f7318ca9553270899537d98d75e9f4fced85ed4 (patch) | |
tree | 7d149f9203f7eb122e749696e570d10086275ce4 /lecture-notes/latex/workbook | |
parent | 985adfa4f8a8b9cfba2b0a573dadc77283651957 (diff) | |
download | sees-1f7318ca9553270899537d98d75e9f4fced85ed4.tar.gz sees-1f7318ca9553270899537d98d75e9f4fced85ed4.tar.bz2 sees-1f7318ca9553270899537d98d75e9f4fced85ed4.zip |
restructring repo
Diffstat (limited to 'lecture-notes/latex/workbook')
-rw-r--r-- | lecture-notes/latex/workbook/bibtex.rst | 35 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/example1.tex | 4 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/example10.tex | 19 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/example2.tex | 26 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/example3.tex | 23 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/example4.tex | 11 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/example5.tex | 24 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/example6.tex | 31 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/example7.tex | 13 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/example8.tex | 176 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/example9.tex | 11 | ||||
-rw-r--r-- | lecture-notes/latex/workbook/lion_orig.png | bin | 0 -> 32381 bytes |
12 files changed, 373 insertions, 0 deletions
diff --git a/lecture-notes/latex/workbook/bibtex.rst b/lecture-notes/latex/workbook/bibtex.rst new file mode 100644 index 0000000..dec3097 --- /dev/null +++ b/lecture-notes/latex/workbook/bibtex.rst @@ -0,0 +1,35 @@ +BibTeX +~~~~~~ + +The previous section explained the process of listing references at the end of a document and embedding cross references. In this section let us explore the BibTeX environment for keeping track of references. + +Using BibTeX is a very convenient method to use, when writing multiple documents in a single area or field. BibTeX allows you to create a database of all your references and use them as and when required. + +The BibTeX database is stored in a ``.bib`` file. The structure of the file is quite simple and an example is shown below. +:: + + @book{Lamport94, + author = "Leslie Lamport", + title = "A Document Preparation System: User's Guide and Reference", + publisher = "Addison-Wesley Professional", + year = "1994", + edition = "second", + note = "illustrations by Duane Bibby" + } + +Each bibliography entry starts with a declaration of the type of the reference being mentioned. The reference is in the above example is of the book type. BibTeX has a wide range of reference types, for example, ``article, book, conference, manual, proceedings, unpublished``. + +The type of reference is followed by a left curly brace, and immediately followed by the citation key. The citation key, ``Lamport94`` in the example above is used to cite this reference using the command ``\cite{Lamport94}``. + +This is followed by the relevant fields and their values, listed one by one. Each entry must be followed by a comma to delimit one field from the other. + +To get your LaTeX document to use the bibliography database, you just add the following lines to your LaTeX document. +:: + + \bibliographystyle{plain} + \bibliography{LaTeX} + +Bibliography styles are files that tell BibTeX how to format the information stored in the ``.bib`` database file. The style file for this example is ``plain.bst``. Note that you do not need to add the ``.bst`` extension to the filename. If you wish to achieve a particular style of listing the bibliography items and citing them, you should use an appropriate style file. + +The ``bibliography`` command specifies the file that should be used as the database for references. The file used in this example is ``LaTeX.bib`` + diff --git a/lecture-notes/latex/workbook/example1.tex b/lecture-notes/latex/workbook/example1.tex new file mode 100644 index 0000000..f2d8b7b --- /dev/null +++ b/lecture-notes/latex/workbook/example1.tex @@ -0,0 +1,4 @@ +\documentclass{article} +\begin{document} +This is my first LaTeX document. +\end{document} diff --git a/lecture-notes/latex/workbook/example10.tex b/lecture-notes/latex/workbook/example10.tex new file mode 100644 index 0000000..a521468 --- /dev/null +++ b/lecture-notes/latex/workbook/example10.tex @@ -0,0 +1,19 @@ +\documentclass{article} +\begin{document} +This is my simple document with nested lists. +\begin{enumerate} +\item First Enumerated Item. +\item Second Enumerated Item. +\item Third Enumerated Item. + \begin{itemize} + \item First Item. + \item Second Item. + \item Third Item. + \begin{itemize} + \item First Sub-Item. + \item Second Sub-Item. + \item Third Sub-Item. + \item Fourth Sub-Item. + \end{itemize} +\end{enumerate} +\end{document} diff --git a/lecture-notes/latex/workbook/example2.tex b/lecture-notes/latex/workbook/example2.tex new file mode 100644 index 0000000..1f760cd --- /dev/null +++ b/lecture-notes/latex/workbook/example2.tex @@ -0,0 +1,26 @@ +\documentclass{article} +\title{Python} +\author{Wikipedia} +\maketitle +\begin{document} +Python is a general-purpose high-level programming language whose +design philosophy emphasizes code readability. Python aims to combine +"remarkable power with very clear syntax", and its standard library is +large and comprehensive. Its use of indentation for block delimiters +is unusual among popular programming languages. + +Python supports multiple programming paradigms, primarily but not +limited to object oriented, imperative and, to a lesser extent, +functional programming styles. It features a fully dynamic type system +and automatic memory management, similar to that of Scheme, Ruby, +Perl, and Tcl. Like other dynamic languages, Python is often used as a +scripting language, but is also used in a wide range of non-scripting +contexts. + +The reference implementation of Python (CPython) is free and open +source software and has a community-based development model, as do all +or nearly all of its alternative implementations. CPython is managed +by the non-profit Python Software Foundation. + +This content is from Wikipedia's Python page. +\end{document} diff --git a/lecture-notes/latex/workbook/example3.tex b/lecture-notes/latex/workbook/example3.tex new file mode 100644 index 0000000..70cfdaa --- /dev/null +++ b/lecture-notes/latex/workbook/example3.tex @@ -0,0 +1,23 @@ +\documentclass{article} +\begin{document} +Python is a general-purpose high-level programming language whose +design philosophy emphasizes code readability.[3] Python aims to +combine "remarkable power with very clear syntax",[4] and its standard +library is large and comprehensive. Its use of indentation for block +delimiters is unusual among popular programming languages. + +Python supports multiple programming paradigms, primarily but not +limited to object oriented, imperative and, to a lesser extent, +functional programming styles. It features a fully dynamic type system +and automatic memory management, similar to that of Scheme, Ruby, +Perl, and Tcl. Like other dynamic languages, Python is often used as a +scripting language, but is also used in a wide range of non-scripting +contexts. + +The reference implementation of Python (CPython) is free and open +source software and has a community-based development model, as do all +or nearly all of its alternative implementations. CPython is managed +by the non-profit Python Software Foundation. + +This content is from Wikipedia's Python page. +\end{docment} diff --git a/lecture-notes/latex/workbook/example4.tex b/lecture-notes/latex/workbook/example4.tex new file mode 100644 index 0000000..317d3f5 --- /dev/null +++ b/lecture-notes/latex/workbook/example4.tex @@ -0,0 +1,11 @@ +\documentclass{article} +\title{A Glimpse at Scipy} +\author{FOSSEE} +date{2010} +\begin{document} +\maketitle +SciPy is open-source software for mathematics, science, and +engineering. +\end{document} + + diff --git a/lecture-notes/latex/workbook/example5.tex b/lecture-notes/latex/workbook/example5.tex new file mode 100644 index 0000000..7600797 --- /dev/null +++ b/lecture-notes/latex/workbook/example5.tex @@ -0,0 +1,24 @@ +\documentclass{article} +\begin{abstract} + This content is from Wikipedia page on Python. +\end{abstract} +\begin{document} +Python is a general-purpose high-level programming language whose +design philosophy emphasizes code readability. Python aims to combine +``remarkable power with very clear syntax'', and its standard library is +large and comprehensive. Its use of indentation for block delimiters +is unusual among popular programming languages. + +Python supports multiple programming paradigms, primarily but not +limited to object oriented, imperative and, to a lesser extent, +functional programming styles. It features a fully dynamic type system +and automatic memory management, similar to that of Scheme, Ruby, +Perl, and Tcl. Like other dynamic languages, Python is often used as a +scripting language, but is also used in a wide range of non-scripting +contexts. + +The reference implementation of Python (CPython) is free and open +source software and has a community-based development model, as do all +or nearly all of its alternative implementations. CPython is managed +by the non-profit Python Software Foundation. +\end{document} diff --git a/lecture-notes/latex/workbook/example6.tex b/lecture-notes/latex/workbook/example6.tex new file mode 100644 index 0000000..828a188 --- /dev/null +++ b/lecture-notes/latex/workbook/example6.tex @@ -0,0 +1,31 @@ +%hello.tex - First LaTeX document +\documentclass[12pt]{article} + +\title{LaTeX} +\author{The FOSSEE Team} +\date{August 2010} + +\begin{document} +\maketitle +\tableofcontents + +\begin{abstract} +This is a sample document to be used in the STTP course for a quick introduction to \LaTeX +\end{abstract} + +\section{Introduction} +LaTeX is a typesetting program used to produce excellently typeset documents. + +\section{Structural Elements} +Let us now look at giving a better structure to our document. + +\subsection{documentclass} +The \verb+documentclass+ variable tells \LaTeX, the type of document we wish to prepare. + +\subsection{Sections, Chapters and Parts} +We shall first look at how to divide the document into Sections, Chapters and Parts. + +\subsubsection{Appendices} +I can't tell you how to add an appendix, in the main document. + +\end{document} diff --git a/lecture-notes/latex/workbook/example7.tex b/lecture-notes/latex/workbook/example7.tex new file mode 100644 index 0000000..6b7d14d --- /dev/null +++ b/lecture-notes/latex/workbook/example7.tex @@ -0,0 +1,13 @@ +\documentclass{article} +\begin{document} +This is my first LaTeX document. +\begin{equation} + a^2 + b^2 = c^2 +\end{equation} +\[ +\begin{pmatrix} +\alpha& \beta^{*}\\ +\gamma^{*}& \delta +\end{pmatrix} +\] +\end{document} diff --git a/lecture-notes/latex/workbook/example8.tex b/lecture-notes/latex/workbook/example8.tex new file mode 100644 index 0000000..87267ae --- /dev/null +++ b/lecture-notes/latex/workbook/example8.tex @@ -0,0 +1,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} diff --git a/lecture-notes/latex/workbook/example9.tex b/lecture-notes/latex/workbook/example9.tex new file mode 100644 index 0000000..e066c1e --- /dev/null +++ b/lecture-notes/latex/workbook/example9.tex @@ -0,0 +1,11 @@ +\documentclass{article} +\begin{document} +This document contains a figure. +The figure \ref{fig:lion} is a drawing by Duane Bibby. +\begin{figure} +\centering +\label{fig:lion} +\caption[CTAN Lion]{CTAN lion drawing by Duane Bibby; thanks to www.ctan.org} +\includegraphics[scale=0.8, angle=30]{lion_orig.png} +\end{figure} +\end{document} diff --git a/lecture-notes/latex/workbook/lion_orig.png b/lecture-notes/latex/workbook/lion_orig.png Binary files differnew file mode 100644 index 0000000..0026477 --- /dev/null +++ b/lecture-notes/latex/workbook/lion_orig.png |