# Text Formatting, Equations and Figures using LaTeX

Posted on February 26, 2013

LaTeX is easy and straight forward ! a simple document using Latex is shown below:

\documentclass[a4paper,11pt,twocolumn]{article}
\usepackage{amsmath,times}
\usepackage{graphicx}
\usepackage{tabularx}
\begin{document}
\title{The title of your article here....}
\author{I. Bouchrika and A. Another \\
University of ABC \\
Country, post code}
\date{}
\maketitle
\begin{abstract}
This is the text for my abstract .....
\end{abstract}
\section{introduction}
text for the introduction \textit{here} text for \textbf{the }introduction \underline{here} text for the introduction here

\end{document}

For simple and frequent commands for text formatting:

\textit{text} ITALIC TEXT

\textbf{text} BOLD TEXT

\underline{text} Underlined text

For inserting Equation within a text, we use $equation here$as shown in the example :

\section{introduction}
the introduction here as shown for $x=f(t)$ text for the introduction here text for the introduction here

If you want to insert equation on its own, we use the and :

\section{introduction}
the introduction here as  (\ref{eq:myeqa}) text for the introduction here text for the introduction here
$$x=\sum{f(t))} \label{eq:myeqa}$$

The output of the above is shown below:

Note that the equation block has the command \label{eq:anythinghere}. This is a label or an address that we can within the text to refer to the equation using the command \ref{eq:anythinghere}

To insert an image or a figure, we need first to import the package graphicx using the command : \usepackage{graphicx}. We use the command \begin{figure} and \end{figure} as shown below:

\section{introduction}
the introduction here as  (\ref{fg:myfig}) text for the in....
\begin{figure}[h]
\centering
\includegraphics[width=3cm]{nameofyourimage.jpg}
\label{fg:myfig}
\end{figure}