Links

  • Starting with Latex
  • Latex Kurzbeschreibung (pdf)

    A very short tutorial for Latex

    Here is is an example of a basic Latex 2e document:
    \documentclass{article}    %%% article is just one type of document
    \usepackage{graphicx}      %%% useful for including figures
    \usepackage{times}         %%% if this is here the fonts are nicer in pdf files
    
    \title{A very short Latex document}
    \author{Uta Priss}
    
    \begin{document}           %%% the content of the document begins here
    \maketitle                 %%% without this, the title will not be printed
    
    \section{This is a section}
    
    Here is some text.
    
    \section*{This is another section but without a number}
    
    a paragraph a paragraph a paragraph a paragraph a paragraph a paragraph
    a paragraph a paragraph a paragraph a paragraph a paragraph a paragraph
    a paragraph a paragraph a paragraph a paragraph a paragraph a paragraph
    
    a paragraph a paragraph {\bf a paragraph} a paragraph a paragraph a paragraph
    a paragraph a paragraph a paragraph a paragraph a paragraph a paragraph
    \end{document}   
    

    Exercises

    1) Copy and paste the blue code into an editor. Save the document. Run latex or pdflatex on it. View the resulting ps or pdf file.
    2) Add another heading (for section number 2). Add another paragraph and another footnote. Change the name of the author. Change the bold-face (bf) to italics (it).
    3) Remove the title by adding just a single character.

    Finding more information

    Documentation can be found on-line, for example (open these two pages in other tabs of your browser):
  • general commands
  • mathematical symbols

    Exercises

    4) Add a quotation, an itemized list ("itemize") and a numbered list ("enumerate") to your document.
    5) Add the following mathematical symbols (note they must be enclosed in dollar signs, such as $\alpha$): Greek letter alpha, a larger or equal sign, an equivalence sign (left and right arrow), an infinity sign and some text which is underlined.

    Tables

    \begin{table}
    \caption{A heading for the table}
    \begin{center}
    \begin{tabular}{l|l|l}
    Name & Date of Birth & Phone \\
    \hline
    Paul & 1.1.2001 & 1234567 \\
    Mary & 3.4.2011 & 9876543 \\
    \end{tabular}
    \end{center}
    \end{table}
    

    Exercises

    6) Add another column and make the text right-alined (r) instead of left-aligned (l).
    7) Add a surrounding box (i.e. horizontal lines at the top and bottom and on the sides).

    Figures

    \begin{figure}
    \includegraphics[width=4in]{picture.jpg}
    \caption{This is a heading for a figure}
    \end{figure}
    

    Exercises

    8) Download a jpg file from the web and save it under the name "picture.jpg" in the same directory as your Latex file.
    9) Make the picture first bigger, then smaller by changing the width.

    Mathematical formulas

    Some documentation on mathematical formulas (open these two pages in other tabs of your browser):
  • very brief
  • more detailed

    Exercises

    10) Typeset some of the formulas on these pages: here, here and here.