Beginning with LaTeX on GNU/Linux

Recently, due to some project work i had the need to learn to use LaTeX to create my documentation. But as i was googling around for it i found a plethora of stuff that utterly confused me. Hence, This document gives an overview of LaTeX and how get started with it on GNU/Linux

Introduction to TeX

TeX is a typesetting program created by Donald Knuth of Stanford University with the aim of composing quality content that contains a lot of mathematical and technical expressions. It is also suitable for producing all sorts of other documents, from simple letters to complete books. TeX provides Device Independent output(dvi) which contains details only regarding references to fonts and positions of characters on the screen. This output can be used by various printers to convert it to their desired format like pdf, postscript etc.

What is Typesetting?

A type is a way characters look usually called a font. Type-setting is the process of putting characters (of a certain type) in their correct place (layout) on paper or screen.

What is LaTeX then?

TeX by itself is a macro compiler i.e it maps a higher level instruction into a sequence of device independent instructions. LaTeX provides a set of useful macros, which uses TeX underneath to produce the device independent output. LaTeX was introduced by Leslie Lamport, a researcher i admire for his innovation. Similar distributions of TeX include ConTeXt, AMS-TeX etc.

Getting Started

There are 3 main things you ought to be aware of to get started with LaTeX

Writing TeX files

The TeX files is the ASCII specification i.e which is written in characters available on the keyboard. You can use any text editor of your choice to write it – vim, emacs etc..

Here are some good areas to get started on learning to write tex files.

An Example LaTeX specification

The (Not So) Short Introduction to LaTeX2e
This document by Tobias Oetiker is good for beginners

The LaTeX Cheat Sheet

Setting up LaTeX

Usually most distros of GNU/Linux come with latex pre-installed. If not please check your software sources for a TeX package or install TeX Live directly.
For Ubuntu you can install it by
$ sudo apt-get install texlive

Once done you have a plethora of options available to you

Converting TeX files

Convert the tex to dvi
$ latex program_to_convert.tex
Convert dvi to postscript
$ dvips -Pcmz your_dvi_file.dvi -o output_file.ps
Convert tex to pdf directly
$ pdflatex program_to_convert.tex
Convert postscript to pdf
$ pdf2ps your_file.ps your_file.pdf
Convert pdf to postscript
$ pdf2ps your_file.pdf output_file.ps
Note: This article is only to get you *familiar* with LaTeX only. For advanced use, you may refer the following

References

http://en.wikipedia.org/wiki/TeX
http://www.google.co.in/search?q=Latex
http://www.latex-project.org
http://en.wikipedia.org/wiki/LaTeX
http://selinap.com/2009/03/how-to-compile-latex-file/
http://www.tug.org/begin.html
http://en.wikipedia.org/wiki/Macro_(computer_science)
http://www-cs-faculty.stanford.edu/~knuth/index.html
LATEX
Advertisements

7 comments on “Beginning with LaTeX on GNU/Linux

    • Hi Stefan,

      Thanks for the tips. Those links to start off learning LaTeX is quite useful. I have not used Kile yet, bcoz my internet conn is a slow and the package size was huge. What advantage in using an editor like Kile?

  1. Good LaTeX editors like the outstanding Kile provide auto-completion of LaTeX commands, syntax highlighting to improve the readability of the code, compile with one click (including index runs for glossary, index etc. and bibtex for bibliography), inverse and forward search (click into the dvi and you will get to the code piece in Kile), project management, spell-checking and much more.

    Stefan

  2. Varun,
    I’ve been using LaTeX and it’s cousins on my lappie for a while now… about a year! Glad to see you getting in to it.

    I found the ubuntu Repos quite a bit behind the times. I found it much better to download the TexLive DVD image, and install using that. Currently I’m running TeXLive 2008, and TeXLive 2009 is out.

    The oldness of the Ubuntu Repos version (last I checked it was TeXLive 2007) isn’t a problem until you start doing some serious LaTeXing. I found that many of the packages I was using were out of date, and instead of upgrading all of them one by one, I just went ahead and installed the DVD.

    Now, if only I could find something similar for Python… 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s