latex/handout.rst
changeset 157 3174d4803cd5
parent 104 828c65311bdf
equal deleted inserted replaced
156:8f4806a1a64d 157:3174d4803cd5
     2 =====
     2 =====
     3 
     3 
     4 Introduction
     4 Introduction
     5 ------------
     5 ------------
     6 
     6 
     7 LaTeX is a typesetting program that produces excellently typeset
     7 LaTeX is a typesetting program that produces excellently typeset documents.
     8 documents. Typesetting is placing text onto a page with all the style
     8 Typesetting is placing text onto a page with all the style formatting
     9 formatting defined, so that content looks as intended. It is
     9 defined, so that content looks as intended. It is extensively used for
    10 extensively used for producing high quality scientific and
    10 producing high quality scientific and mathematical documents. It may also be
    11 mathematical documents. It is also used for producing other kinds of
    11 used for producing other kinds of documents, ranging from simple one page
    12 documents, ranging from simple one page articles or letters to
    12 articles to complete books. LaTeX is based on the TeX typesetting language.
    13 books. LaTeX is based on the TeX typesetting language.
    13 
    14 
    14 LaTeX is pronounced either as "Lah-tech" or "Lay-tech". 
    15 LaTeX is pronounced either as "Lah-tech" or "Lay-tech"
    15 
    16 
    16 
    17 In this course, we shall use the sample document, ``sample.pdf``, as a
    17 Why LaTeX?
    18 tool to learn various commands of LaTeX. By the end of the sessions on
    18 ~~~~~~~~~~
    19 LaTeX, we will have produced a copy of that document, starting from
    19 
    20 scratch.
    20 A few reasons for using LaTeX - 
       
    21 
       
    22   * It produces documents with excellent visual quality.
       
    23   * It does the typesetting for you, leaving you - the author - to focus on
       
    24     writing the content. You will appreciate this, as you learn more.
       
    25   * It makes writing math just as easy as writing simple text.
       
    26   * It's renowned for it's stability and a virtually bug free code base.
       
    27   * It is light on your resources as compared to most of the word processors
       
    28     available today.
       
    29   * It uses plain text files as input and can give output in a variety of
       
    30     formats including PDFs and html making it platform independent.
       
    31   * It is free software (free as in freedom) and gratis too.
       
    32   * It is widely used and has a large user community.
       
    33 
       
    34 
       
    35 Course Outline
       
    36 ~~~~~~~~~~~~~~
       
    37 
       
    38 In this course, we will learn enough LaTeX to be a able to produce a simple
       
    39 document with text, tables, figures, math, references and bibliography. We
       
    40 will also briefly see how to create presentations using LaTeX, such as the
       
    41 one use for the slides of this course.
       
    42 
       
    43 The sample document, ``sample.pdf``, available in the course material, will
       
    44 serve as a teaching/learning tool to learn LaTeX. During the course, we shall
       
    45 reproduce this sample document, starting from scratch, in LaTeX
    21 
    46 
    22 A Look at the Sample Document
    47 A Look at the Sample Document
    23 -----------------------------
    48 +++++++++++++++++++++++++++++
    24 
    49 
    25 Let's first look at the basic structure of the sample document.
    50 A look at the sample document gives us an idea about the various elements
    26 
    51 present in the document, that we will be learning during this course.
    27 Slides with screen shots of
    52 
       
    53 We shall be learning how to add the following elements to our LaTeX
       
    54 documents.
    28 
    55 
    29   * Title, Author, Date
    56   * Title, Author, Date
    30   * Abstract
    57   * Abstract
    31   * Sections
    58   * Sections & Subsections
    32   * Subsections
    59   * Appendices
    33   * Appendix
       
    34   * References/Bibliography
    60   * References/Bibliography
    35   * Tables
    61   * Tables
    36   * Figures
    62   * Figures
    37   * Math
    63   * Math
    38 
    64 
    39 Writing the source & compiling it
    65 
    40 ---------------------------------
    66 LaTeX is not a Word Processor
    41 
    67 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    42 Let's begin with a simple hello world, to see how to write a LaTeX
    68 
    43 document and compile it.  Write the following code into the file
    69 What do we mean by LaTeX not being a Word Processor? Suppose we wanted to
    44 ``draft.tex``.  ::
    70 create a simple document as shown in the image below. If one used a normal
       
    71 word processor, the author would have to worry about setting the font sizes
       
    72 of the fonts, centering the title, date and author information, etc.
       
    73 
       
    74 .. image:: images/latex_not_wp.png
       
    75    :alt: LaTeX is not a Word Processor
       
    76 
       
    77 To generate this document in LaTeX, we just tell it what we want as the
       
    78 title, author's name, date etc. and what we want as the content. LaTeX takes
       
    79 care of proper font size ratios and other presentation details.
       
    80 
       
    81 ::
       
    82 
       
    83   \documentclass{article}
       
    84   \title{My First Document}
       
    85   \author{FOSSEE}
       
    86   \date{January 2011}
       
    87   \begin{document}
       
    88      \maketitle
       
    89      Hello world!
       
    90   \end{document}
       
    91 
       
    92 LaTeX can be considered to be a document based markup language. What we mean
       
    93 by a markup language is that you mark up pieces of your text to be particular
       
    94 elements of your document and then a typesetter or processor typesets your
       
    95 document based on a set of rules. What do we mean by being document-based? It
       
    96 means, that in LaTeX, you can change the structure of the whole document
       
    97 consistently, with a few changes in the preamble of the document, with-out
       
    98 having to change each element separately.
       
    99 
       
   100 First steps -- Typesetting a minimal document
       
   101 ---------------------------------------------
       
   102 
       
   103 Let us start with a minimal example to learn how to write a LaTeX document
       
   104 and compile it to see the **typeset** output.
       
   105 
       
   106 To begin, type out the following code into your text editor and save it as
       
   107 ``draft.tex``. ::
    45 
   108 
    46   \documentclass{article}
   109   \documentclass{article}
    47   \begin{document}
   110   \begin{document}
    48   SciPy is open-source software for mathematics, science, and engineering.   
   111   SciPy is open-source software for mathematics, science, and engineering.   
    49   \end{document}
   112   \end{document}
    50 
   113 
    51 To compile the document, do the following in your terminal::
   114 To compile your document, type the following command in your terminal::
    52 
   115 
    53   $ pdfLaTeX draft.tex
   116   $ pdflatex draft.tex
    54 
   117 
    55 This produces the output file ``draft.pdf``
   118 This produces the output file ``draft.pdf``
    56 
   119 
    57 Note: The ``LaTeX`` command is often used, instead of ``pdfLaTeX`` to
   120 Note: The ``latex`` command is often used, instead of ``pdflatex`` to get the
    58 get the ``dvi`` output. But, throughout this course, we shall use
   121 ``dvi`` output. But, throughout this course, we shall use ``pdflatex`` to
    59 pdfLaTeX to compile our documents.
   122 compile our documents.
       
   123 
       
   124 What does it mean?
       
   125 ~~~~~~~~~~~~~~~~~~
       
   126 
       
   127 As we have already seen, LaTeX is a document based markup. The first line,
       
   128 ``\documentclass{article}``, tells that our document is an article type
       
   129 document. LaTeX then, typesets the document accordingly. The documentclass
       
   130 command, defines the structure and formatting of our document.
       
   131 
       
   132 The ``begin`` and ``end`` document commands, mark the beginning and the end
       
   133 of the content of the LaTeX document. The text in between the begin and end
       
   134 commands is typeset in the output document. 
       
   135 
       
   136 A little digression
       
   137 ~~~~~~~~~~~~~~~~~~~
       
   138 
       
   139 Just like in ``bash`` and ``Python``, the commands in LaTeX are
       
   140 case-sensitive. ``\Documentclass`` is therefore not a valid command. 
       
   141 
       
   142 All the commands in LaTeX begin with a ``\``. An environment begins with a
       
   143 ``begin`` command and ends with an ``end`` command. In our minimal example,
       
   144 ``document`` is an environment. Only the text enclosed by the begin and end
       
   145 commands is effected by the environment. 
       
   146 
       
   147 So, as expected LaTeX ignores anything that is written after the
       
   148 ``\end{document}`` command. (The part of the file before the
       
   149 ``\begin{document}`` command is called the preamble, and is used to
       
   150 *"configure"* the LaTeX typesetter and change various parameters for
       
   151 typesetting. Details later.)
       
   152 
       
   153 Essentially, anything written after the ``\end{document}`` command turns out
       
   154 to be a comment. But, how do we write comments with in the document. ``%`` is
       
   155 the character to indicate comments. Anything written after a ``%`` symbol in
       
   156 a line, is ignored. For example, we can add a comment to the minimal document
       
   157 saying, this is our first document in LaTeX, by saying ``% My First LaTeX
       
   158 document``. 
       
   159 
       
   160 But what if we wanted to insert the ``%`` symbol in the document? We can do
       
   161 so by escaping it with a ``\`` (backslash). ``%`` is one of the many special
       
   162 characters in LaTeX. The others are, ``~ # $ ^ & _ { } \``. All of them,
       
   163 except the ``\`` itself, can be inserted by escaping it with a ``\``. To
       
   164 insert a ``\`` in our document, we use the command ``\textbackslash``. 
       
   165 
       
   166 What would happen if we escape a ``\`` with a ``\``? Yes, you guessed it. A
       
   167 double backslash is actually another command. It inserts a new line in the
       
   168 typeset document. The ``\\`` command or ``\newline`` command is used to
       
   169 insert a newline in the output document. Line breaks in the input document,
       
   170 do not translate into line breaks in the output document. A single line break
       
   171 in the input document, doesn't cause any change in the output. A single empty
       
   172 line causes a change in paragraphs in the output. (Multiple empty lines are
       
   173 equivalent to a single empty line.) Similarly, multiple spaces are treated as
       
   174 a single space. 
       
   175 
       
   176 Adding Structure
       
   177 ----------------
       
   178 
       
   179 Let us now, look at giving the document some basic structure, like title,
       
   180 sections, etc. 
    60 
   181 
    61 ``\documentclass``
   182 ``\documentclass``
    62 ------------------
   183 ~~~~~~~~~~~~~~~~~~
    63 
   184 
    64 The documentclass command, defines the structure and formatting of our
   185 As we have already seen, the ``documentclass`` command tells LaTeX, the type
    65 document. LaTeX typsets the document, based on the documentclass.
   186 of the document that we intend to create. Some of the available LaTeX classes
    66 
   187 are, ``article``, ``proc``, ``report``, ``book``, ``slides``, ``letter``.
    67 LaTeX is a document based markup language. 
   188 Each class has a few differences in how the content of the document is
    68 
   189 typeset.
    69 First of all, a markup language is a system of annotating text or
   190 
    70 adding in extra information to the text that specifies it's structure
   191 The ``documentclass`` command also accepts a few optional parameters. For
    71 or presentation.
   192 example::
    72 
   193 
    73 LaTeX is a document based markup and not an element based one. You
   194   \documentclass[12pt,a4paper,oneside,draft]{report}
    74 generally don't have to worry about typesetting each of the elements
   195 
    75 of your document. Choosing an appropriate documentclass, gives you a
   196 ``12pt`` specifies the size of the main font in the document. The relative
    76 suitable typesetting. You as an author can worry about the content of
   197 sizes of the various fonts is maintained, when the font size is changed. If
    77 the document, rather than the appearance or presentation of the
   198 no size is specified, ``10pt`` is assumed by default.
    78 document.
   199 
    79 
   200 ``a4paper`` specifies the size of the paper to be used for the document.
    80 Why should you use it?
   201 
    81 ~~~~~~~~~~~~~~~~~~~~~~
   202 ``draft`` marks the hyphenation and justification problems in the document
    82 
   203 with a small square in the right hand margin of the document, so that they
    83 A few reasons for using LaTeX - 
   204 can be easily spotted.
    84 
       
    85   * It produces documents with excellent visual quality.
       
    86   * It does the typesetting for you, leaving you - the author - to
       
    87     focus on writing the content.
       
    88   * It makes writing math just as easy as writing simple text.
       
    89   * It's renowned for it's stability and a virtually bug free code
       
    90     base.
       
    91   * It is light on your resources as compared to most of the word
       
    92     processors available today.
       
    93   * It uses plain text files as input and can give output in a variety
       
    94     of formats including PDFs and html making it platform independent.
       
    95   * It is free software (free as in freedom) and gratis too.
       
    96   * It is widely used and has a large user community. 
       
    97 
       
    98 
       
    99 ``\begin`` and ``\end`` commands define environments. In our document,
       
   100 we have the document environment, which defines the beginning and end
       
   101 of the content of the document. We place all the content of the
       
   102 document within this environment.
       
   103 
       
   104 Also, as you may have noticed, all the commands in LaTeX begin with a
       
   105 ``\``. Note that they are case sensitive. Command names in LaTeX
       
   106 usually have only alpha characters. Any characters other than alpha
       
   107 characters, terminate the command name. Parameters to commands are
       
   108 passed in ``{ }``.
       
   109 
       
   110 
   205 
   111 Top Matter
   206 Top Matter
   112 ----------
   207 ----------
   113 
   208 
   114 Let us begin with adding the Title, Author's name and the date to the
   209 Let us begin with adding the Title, Author's name and the date to the
   124   \maketitle
   219   \maketitle
   125   SciPy is open-source software for mathematics, science, and engineering.   
   220   SciPy is open-source software for mathematics, science, and engineering.   
   126   \end{document}
   221   \end{document}
   127 
   222 
   128 We add the title, the author and the date to the document before the
   223 We add the title, the author and the date to the document before the
   129 ``\begin{document}`` directive. We compile the document to see if the
   224 ``\begin{document}`` directive. We compile the document to see if the details
   130 details appear in the document, but they donot. These details do not
   225 appear in the document, but they donot. These details do not appear in the
   131 appear in the document until we use the ``\maketitle`` command with
   226 document until we use the ``\maketitle`` command with the document
   132 the document environment to instruct LaTeX to place the top matter
   227 environment to instruct LaTeX to place the top matter information into the
   133 information into the document. Now the document has these details, on
   228 document. Now the document has these details, on compiling again.
   134 compiling again.
       
   135 
   229 
   136 If no date is specified, LaTeX automatically inserts the current date.
   230 If no date is specified, LaTeX automatically inserts the current date.
   137 
   231 
   138 Abstract
   232 Abstract
   139 --------
   233 --------
   140 
   234 
   141 Next we shall add an abstract to our document. LaTeX provides an
   235 Next we shall add an abstract to our document. LaTeX provides an environment,
   142 environment, for adding an abstract to the document.  ::
   236 for adding an abstract to the document. 
       
   237 
       
   238 ::
   143 
   239 
   144   \documentclass{article}
   240   \documentclass{article}
   145 
   241 
   146   \title{A Glimpse at Scipy}
   242   \title{A Glimpse at Scipy}
   147   \author{FOSSEE}
   243   \author{FOSSEE}
   156   \end{abstract}
   252   \end{abstract}
   157 
   253 
   158   SciPy is open-source software for mathematics, science, and engineering.   
   254   SciPy is open-source software for mathematics, science, and engineering.   
   159   \end{document}
   255   \end{document}
   160 
   256 
   161 The abstract environment is placed at the location where we wish it to
   257 The abstract environment is placed at the location where we wish it to appear
   162 appear in the document.
   258 in the document.
   163 
   259 
   164 Sections
   260 Sections
   165 --------
   261 --------
   166 
   262 
   167 Now let's look at how to add (chapters,) sections and sub-sections to
   263 Now let's look at how to add (chapters,) sections and sub-sections to our
   168 our document. Let's add the section headings and sub headings present
   264 document. Let's add the section headings and sub headings present in our
   169 in our sample document to the working copy of our document.
   265 sample document to the working copy of our document.
   170 
   266 
   171 ``\section``, ``\subsection``, ``\subsubsection``
   267 ``\section``, ``\subsection``, ``\subsubsection``
   172 
   268 
   173 On compiling, we can see that the headings of the sections and the
   269 On compiling, we can see that the headings of the sections and the
   174 sub-sections appear in the document.
   270 sub-sections appear in the document.
   175 
   271 
   176 You may have noticed that LaTeX automatically numbers the sections. To
   272 You may have noticed that LaTeX automatically numbers the sections. To
   177 prevent a section from getting numbered, an asterix is appended to the
   273 prevent a section from getting numbered, an asterix is appended to the
   178 corresponding sectioning command.
   274 corresponding sectioning command.
   179 
   275 
   180 If the document was a longer document, we could have used a report or
   276 If the document was a longer document, we could have used a report or a book
   181 a book class. (Note: Books donot have the abstract environment.) Let's
   277 class. (Note: Books donot have the abstract environment.) Let's look at what
   182 look at what happens to the document, when we change it to the report
   278 happens to the document, when we change it to the report class.
   183 class.
   279 
   184 
   280 The numbering strangely begins from zero, now. This is because, chapters have
   185 The numbering strangely begins from zero, now. This is because,
   281 an additional sectioning command called ``\chapter``. The chapter is one
   186 chapters have an additional sectioning command called
   282 level above a section and since, our document does not have a ``\chapter``
   187 ``\chapter``. The chapter is one level above a section and since, our
   283 command, the sections are numbered from 0. To change this, we add a chapter
   188 document does not have a ``\chapter`` command, the sections are
   284 command before the first section. We say
   189 numbered from 0. To change this, we add a chapter command before the
   285 
   190 first section. We say::
   286 ::
   191 
   287 
   192   \chapter{One}
   288   \chapter{One}
   193 
   289 
   194 Now, observe that we now have a chapter title appearing and the
   290 Now, observe that we now have a chapter title appearing and the numbering
   195 numbering starting from 1.
   291 starting from 1.
   196 
   292 
   197 Also, note that the subsubsections donot get a numbering now. This is
   293 Also, note that the subsubsections donot get a numbering now. This is
   198 controlled by a variable called the secnumdepth. By default it is set
   294 controlled by a variable called the secnumdepth. By default it is set to 2.
   199 to 2. We can now, change it to 3 and get numbering for subsubsections
   295 We can now, change it to 3 and get numbering for subsubsections also. 
   200 also.  ::
   296 
       
   297 ::
   201 
   298 
   202   \setcounter{secnumdepth}{3}
   299   \setcounter{secnumdepth}{3}
   203 
   300 
   204 What do you expect to happen if we changed the secnumdepth to 1? What
   301 What do you expect to happen if we changed the secnumdepth to 1? What if it
   205 if it is 0? -1? {Lab excercise}
   302 is 0 or -1?
   206 
   303 
   207 
   304 
   208 Appendix
   305 Appendix
   209 --------
   306 --------
   210 
   307 
   217   \section{Plotting using Pylab}
   314   \section{Plotting using Pylab}
   218 
   315 
   219 Table of Contents
   316 Table of Contents
   220 -----------------
   317 -----------------
   221 
   318 
   222 Our sample document is not long enough to warrant a table of contents,
   319 Our sample document is not long enough to warrant a table of contents, but
   223 but let us learn to add a table of contents to a LaTeX document. If
   320 let us learn to add a table of contents to a LaTeX document. If you ever
   224 you ever tried adding a table of contents, to a document in a
   321 tried adding a table of contents, to a document in a wordprocessor, you would
   225 wordprocessor, you would know how much of a trouble it is. In LaTeX,
   322 know how much of a trouble it is. In LaTeX, it is a matter of just one
   226 it is a matter of just one command and placing the command at the
   323 command and placing the command at the location where you would want to have
   227 location where you would want to have the table of contents. Let's now
   324 the table of contents. Let's now add a table of contents to our draft. Now,
   228 add a table of contents to our draft. Now, compile the document and
   325 compile the document and look at the output document. It does not have the
   229 look at the output document. It does not have the table of contents!
   326 table of contents!
   230 
   327 
   231 On the first compilation only the "Contents" heading appears in the
   328 On the first compilation only the "Contents" heading appears in the document,
   232 document, but the actual table does not appear. You will need to
   329 but the actual table does not appear. You will need to compile your document
   233 compile your document once more, for the actual table to appear in
   330 once more, for the actual table to appear in your document. On the first run,
   234 your document. On the first run, LaTeX has gone through your document
   331 LaTeX has gone through your document and generated a temporary file
   235 and generated a temporary file (``.toc``), with the entries that
   332 (``.toc``), with the entries that should go into the table of contents. These
   236 should go into the table of contents. These entries are made, when you
   333 entries are made, when you compile your document for the second time.
   237 compile your document for the second time.
   334 
   238 
   335 Note that any section/block that has been numbered automatically appears in
   239 Note that any section/block that has been numbered automatically
   336 the table of contents. It is possible to get un-numbered sections, for
   240 appears in the table of contents. It is possible to get un-numbered
   337 instance a Preface or a Foreword section to appear in the Table of Contents.
   241 sections, for instance a Preface or a Foreword section to appear in
   338 
   242 the Table of Contents.
   339 Let's change our Introduction section to be an un-numbered one and try to
   243 
   340 make it appear in the table-of-contents. ::
   244 Let's change our Introduction section to be an un-numbered one and try
       
   245 to make it appear in the table-of-contents.  ::
       
   246 
   341 
   247   \section*{Introduction}
   342   \section*{Introduction}
   248   \addcontentsline{toc}{section}{Intro}
   343   \addcontentsline{toc}{section}{Intro}
   249 
   344 
   250 We shall talk about adding and managing bibliographies, later in the
   345 We shall talk about adding and managing bibliographies, later in the course.
   251 course.
   346 
   252 
   347 Now, that we have the basic structure of the document, let's get into the
   253 Now, that we have the basic structure of the document, let's get into
   348 content and the details of it.
   254 the content and the details of it.
       
   255 
   349 
   256 Typesetting Text
   350 Typesetting Text
   257 ----------------
   351 ----------------
   258 
   352 
   259 Let's begin with adding the second paragraph to the introduction
   353 Let's begin with adding the second paragraph to the introduction section.
   260 section. Let's place the text of the second para, after the first
   354 Let's place the text of the second para, after the first line, that we
   261 line, that we already have. Now, compile the document. 
   355 already have. Now, compile the document.
   262 
   356 
   263 Notice, that the second para appears in continuation with the previous
   357 As already discussed, we need to an insert an empty line, to insert a new
   264 line. To start a new paragraph in LaTeX, we need to insert an empty
   358 paragraph in LaTeX. Also, notice that the new paragraph is indented.
   265 line. Multiple empty lines are considered as a single empty line. To
       
   266 start a new line, use the ``\newline`` or ``\\`` command. Notice the
       
   267 difference (in the output), in starting a new paragraph and starting a
       
   268 newline. A new paragraph is indented.
       
   269 
   359 
   270 Quotation Marks
   360 Quotation Marks
   271 ---------------
   361 ---------------
   272 
   362 
   273 Look at the quotation marks around the text, Sigh Pie. They are not
   363 Look at the quotation marks around the text, Sigh Pie. They are not formatted
   274 formatted properly. To place quotation marks in LaTeX, you should use
   364 properly. To place quotation marks in LaTeX, you should use ````` character
   275 ````` character for the left quote & ``'`` character for the right
   365 for the left quote & ``'`` character for the right quote. For double quotes,
   276 quote. For double quotes, they should be used twice.
   366 they should be used twice.
   277 
   367 
   278 Fonts
   368 Fonts
   279 -----
   369 -----
   280 
   370 
   281 The names of the software tools, Scilab, Matlab, etc. appear in
   371 The names of the software tools, Scilab, Matlab, etc. appear in italics or
   282 italics or emphasized as it is called in LaTeX. To emphasize text, the
   372 emphasized as it is called in LaTeX. To emphasize text, the ``\emph`` command
   283 ``\emph`` command is used.
   373 is used.
   284 
   374 
   285 Let's also add the contents of the subsection "Sub-packages of
   375 Let's also add the contents of the subsection "Sub-packages of Scipy". We
   286 Scipy". We shall add the table as plain text, until we learn how to
   376 shall add the table as plain text, until we learn how to edit tables.
   287 edit tables.
   377 
   288 
   378 Let's try and form a tabular structure by separating the left and right
   289 Let's try and form a tabular structure by separating the left and
   379 columns using spaces. On compiling we find that LaTeX doesn't add multiple
   290 right columns using spaces. On compiling we find that LaTeX doesn't
   380 spaces between words. Just like multiple empty lines, multiple spaces are
   291 add multiple spaces between words. Just like multiple empty lines,
   381 considered as a single space.
   292 multiple spaces are considered as a single space.
   382 
   293 
   383 Also, we notice that ``LaTeX`` starts a new paragraph at the beginning of the
   294 The names of the sub-packages appear in a fixed width font in the
   384 table. To avoid this, we use the ``flushleft`` environment.
   295 sample document provided to us. The headings of the columns appear in
   385 
   296 bold-face. Let's make changes to this effect.
   386 The names of the sub-packages appear in a fixed width font in the sample
   297 
   387 document provided to us. The headings of the columns appear in bold-face.
   298 ``\textbf`` is used to change text to bold face and ``\texttt`` is
   388 Let's make changes to this effect.
   299 used to change text to fixed width font.
   389 
   300 
   390 ``\textbf`` is used to change text to bold face and ``\texttt`` is used to
   301 We could also change the separating - (hyphen) to an em-dash (or
   391 change text to fixed width font.
   302 en-dash) -- is em-dash and --- is an em-dash, to improve the
   392 
   303 appearance of the document.
   393 We could also change the separating - (hyphen) to an em-dash (or en-dash) --
       
   394 is em-dash and --- is an em-dash, to improve the appearance of the document.
   304 
   395 
   305 Lists
   396 Lists
   306 -----
   397 -----
   307 
   398 
   308 The section on Use of Scipy in this course, contains lists. Let's now
   399 The section on Use of Scipy in this course, contains lists. Let's now add
   309 add lists to our document. The ``enumerate`` environment adds numbered
   400 lists to our document. The ``enumerate`` environment adds numbered lists to
   310 lists to our document and the ``itemize`` environment adds un-numbered
   401 our document and the ``itemize`` environment adds un-numbered lists.
   311 lists. ``\item`` command adds a new entry to a list. Note, that LaTeX
   402 ``\item`` command adds a new entry to a list. Note, that LaTeX can easily
   312 can easily handle nested lists. In fact most environments can be
   403 handle nested lists. In fact most environments can be embedded within other
   313 embedded within other environments, without any problems.
   404 environments, without any problems.
   314 
   405 
   315 LaTeX also has a description list, which shall be looked at, during
   406 LaTeX also has a description list, which shall be an exercise, for you.
   316 the lab sessions.
   407 
   317 
   408 
   318 Footnotes, Labels and References
   409 Footnotes, Labels and References
   319 --------------------------------
   410 --------------------------------
   320 
   411 
   321 Let's now add the footnote to pylab. LaTeX provides a footnote command
   412 Let's now add the footnote to pylab. LaTeX provides a footnote command to add
   322 to add a footnote.
   413 a footnote.
   323 
   414 
   324 We added the footnote with Appendix A, as plain text. But, in case we
   415 We added the footnote with Appendix A, as plain text. But, in case we added
   325 added another Appendix before the section on using ``pylab``, the
   416 another Appendix before the section on using ``pylab``, the footnote will
   326 footnote will have to be edited. To avoid this, LaTeX provides a handy
   417 have to be edited. To avoid this, LaTeX provides a handy system of labels and
   327 system of labels and referencing.
   418 referencing.
   328 
   419 
   329 We first add a label to the section that we want to refer in this
   420 We first add a label to the section that we want to refer in this
   330 footnote. Then, we change the footnote, and add the reference to this
   421 footnote. Then, we change the footnote, and add the reference to this
   331 label instead of the character A. If you look at the output after
   422 label instead of the character A. If you look at the output after
   332 compiling the document once, you will see that the footnote has
   423 compiling the document once, you will see that the footnote has
   612 you need to give the frame an optional parameter ``[fragile]``.
   703 you need to give the frame an optional parameter ``[fragile]``.
   613 
   704 
   614 To achieve more with beamer, it is highly recommended that you look at
   705 To achieve more with beamer, it is highly recommended that you look at
   615 the ``beameruserguide``.
   706 the ``beameruserguide``.
   616 
   707 
       
   708 .. 
       
   709    Local Variables:
       
   710    mode: rst
       
   711    indent-tabs-mode: nil
       
   712    sentence-end-double-space: nil
       
   713    fill-column: 77
       
   714    End: