Author: Inderpreet
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.
The biggest advantage I like about LATEX is that we don’t have to worry too much about the appearance of their documents but to concentrate on getting the right content. LATEX will automatically do the formatting for you wrt whatever style you specify while starting the document.
The worst thing I like about typing my research paper in MS World is that, I have to manually manage the References and their order. If we have to change some reference, we manually have to edit all other that are affected by this change. In LATEX, once we have created the references set, we have to just point them into the doc. We don’t have to think about the format and order of reference. Another thing we can do in LATEX is that we can contain the complete database of our references (in form of *.bib file) and include them in whatever paper or thesis we want. Apart from this, LATEX can provide you readymade styles for different kind of documents, auto section numbering, table of contents, page numbering, and support to generate the pdf and ps formats, different styles for referring references, and many more.
Just like we have tags in HTML, we have same tags like structure to construct the LATEX document. We have to start and end the document. And in between these, we write the material we want to display. Use those tags and you are free from all the tensions of formatting the document.
Easiest way to migrate to LATEX:
Step1: Download the LATEX package. Most of the linux distributions include this package by default. For windows we need to download LATEX package. Latest TeX distribution for windows is named the proTeXt and is based on MiKTeX. proTeXt guides the MiKTeX installation via a short PDF document.
Step2: Get the good editor for LATEX. For Linux users, you can go with VI editor. For Windows, we have many different editors like WinEdt, Notepad++, Edit Plus, etc. I always prefer using the WinEdt. It is paid, but I assure you it is worth spending few dollars on it. For installing WinEdt follow this link.
Step3: Start writing the document in any editor of your choice. Save the file with .tex extension. Compile to get the result.
Writing the LATEX document:
1. Create a file with .tex extension.
2. The file will consists of following format
Sample.tex file
\documentclass[a4paper,12pt]{article}
%including the graphic package for images
\usepackage{graphicx}
\title{My Sample \LaTeX{} Document}
\author{InderPreet Singh}
\begin{document}
\maketitle
%starting the new section
\section{Main Section}
This is my first sample Document using LATEX. For new line place doubleslash \\
To make the things \textbf{bold}.For emphasizing something
\emph{use}.
For bullets
\begin{itemize}
\item \emph{Item1:} Line one
\item \emph{Item2:} Line two
\end{itemize}
For Formulas
\begin{equation}
y_{i+1} = x_{i}^{2n} - \sqrt{5}x_{i-1}^{n} + \sqrt{x_{i-2}^7} -1
\end{equation}
following manner by using bibliography. For calling the reference
place \cite{RefJ}
\begin{table}
% table caption is above the table
\caption{Please write your table caption here}
\label{tab:1} % Give a unique label
% For LaTeX tables use
\begin{tabular}{lll}
\hline\noalign{\smallskip}
first & second & third \\
\noalign{\smallskip}\hline\noalign{\smallskip}
number & number & number \\
number & number & number \\
\noalign{\smallskip}\hline
\end{tabular}
\end{table}
Image Insert
\begin{figure}
% Requires \usepackage{graphicx}
\includegraphics[width=1.68in, height=1.00in]{google}\\
\caption{My Test Figure}\label{google}
\end{figure}
\begin{thebibliography}{}
\bibitem{RefJ}
% comment is placed like this
Author, Article title, Journal, Volume, page numbers (year)
\end{thebibliography}
This Sample.tex file is self explanatory. I try to cover most of the commonly used tags, with comments. For more detail, click here.
Compiling the LATEX document:
If you are a WinEdt user, it will be quite easy for you to compile and generate whatever format (pdf or ps) you want to generate. You just need to press the button in the toolbar. For the people that are writing TeX file using normal text editors, they need to compile the file manually. For that they have to follow the following steps:
1. Goto command line and type following commands
2. To generate the .dvi file,
C:\Inder> latex Sample.tex
The dvi stands for "device independent'' the file Sample.dvi is the same regardless of which computer is used to compile the document, or what kind of printer it is headed for. In fact, it is too universal to be printed in this form; it must still be translated to a form suitable for a specific kind of printer. You can't even view the DVI file unless you use a special ``DVI Viewer'', such as xdvi on ucsub.
3. To generate the .ps (post script) file
C:\Inder>dvips sample.dvi
4. To generate the .pdf file
C:\Inder>dvipdf sample.dvi
Or we can get direct PDF from tex file by typing
C:\Inder>pdflatex sample.tex
To view the output Sample.pdf file, click here.
Start working on LATEX without giving any second thought that it will be difficult than normal Word Processor. Once you start using this, I am sure that you will love using this.
Useful Links:

No comments:
Post a Comment