1. Introduction
1.1 What Is LaTeX?
Donald E. Knuth developed TeX in the year 1977 as a typesetting system for preparing books, especially those containing a lot of mathematical expressions. Based on it, Leslie Lamport developed LaTeX (named as LaTeX 2.09) in 1985 for preparing documents by concentrating on the structure of a document rather than on its formatting details. LaTeX 2.09 was enhanced in 1994 as LaTeX 2
by a group of developers led by Frank Mittelbach.
LaTeX is a macro-package used as a language-based approach for typesetting documents. Various LaTeX instructions are interspersed with the input file of a document, say myfile.tex , for obtaining the desired output as myfile.dvi or directly as myfile.pdf . The myfile.dvi file can be used to generate myfile.ps or even myfile.pdf file. However, unlike programming languages for computational works, such as C or C++ , LaTeX is very simple and easy to work with. One can become expert in LaTeX through a little practice. LaTeX can be used for preparing letters, applications, articles, reports, publications, theses, books, or anything of that kind.
1.2 Why LaTeX Over Other Word Processors?
The use of common word processors, in which the effect becomes directly visible, may be easier in preparing simple and small documents. But, as shown roughly in Fig. . LaTeX is especially well suited for scientific writing, like technical reports, articles, academic dissertations, books, etc. Although learning LaTeX is time and effort taking, it can be realized that the preparation of only one academic dissertation would pay off all additional efforts required in learning LaTeX.
Fig. 1.1
LaTeX and other word processors
One of the major advantages of using LaTeX is that manual formatting of a document, as usually required in many word processors, can be automated in LaTeX. Therefore, the possibility of doing any mistake in numbering and referring items (sections, tables, figures or equations), in choosing size and type of fonts for different sections and subsections, or in preparing bibliographic references, can be avoided. Further, LaTeX has the provision for automatically generating various lists of contents, index, and glossary.
1.3 How to Prepare a LaTeX Input File?
As shown in Fig. , the main structure of a LaTeX input file can be divided into two parts preamble and body .
Fig. 1.2
Structure of a LaTeX input file
The preamble is the first part of an input file that contains the global processing parameters for the entire document to be produced, such as the type of the document, page formatting, header and footer setting, inclusion of LaTeX packages for supporting additional instructions, and definitions of new instructions. The simplest preamble is \documentclass { dtype } , where dtype in { } is a mandatory argument as the class (or type) of the document, such as letter , article , report , or book on the next page.
As shown in Fig. for details). Any text entered after \end{document} is simply skipped by a LaTeX compiler.
Table 1.1
Standard options to the \documentclass[ ]{ } command
A LaTeX input file is named with tex extension, say myfile.tex . It can be prepared in any operating system using any general-purpose text editor that supports tex extension, e.g., gedit or Kate in Linux-based systems. There are also many open-source (free access in internet) text editors developed specifically for preparing LaTeX input files, e.g.,
For both Windows and Linux :
BaKoMa TeX ( http://bakoma-tex.com )
Emacs ( www.gnu.org/software/emacs/emacs.html )
jEdit ( http://jedit.org )
Kile ( http://kile.sourceforge.net )
LyX ( www.lyx.org )
Open LaTeX Studio ( http://sebbrudzinski.github.io/Open-LaTeX-Studio )
TeXlipse ( http://texlipse.sourceforge.net )
TeXmacs ( www.texmacs.org )
Texmaker ( www.xm1math.net/texmaker )
TeXpen ( https://sourceforge.net/projects/texpen )
TeXstudio ( www.texstudio.org )
TeXworks ( https://github.com/TeXworks/texworks ), etc.
For Linux only :
LaTeXila ( https://wiki.gnome.org/Apps/LaTeXila )
Gummy ( https://github.com/alexandervdm/gummi ), etc.
For Windows only :
Inlage ( www.inlage.com )
LEd ( www.latexeditor.org )
TeXnicCenter ( www.texniccenter.org )