<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE artikkel PUBLIC "-//infoweb.ntnu.no//DTD Infoweb 1.0//NO"
"http://infoweb.ntnu.no/infoweb.dtd">

<artikkel spraak="en">
  <tittel>LaTeX</tittel>
  <forfatter>janpetar</forfatter>
  <sammendrag>Tex is a language for writing documents. You make a source file which is compiled to a document with LaTeX. LaTeX is much used for scientific documents with many formulas. </sammendrag>
<lenker>
   <ekstern tittel="Introduction and extra packages for LaTeX (in Norwegian)" uri="http://www.math.ntnu.no/~berland/latex/" />
   <ekstern tittel="MikTeX" uri="http://www.miktex.org/"/>
    
</lenker>
  <hoveddel>

  <os2>General info about LaTeX</os2>

  <avsnitt>
    <uthev>L</uthev><sup>A</sup><uthev>T</uthev><sub>E</sub><uthev>X</uthev> is a program that uses 
    a file in text format and uses special commands to make formulas, pictures, summaries etc. You structure the
     document with sections, titles, attachments etc. How the information is presented after you have run it through
      LaTeX depends on which <kursiv>document class</kursiv> is used in the file. LaTeX has premade standards
       for letters, books, reports and articles. TeX is a basis program that other programs expands, like LaTeX, 
       AMSTeX, PcTeX, MiKTeX etc. 
  </avsnitt>

  <os3>Installation</os3>

  <avsnitt>
    LaTeX is installed on stud's login machines (login.stud.ntnu.no). LaTeX is avaliable for most linux distributions as packages. For windows you can use MiKTeX among others.
  </avsnitt>

  <os3>How to use LaTeX.</os3>

  <avsnitt>
    First you need a input file. This is made in a normal text editor like emacs, pico, edit, textpad etc. 
    Emacs had built-in supports for latex with color-codes etc. 
  </avsnitt>

  <os3>Commands in LaTeX</os3>

  <avsnitt>
   All LaTeX commands begins with the command name which is a backslash ( \ ) with either a text-string or 
   a single letter after it. Arguments in square brackets ( [] ) areoptional, and arguments in ( { } ) are obligatory.
    LaTeX is also case-sensitive.
  </avsnitt>

  <os3>A Standard LaTeX document</os3>

  <avsnitt>
    All LaTeX documents have this layout:

    <konsoll>
      \documentclass{class}

      \begin{document}
      
      ....  insert your text here ....

      \end{document}
    </konsoll>

    <konsoll>class</konsoll> must be one of the valid classes: <uthev>article, report,
      letter</uthev> and <uthev>book</uthev>.
  </avsnitt>

  <os2>Print / show Document</os2>
    
  <avsnitt>
    You have made a file with the name </avsnitt>
<avsnitt><konsoll>test.tex
</konsoll></avsnitt><avsnitt> 

You then need to type<br/><br/>
 
<konsoll>latex test.tex
</konsoll> 
    
LaTeX reads the file, formats it according to your choices and saves it it in the file<br/><br/>
 
<konsoll>test.dvi
</konsoll>(DVI is short for DeVice Independent). 
    This file you can either print out or convert to Post Script(PS).
  </avsnitt>

  <os3>To view a dvi file</os3>
  
  <avsnitt>
   To view a dvi file you can use a program called xdvi, though it is reccomended
    to convert it to PS and use the program gv to view the files.
  </avsnitt>

  <os3>Converting to PS</os3>

  <avsnitt>
	To convert a file to PS you use the command:
    <konsoll>dvips filename.dvi -o tofile</konsoll>
  </avsnitt>

  </hoveddel>
</artikkel>
