% -*- latex -*-
% FILE: "/home/evmik/jobs/wm/2012_fall_practical_computing_for_scientists/sample_report_source/example_of_figures_use.tex"
% LAST MODIFICATION: "Fri, 28 Sep 2012 11:28:39 -0400 (evmik)"
% (C) 2010 by Eugeniy Mikhailov, <evgmik@gmail.com>
% $Id:$
\documentclass[letter,12pt]{article}

%---------------------------------------------------------------
\usepackage{listings} % allow to include nicely formated listings
\usepackage{color}    % we can add color
\usepackage{fullpage} % default article style is to greedy about margins
\usepackage{graphicx} % REQUIRED TO WORK WITH FIGURES
%---------------------------------------------------------------

\begin{document}

%---------------------------------------------------------------
\title{Sample of tex file with figures}
\author{Eugeniy E. Mikhailov}
\date{\today}
\maketitle
%---------------------------------------------------------------
\section{Very simple example of a figure use}
Let's consider a diffraction of light on a mask. We will use a mask
depicted in the figure~\ref{fig:mask}. The parameters of this mask are:
resolution $1386\times600$~pixels, physical size $2.8\times1.2$~cm.

\begin{figure}[h] % 'h' stands for here, there are other specifiers too.
	\center
	\includegraphics[width=0.5\columnwidth,angle=0]{mask_WM}
	%%% -------------------------------------------^^^^^^^^^^ figure filename
	%%% notice that there is no extention of the file since it is
	%%% optional and latex will try it best to chose the right one.
	%%% You might provide it and use {mask_WM.png} but it will limit
	%%% you at further steps.
	%%%
	%%% IMPORTANT: LaTex is piccky it can work only with a handful of
	%%% formats depending on a particular version.
	%%%
	%%% Bare latex can work with 'eps' and 'ps' formats only
	%%% while pdflatex can work with 'jpg', 'pdf', 'png' among the
	%%% most common ones, strangely it does not work with 'eps' and 'ps'
	%%%
	%%% IT IS YOUR RESPONSIBILITY to provide a figure file in proper
	%%% format.

	\caption{
		\label{fig:mask} % a short way to address this figure via
				 % \ref{} in the text. See above
		Mask with WM letters.
	}
\end{figure}

The resulting light (with wavelength $\lambda=670$~nm)  diffraction image at
distance 1.1~m is shown in the figure~\ref{fig:diffracted_image}. 
The formed image has the following parameters $693\times300$ pixels, with
physical size $3\times1.4$ cm.

\begin{figure}[h]
	\center
	\includegraphics[width=0.5\columnwidth,angle=0]{image_wm_diffracted}
	\caption{
		\label{fig:diffracted_image}
		Resulting diffracted image of original mask.
	}
\end{figure}

\end{document}
%---------------------------------------------------------------
