www.ntnu.no *
INFOWEB >  programs >  unix  > LaTeX
Tasks
You may add comments
Or e-mail this article
Read articles written by thomasan
User rating
How much did this article help you?
Much Some Little
Print preview
You do not need a 'printer-friendly page' to print this page. Here's why
Contents

LaTeX

General info about LaTeX

L A T E X 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 document class 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.

Installation

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.

How to use LaTeX.

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.

Commands in LaTeX

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.

A Standard LaTeX document

All LaTeX documents have this layout:

konsoll #1
      \documentclass{class}

      \begin{document}
      
      ....  insert your text here ....

      \end{document}
    
konsoll #2
class
must be one of the valid classes: article, report, letter and book.

Print / show Document

You have made a file with the name

konsoll #3
test.tex

You then need to type

konsoll #3
latex test.tex
LaTeX reads the file, formats it according to your choices and saves it it in the file

konsoll #4
test.dvi
(DVI is short for DeVice Independent). This file you can either print out or convert to Post Script(PS).

To view a dvi file

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.

Converting to PS

To convert a file to PS you use the command:

konsoll #6
dvips filename.dvi -o tofile


Languages: en flag_no Comments: 0 Aid: 315 User rating:
 
 
Last updated: 2007-07-02 Author: thomasan Read: 3507 times