latex/lab-workbook.tex
changeset 107 80a8b46754f8
child 134 73012a0eb878
equal deleted inserted replaced
106:43ca1381dbef 107:80a8b46754f8
       
     1 % Created 2010-08-31 Tue 18:51
       
     2 \documentclass[11pt]{article}
       
     3 \usepackage[utf8]{inputenc}
       
     4 \usepackage[T1]{fontenc}
       
     5 \usepackage{fixltx2e}
       
     6 \usepackage{graphicx}
       
     7 \usepackage{longtable}
       
     8 \usepackage{float}
       
     9 \usepackage{wrapfig}
       
    10 \usepackage{soul}
       
    11 \usepackage{textcomp}
       
    12 \usepackage{marvosym}
       
    13 \usepackage{wasysym}
       
    14 \usepackage{latexsym}
       
    15 \usepackage{amssymb}
       
    16 \usepackage{hyperref}
       
    17 \tolerance=1000
       
    18 \providecommand{\alert}[1]{\textbf{#1}}
       
    19 
       
    20 \title{Lab Workbook --- \LaTeX}
       
    21 \author{FOSSEE}
       
    22 \date{August, 2010}
       
    23 
       
    24 \begin{document}
       
    25 
       
    26 \maketitle
       
    27 
       
    28 \setcounter{tocdepth}{3}
       
    29 \tableofcontents
       
    30 \vspace*{1cm}
       
    31 
       
    32 \section{Lab-1}
       
    33 \label{sec-1}
       
    34 
       
    35 
       
    36 \begin{enumerate}
       
    37 \item Compile and produce a pdf output of \texttt{example1.tex}.
       
    38 \item Modify \texttt{example1.tex} replacing \texttt{LaTeX} with \texttt{\textbackslash{}LaTeX}.
       
    39 \item Add a title, author and date to the document.
       
    40 \item What happens if \texttt{\textbackslash{}date} is replaced by \texttt{\textbackslash{}date\{IIT, Bombay\}} ?
       
    41 \item Debug and compile examples 2, 3, 4, 5
       
    42 \item Provide a document (pdf and source) with a TOC, but has been
       
    43      compiled only once. Exercise for Debugging.
       
    44 \item What happens when you add the following \LaTeX{} code to the
       
    45      document from the previous question? 
       
    46      
       
    47 \begin{verbatim}
       
    48       \renewcommand{\contentsname}{What is Here?}
       
    49 \end{verbatim}
       
    50 
       
    51 \item Experiment with setting the secnumdepth counter to 1, 0, -1.
       
    52 \item Debug and compile example 6.
       
    53 \item Experiment with the options of \texttt{\textbackslash{}documentclass}.
       
    54 
       
    55 \begin{itemize}
       
    56 \item 10pt, 11pt, 12pt sets the size of the text of the document.
       
    57 \item onecolumn, twocolumn
       
    58 \item draft --- makes \LaTeX{} highlight problems in typesetting to
       
    59         be looked at by a human.
       
    60 \end{itemize}
       
    61 
       
    62 \end{enumerate}
       
    63 \section{Lab-2}
       
    64 \label{sec-2}
       
    65 
       
    66 
       
    67 \begin{enumerate}
       
    68 \item \texttt{\textbackslash{}newpage} command adds a page break. Add some page breaks to
       
    69      example 6 and see how the command works.
       
    70 \item Try out the commands \texttt{\textbackslash{}pagestyle} and \texttt{\textbackslash{}thispagestyle} with the
       
    71      following parameters and look at the outputs obtained.
       
    72 
       
    73 \begin{itemize}
       
    74 \item \texttt{empty},
       
    75 \item \texttt{plain},
       
    76 \item \texttt{heading}
       
    77 \end{itemize}
       
    78 
       
    79 \item Add the following description list describing the options to
       
    80      \texttt{\textbackslash{}includegraphics} command to a document and look at the output. 
       
    81 
       
    82 \begin{verbatim}
       
    83 \begin{description}
       
    84 \item[{\texttt{width=x}, \texttt{height=x}}] 
       
    85 If only the height or width is specified, the image is scaled, maintaining the aspect ratio.
       
    86 
       
    87 \item[{\texttt{keepaspectratio}}]  
       
    88 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.
       
    89 
       
    90 \item[{\texttt{angle=x}}] 
       
    91 This option can be used to rotate the image by \texttt{x} degrees, counter-clockwise.
       
    92 
       
    93 \end{description}
       
    94 \end{verbatim}
       
    95 \item \texttt{\textbackslash{}ldots} is used to get ellipsis in \LaTeX{} documents.
       
    96 \item Read the manual of listings package and learn how to include a
       
    97      set of lines from a file into a \LaTeX{} document. Include a few
       
    98      lines from your previous lab exercises of ULT.
       
    99 \item To change the line spacing of your document
       
   100      \texttt{\textbackslash{}usepackage\{setspace\}} and then specify the line spacing of
       
   101      your document, using \texttt{\textbackslash{}doublespace}, \texttt{\textbackslash{}onehalfspace}, etc.
       
   102 \item Debug and compile examples 9, 10
       
   103 \end{enumerate}
       
   104 \section{Lab-3}
       
   105 \label{sec-3}
       
   106 
       
   107 
       
   108 \begin{enumerate}
       
   109 \item Debug and compile example 7.
       
   110 \item BibTeX is another way of handling bibliography. Look at
       
   111        bibtex.rst and change draft.tex to use BibTeX.
       
   112 \item As you would've already observed, \LaTeX{} compilation produces a
       
   113        lot of other files along with the pdf output.
       
   114 
       
   115 \begin{itemize}
       
   116 \item .log --- gives a log of what happened during last
       
   117          compilation.
       
   118 \item .toc --- stores section headers. Edit this file and observe
       
   119          changes in this document to see how the compilation of \LaTeX{}
       
   120          works and why two compilations are required for table of
       
   121          contents to work.
       
   122 \item .aux --- used to share information between consecutive
       
   123          compiler runs.
       
   124 \end{itemize}
       
   125 
       
   126 \item Prepare a presentation in beamer with solutions to any 10
       
   127        problems from the Lab workbook.
       
   128 \item Debug and compile example 8.
       
   129 \item Finish the incomplete parts of the draft to obtain the complete
       
   130        output of the sample document that we started out to prepare.
       
   131 \end{enumerate}
       
   132 
       
   133 \end{document}