Latex – Introduction

LaTeX is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any form of publishing.

LaTeX is not a word processor! Instead, LaTeX encourages authors not to worry too much about the appearance of their documents but to concentrate on getting the right content.

latex-project.org

Let’s consider the following simple example.

\documentclass[a4,12pt]{article}
\title{Introduction to Latex}
\author{Praneeth Nilanga Peiris}
\date{21 May 2014}
\begin{document}
   \maketitle
   Hello world! This is my first Latex document.
\end{document}

This simply means,

  • This document is an A4 sized article with 12pt as the default font size.
  • Its title is Introduction to Latex.
  • Its author is Praneeth Nilanga Peiris.
  • It was written in 21 May 2014.
  • The document consists of a title followed by the text Hello world! This is my first Latex document.

The output of the above code is :

image

How to install

Latex comes with a set of programs. Installing them on different platforms is slightly different.

Windows

We can install latex libraries along with Mikitex packages which can be downloaded from here. Install it as a normal software.

Then you can use a normal text editor to write Latex codes and compile that using library commands. But that of course is a huge pain, so better to use a IDE.

Such as Tex Studio, Tex Maker or Lyx. Lyx is a WYSIWYG editor, but I prefer Tex Studio.

Linux

Ubuntu

To install the basic libraries :

$ sudo apt-get install texlive

To install the complete set of libraries:

$ sudo apt-get install texlive-full

To install the GEdit plugin :

$ sudo apt-get install gedit-latex-plugin

Then install Lyx or Tex Studio or preferred editor.

Arch Linux

To install TeX Live applications :

$ sudo pacman –S texlive-most

To install various character sets and non-English features :

$ sudo pacman –S texlive-lang

To install Lyx :

$ sudo pacman –S lyx

To install Tex Studio

$ sudo packer –S texstudio

Now you’re ready to go with LaTeX..!!! See you soon with more tutorials.

Leave a Reply