Introductory Tutorial for writing with LaTeX

  in Research Blog, Software, Tutorials, Writing   Posted on February 26, 2013

LATEX is quite different from wysiwyg (what you see is what you get) approach which most modern word processors such ms Word or Corel WordPerfect follow. With these applications, authors specify the document layout interactively while typing text into the computer. Along the way they can see on the screen how the final work will look like when it is printed. When using LATEX it is normally not possible to see the final output while typing the text. But the final output can be previewed on the screen after processing the file with LATEX. Following is the method to create a LATEX document :

  1. Type in the text with necessary commands.
  2. Compile the text with LATEX engine.
  3. After successful compilation of the document output can be previewed on the screen

LaTex has two main section : 1) Preamle 2) Document.


 

1-Preamble:

The first command for every latex document must be the command :

\documentclass[options]{class}

The possible values of class of which one and only one may be given froim the following list:

article , book , report , letter

The [options] allows various modifications to be made to the formatting like selectting :

  • The font size :10pt , 11pt , 12 pt
  • The page format : onecolumn , twocolumn
  • The paper size : letterpaper , a4paper , …

The preamble is the portion between \documentclass and \begin{document}. This can contain package loading commands like :

\usepackage{packagename}

The preamble can also contain the command \pagestyle{styleoption} for the header and the footer style. the styleoption can take a number of options including:

  • \pagestyle{plain} page number in the footer, no header
  • \pagestyle{headings} chapter heading in odd header, section heading in section, no footer
  • \pagestyle{yourown} for advanced users to define their own style !

An example of a Preamle !:

\documentclass[a4paper,11pt,twocolumn]{article}
\usepackage{amsmath,times}
\pagestyle{headings}
\begin{document}

2-Document

The document section of a Latex file is the section enclosed between \begin{document} and \end{document} . The document section has three parts: Frontmatter , Mainmatter, Backmatter

2.1 Frontmatter

The frontmatter of an article has the title of the article, its authors and affiliations as shown in the example below:

\title{The title of your article here....}
\author{I. Bouchrika \& A. Another \\ 
       University of ABC \\
      address here of your university \\ 
      Country, post code}
\date{}
\maketitle

The \maketitle command will trigger the frontmatter of the document to be shown.
The frontmatter should also contain the abstract section using the command : \begin{abstract} and \end{abstract} as shown in the example below:

\begin{abstract}
This is the text for my abstract .....
\end{abstract}

2.2 Mainmatter

This is core of the document where we usally begin for a case of book with \chapter , \section, \subsection, \subsubseciton ….

For an a simple article, we usually start with \section{Introduction}, \section{Related Work} ….\section{Conclusions}

 

Example:

\section{introduction}
text for the introduction here ....

\section{Related Work}
What other researchers have achieved ....

\section{Our Approach}
Your work here ....

\section{Experimental Results}
The results of your method ...

\section{Conclusions}
Conclusions and future work here ....

2.3 Backmatter

This portion of the article or book is for the references ( bibliography), indexes and appendices.

Leave a Reply

Your email address will not be published. Required fields are marked *